(svn r25838) -Codechange: Rename HOUSE_MAX to NUM_HOUSES.
This commit is contained in:
@@ -26,14 +26,14 @@ static const byte TOWN_HOUSE_COMPLETED = 3;
|
||||
|
||||
static const uint HOUSE_NO_CLASS = 0;
|
||||
static const HouseID NEW_HOUSE_OFFSET = 110;
|
||||
static const HouseID HOUSE_MAX = 512;
|
||||
static const HouseID NUM_HOUSES = 512;
|
||||
static const HouseID INVALID_HOUSE_ID = 0xFFFF;
|
||||
|
||||
/**
|
||||
* There can only be as many classes as there are new houses, plus one for
|
||||
* NO_CLASS, as the original houses don't have classes.
|
||||
*/
|
||||
static const uint HOUSE_CLASS_MAX = HOUSE_MAX - NEW_HOUSE_OFFSET + 1;
|
||||
static const uint HOUSE_CLASS_MAX = NUM_HOUSES - NEW_HOUSE_OFFSET + 1;
|
||||
|
||||
enum BuildingFlags {
|
||||
TILE_NO_FLAG = 0,
|
||||
@@ -124,7 +124,7 @@ struct HouseSpec {
|
||||
|
||||
static inline HouseSpec *Get(size_t house_id)
|
||||
{
|
||||
assert(house_id < HOUSE_MAX);
|
||||
assert(house_id < NUM_HOUSES);
|
||||
extern HouseSpec _house_specs[];
|
||||
return &_house_specs[house_id];
|
||||
}
|
||||
|
Reference in New Issue
Block a user