|
@@ -9,24 +9,25 @@
|
|
|
|
|
|
#include "stdafx.h"
|
|
|
#include "gui.h"
|
|
|
#include "window_gui.h"
|
|
|
#include "window_func.h"
|
|
|
#include "viewport_func.h"
|
|
|
#include "command_func.h"
|
|
|
#include "vehicle_gui.h"
|
|
|
#include "rail_gui.h"
|
|
|
#include "road.h"
|
|
|
#include "road_gui.h"
|
|
|
#include "date_func.h"
|
|
|
#include "timer/timer_game_calendar.h"
|
|
|
#include "vehicle_func.h"
|
|
|
#include "sound_func.h"
|
|
|
#include "terraform_gui.h"
|
|
|
#include "strings_func.h"
|
|
|
#include "company_func.h"
|
|
|
#include "company_gui.h"
|
|
|
#include "vehicle_base.h"
|
|
|
#include "cheat_func.h"
|
|
|
#include "transparency_gui.h"
|
|
|
#include "screenshot.h"
|
|
|
#include "signs_func.h"
|
|
|
#include "fios.h"
|
|
@@ -1135,28 +1136,28 @@ void ToggleDirtyBlocks()
|
|
|
extern bool _draw_dirty_blocks;
|
|
|
/* Always allow to toggle them off */
|
|
|
if (_settings_client.gui.newgrf_developer_tools || _draw_dirty_blocks) {
|
|
|
_draw_dirty_blocks = !_draw_dirty_blocks;
|
|
|
MarkWholeScreenDirty();
|
|
|
}
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Set the starting year for a scenario.
|
|
|
* @param year New starting year.
|
|
|
*/
|
|
|
void SetStartingYear(Year year)
|
|
|
void SetStartingYear(TimerGameCalendar::Year year)
|
|
|
{
|
|
|
_settings_game.game_creation.starting_year = Clamp(year, MIN_YEAR, MAX_YEAR);
|
|
|
Date new_date = ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1);
|
|
|
TimerGameCalendar::Date new_date = ConvertYMDToDate(_settings_game.game_creation.starting_year, 0, 1);
|
|
|
/* If you open a savegame as scenario there may already be link graphs.*/
|
|
|
LinkGraphSchedule::instance.ShiftDates(new_date - TimerGameCalendar::date);
|
|
|
TimerGameCalendar::SetDate(new_date, 0);
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* Choose the proper callback function for the main toolbar's help menu.
|
|
|
* @param index The menu index which was selected.
|
|
|
* @return CBF_NONE
|
|
|
*/
|
|
|
static CallBackFunction MenuClickHelp(int index)
|
|
|
{
|