Codechange: Define Date/Year/Month/Day within TimerGameCalendar class

This commit is contained in:
Tyler Trahan
2023-04-24 14:33:18 -04:00
parent 20d2558f1b
commit 930f0a16d8
68 changed files with 216 additions and 182 deletions

View File

@@ -256,7 +256,7 @@ void SerializeNetworkGameInfo(Packet *p, const NetworkServerGameInfo *info, bool
*/
void DeserializeNetworkGameInfo(Packet *p, NetworkGameInfo *info, const GameInfoNewGRFLookupTable *newgrf_lookup_table)
{
static const Date MAX_DATE = ConvertYMDToDate(MAX_YEAR, 11, 31); // December is month 11
static const TimerGameCalendar::Date MAX_DATE = ConvertYMDToDate(MAX_YEAR, 11, 31); // December is month 11
byte game_info_version = p->Recv_uint8();
NewGRFSerializationType newgrf_serialisation = NST_GRFID_MD5;

View File

@@ -15,7 +15,7 @@
#include "config.h"
#include "core.h"
#include "../../newgrf_config.h"
#include "../../date_type.h"
#include "../../timer/timer_game_calendar.h"
#include <unordered_map>
@@ -92,8 +92,8 @@ enum NewGRFSerializationType {
*/
struct NetworkServerGameInfo {
GRFConfig *grfconfig; ///< List of NewGRF files used
Date start_date; ///< When the game started
Date game_date; ///< Current date
TimerGameCalendar::Date start_date; ///< When the game started
TimerGameCalendar::Date game_date; ///< Current date
uint16 map_width; ///< Map width
uint16 map_height; ///< Map height
std::string server_name; ///< Server name