src/date.cpp
branchnoai
changeset 9641 855e32c08c9b
parent 6573 7624f942237f
child 7743 01f6ee416857
equal deleted inserted replaced
9640:494df85104a3 9641:855e32c08c9b
    11 #include "network/network.h"
    11 #include "network/network.h"
    12 #include "network/network_data.h"
    12 #include "network/network_data.h"
    13 #include "network/network_server.h"
    13 #include "network/network_server.h"
    14 #include "functions.h"
    14 #include "functions.h"
    15 #include "currency.h"
    15 #include "currency.h"
       
    16 #ifdef DEBUG_DUMP_COMMANDS
       
    17 #include "saveload.h"
       
    18 #endif
    16 
    19 
    17 Year      _cur_year;
    20 Year      _cur_year;
    18 Month     _cur_month;
    21 Month     _cur_month;
    19 Date      _date;
    22 Date      _date;
    20 DateFract _date_fract;
    23 DateFract _date_fract;
   257 	if (ymd.month == _cur_month) return;
   260 	if (ymd.month == _cur_month) return;
   258 	_cur_month = ymd.month;
   261 	_cur_month = ymd.month;
   259 
   262 
   260 	/* yes, call various monthly loops */
   263 	/* yes, call various monthly loops */
   261 	if (_game_mode != GM_MENU) {
   264 	if (_game_mode != GM_MENU) {
       
   265 #ifdef DEBUG_DUMP_COMMANDS
       
   266 		char name[MAX_PATH];
       
   267 		snprintf(name, lengthof(name), "dmp_cmds_%d.sav", _date);
       
   268 		SaveOrLoad(name, SL_SAVE, AUTOSAVE_DIR);
       
   269 		debug_dump_commands("ddc:save:%s\n", name);
       
   270 #endif /* DUMP_COMMANDS */
   262 		if (_opt.autosave != 0 && (_cur_month % _autosave_months[_opt.autosave]) == 0) {
   271 		if (_opt.autosave != 0 && (_cur_month % _autosave_months[_opt.autosave]) == 0) {
   263 			_do_autosave = true;
   272 			_do_autosave = true;
   264 			RedrawAutosave();
   273 			RedrawAutosave();
   265 		}
   274 		}
   266 
   275