Codechange: Move Ticks into their own class
This commit is contained in:
@@ -11,6 +11,7 @@
|
||||
#include "debug.h"
|
||||
#include "town.h"
|
||||
#include "newgrf_town.h"
|
||||
#include "timer/timer_game_tick.h"
|
||||
|
||||
#include "safeguards.h"
|
||||
|
||||
@@ -47,7 +48,7 @@
|
||||
case 0x81: return GB(static_cast<uint32_t>(this->t->xy), 8, 8);
|
||||
case 0x82: return ClampTo<uint16_t>(this->t->cache.population);
|
||||
case 0x83: return GB(ClampTo<uint16_t>(this->t->cache.population), 8, 8);
|
||||
case 0x8A: return this->t->grow_counter / TOWN_GROWTH_TICKS;
|
||||
case 0x8A: return this->t->grow_counter / Ticks::TOWN_GROWTH_TICKS;
|
||||
case 0x92: return this->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 ClampTo<uint16_t>(this->t->cache.squared_town_zone_radius[0]);
|
||||
@@ -79,7 +80,7 @@
|
||||
case 0xAE: return this->t->have_ratings;
|
||||
case 0xB2: return this->t->statues;
|
||||
case 0xB6: return ClampTo<uint16_t>(this->t->cache.num_houses);
|
||||
case 0xB9: return this->t->growth_rate / TOWN_GROWTH_TICKS;
|
||||
case 0xB9: return this->t->growth_rate / Ticks::TOWN_GROWTH_TICKS;
|
||||
case 0xBA: return ClampTo<uint16_t>(this->t->supplied[CT_PASSENGERS].new_max);
|
||||
case 0xBB: return GB(ClampTo<uint16_t>(this->t->supplied[CT_PASSENGERS].new_max), 8, 8);
|
||||
case 0xBC: return ClampTo<uint16_t>(this->t->supplied[CT_MAIL].new_max);
|
||||
|
||||
Reference in New Issue
Block a user