diff options
-rw-r--r-- | src/newgrf_town.cpp | 2 | ||||
-rw-r--r-- | src/saveload/oldloader_sl.cpp | 2 | ||||
-rw-r--r-- | src/saveload/town_sl.cpp | 2 | ||||
-rw-r--r-- | src/town.h | 6 | ||||
-rw-r--r-- | src/town_cmd.cpp | 20 |
5 files changed, 16 insertions, 16 deletions
diff --git a/src/newgrf_town.cpp b/src/newgrf_town.cpp index 084bf640c..279c761e5 100644 --- a/src/newgrf_town.cpp +++ b/src/newgrf_town.cpp @@ -30,7 +30,7 @@ uint32 TownGetVariable(byte variable, byte parameter, bool *available, const Tow case 0x82: return ClampToU16(t->population); case 0x83: return GB(ClampToU16(t->population), 8, 8); case 0x8A: return t->grow_counter; - case 0x92: return t->flags12; // In original game, 0x92 and 0x93 are really one word. Since flags12 is a byte, this is to adjust + case 0x92: return t->flags; // In original game, 0x92 and 0x93 are really one word. Since flags is a byte, this is to adjust case 0x93: return 0; case 0x94: return ClampToU16(t->squared_town_zone_radius[0]); case 0x95: return GB(ClampToU16(t->squared_town_zone_radius[0]), 8, 8); diff --git a/src/saveload/oldloader_sl.cpp b/src/saveload/oldloader_sl.cpp index c2c2d8ccf..c89e9ab5c 100644 --- a/src/saveload/oldloader_sl.cpp +++ b/src/saveload/oldloader_sl.cpp @@ -527,7 +527,7 @@ static const OldChunks town_chunk[] = { OCL_NULL( 1 ), ///< sort_index, no longer in use OCL_NULL( 4 ), ///< sign-coordinates, no longer in use OCL_NULL( 2 ), ///< namewidth, no longer in use - OCL_SVAR( OC_FILE_U16 | OC_VAR_U8, Town, flags12 ), + OCL_SVAR( OC_FILE_U16 | OC_VAR_U8, Town, flags ), OCL_NULL( 10 ), ///< radius, no longer in use OCL_SVAR( OC_INT16, Town, ratings[0] ), diff --git a/src/saveload/town_sl.cpp b/src/saveload/town_sl.cpp index d249840e0..1c621aab6 100644 --- a/src/saveload/town_sl.cpp +++ b/src/saveload/town_sl.cpp @@ -70,7 +70,7 @@ static const SaveLoad _town_desc[] = { SLE_VAR(Town, townnameparts, SLE_UINT32), SLE_CONDSTR(Town, name, SLE_STR, 0, 84, SL_MAX_VERSION), - SLE_VAR(Town, flags12, SLE_UINT8), + SLE_VAR(Town, flags, SLE_UINT8), SLE_CONDVAR(Town, statues, SLE_FILE_U8 | SLE_VAR_U16, 0, 103), SLE_CONDVAR(Town, statues, SLE_UINT16, 104, SL_MAX_VERSION), diff --git a/src/town.h b/src/town.h index d1658b2b8..0f34d1fd3 100644 --- a/src/town.h +++ b/src/town.h @@ -123,7 +123,7 @@ struct Town : TownPool::PoolItem<&_town_pool> { * bit 0 = Building funds received * bit 1 = CHURCH * bit 2 = STADIUM */ - byte flags12; + byte flags; /* level of noise that all the airports are generating */ uint16 noise_reached; @@ -272,11 +272,11 @@ static const byte TOWN_GROWTH_FREQUENCY = 70; * construction. */ static const byte TOWN_HOUSE_COMPLETED = 3; -/** This enum is used in conjonction with town->flags12. +/** This enum is used in conjonction with town->flags. * IT simply states what bit is used for. * It is pretty unrealistic (IMHO) to only have one church/stadium * per town, NO MATTER the population of it. - * And there are 5 more bits available on flags12... + * And there are 5 more bits available on flags... */ enum { TOWN_IS_FUNDED = 0, ///< Town has received some funds for diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp index 6bf8c7941..74bfd5e82 100644 --- a/src/town_cmd.cpp +++ b/src/town_cmd.cpp @@ -488,7 +488,7 @@ static void TileLoop_Town(TileIndex tile) _current_company = OWNER_TOWN; if ((hs->building_flags & BUILDING_HAS_1_TILE) && - HasBit(t->flags12, TOWN_IS_FUNDED) && + HasBit(t->flags, TOWN_IS_FUNDED) && CanDeleteHouse(tile) && GetHouseAge(tile) >= hs->minimum_life && --t->time_until_rebuild == 0) { @@ -656,7 +656,7 @@ static bool GrowTown(Town *t); static void TownTickHandler(Town *t) { - if (HasBit(t->flags12, TOWN_IS_FUNDED)) { + if (HasBit(t->flags, TOWN_IS_FUNDED)) { int i = t->grow_counter - 1; if (i < 0) { if (GrowTown(t)) { @@ -1460,7 +1460,7 @@ static void DoCreateTown(Town *t, TileIndex tile, uint32 townnameparts, TownSize t->num_houses = 0; t->time_until_rebuild = 10; UpdateTownRadius(t); - t->flags12 = 0; + t->flags = 0; t->population = 0; t->grow_counter = 0; t->growth_rate = 250; @@ -2121,7 +2121,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile) SetBit(oneof, TOWN_HAS_STADIUM); } - if (t->flags12 & oneof) continue; + if (t->flags & oneof) continue; /* Make sure there is no slope? */ bool noslope = (hs->building_flags & TILE_NOT_SLOPED) != 0; @@ -2146,7 +2146,7 @@ static bool BuildTownHouse(Town *t, TileIndex tile) t->num_houses++; /* Special houses that there can be only one of. */ - t->flags12 |= oneof; + t->flags |= oneof; byte construction_counter = 0; byte construction_stage = 0; @@ -2233,9 +2233,9 @@ void ClearTownHouse(Town *t, TileIndex tile) /* Clear flags for houses that only may exist once/town. */ if (hs->building_flags & BUILDING_IS_CHURCH) { - ClrBit(t->flags12, TOWN_HAS_CHURCH); + ClrBit(t->flags, TOWN_HAS_CHURCH); } else if (hs->building_flags & BUILDING_IS_STADIUM) { - ClrBit(t->flags12, TOWN_HAS_STADIUM); + ClrBit(t->flags, TOWN_HAS_STADIUM); } /* Do the actual clearing of tiles */ @@ -2404,7 +2404,7 @@ static void TownActionFundBuildings(Town *t) /* Build next tick */ t->grow_counter = 1; /* If we were not already growing */ - SetBit(t->flags12, TOWN_IS_FUNDED); + SetBit(t->flags, TOWN_IS_FUNDED); /* And grow for 3 months */ t->fund_buildings_months = 3; } @@ -2591,7 +2591,7 @@ static void UpdateTownGrowRate(Town *t) InvalidateWindow(WC_TOWN_AUTHORITY, t->index); - ClrBit(t->flags12, TOWN_IS_FUNDED); + ClrBit(t->flags, TOWN_IS_FUNDED); if (_settings_game.economy.town_growth_rate == 0 && t->fund_buildings_months == 0) return; /** Towns are processed every TOWN_GROWTH_FREQUENCY ticks, and this is the @@ -2630,7 +2630,7 @@ static void UpdateTownGrowRate(Town *t) if (m <= t->grow_counter) t->grow_counter = m; - SetBit(t->flags12, TOWN_IS_FUNDED); + SetBit(t->flags, TOWN_IS_FUNDED); } static void UpdateTownAmounts(Town *t) |