(svn r25838) -Codechange: Rename HOUSE_MAX to NUM_HOUSES.

This commit is contained in:
frosch
2013-10-12 16:33:19 +00:00
parent 7164124101
commit 670c4879cf
6 changed files with 25 additions and 25 deletions

View File

@@ -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];
}