summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/company_base.h3
-rw-r--r--src/company_cmd.cpp2
-rw-r--r--src/misc_gui.cpp1
-rw-r--r--src/openttd.cpp2
-rw-r--r--src/saveload/misc_sl.cpp2
-rw-r--r--src/saveload/saveload.cpp1
-rw-r--r--src/saveload/saveload.h2
-rw-r--r--src/screenshot.cpp1
-rw-r--r--src/town.h2
-rw-r--r--src/town_cmd.cpp3
-rw-r--r--src/variables.h14
11 files changed, 19 insertions, 14 deletions
diff --git a/src/company_base.h b/src/company_base.h
index 719141a07..4c053efa9 100644
--- a/src/company_base.h
+++ b/src/company_base.h
@@ -107,4 +107,7 @@ static inline byte ActiveCompanyCount()
Money CalculateCompanyValue(const Company *c);
+extern uint _next_competitor_start;
+extern uint _cur_company_tick_index;
+
#endif /* COMPANY_BASE_H */
diff --git a/src/company_cmd.cpp b/src/company_cmd.cpp
index 407abd425..afc961e7f 100644
--- a/src/company_cmd.cpp
+++ b/src/company_cmd.cpp
@@ -39,6 +39,8 @@ CompanyByte _current_company;
/* NOSAVE: can be determined from company structs */
Colours _company_colours[MAX_COMPANIES];
CompanyManagerFace _company_manager_face; ///< for company manager face storage in openttd.cfg
+uint _next_competitor_start; ///< the number of ticks before the next AI is started
+uint _cur_company_tick_index; ///< used to generate a name for one company that doesn't have a name yet per tick
DEFINE_OLD_POOL_GENERIC(Company, Company)
diff --git a/src/misc_gui.cpp b/src/misc_gui.cpp
index 6b6abb4c1..08952adea 100644
--- a/src/misc_gui.cpp
+++ b/src/misc_gui.cpp
@@ -41,6 +41,7 @@ SaveLoadDialogMode _saveload_mode;
static bool _fios_path_changed;
static bool _savegame_sort_dirty;
+int _caret_timer;
static const Widget _land_info_widgets[] = {
{ WWT_CLOSEBOX, RESIZE_NONE, COLOUR_GREY, 0, 10, 0, 13, STR_00C5, STR_018B_CLOSE_WINDOW},
diff --git a/src/openttd.cpp b/src/openttd.cpp
index 692f09698..6bea34845 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -715,6 +715,7 @@ void HandleExitGameRequest()
static void ShowScreenshotResult(bool b)
{
if (b) {
+ extern char *_screenshot_name;
SetDParamStr(0, _screenshot_name);
ShowErrorMessage(INVALID_STRING_ID, STR_031B_SCREENSHOT_SUCCESSFULLY, 0, 0);
} else {
@@ -1155,6 +1156,7 @@ void GameLoop()
IncreaseSpriteLRU();
InteractiveRandom();
+ extern int _caret_timer;
_caret_timer += 3;
_palette_animation_counter += 8;
CursorTick();
diff --git a/src/saveload/misc_sl.cpp b/src/saveload/misc_sl.cpp
index 74086f934..318f65f9d 100644
--- a/src/saveload/misc_sl.cpp
+++ b/src/saveload/misc_sl.cpp
@@ -13,6 +13,8 @@
#include "../window_func.h"
#include "../viewport_func.h"
#include "../gfx_func.h"
+#include "../company_base.h"
+#include "../town.h"
#include "saveload.h"
diff --git a/src/saveload/saveload.cpp b/src/saveload/saveload.cpp
index a7251ebd1..d93f7fe1f 100644
--- a/src/saveload/saveload.cpp
+++ b/src/saveload/saveload.cpp
@@ -45,6 +45,7 @@ SavegameType _savegame_type; ///< type of savegame we are loading
uint32 _ttdp_version; ///< version of TTDP savegame (if applicable)
uint16 _sl_version; ///< the major savegame version identifier
byte _sl_minor_version; ///< the minor savegame version, DO NOT USE!
+char _savegame_format[8]; ///< how to compress savegames
typedef void WriterProc(size_t len);
typedef size_t ReaderProc();
diff --git a/src/saveload/saveload.h b/src/saveload/saveload.h
index ad79eb907..cdfb275a8 100644
--- a/src/saveload/saveload.h
+++ b/src/saveload/saveload.h
@@ -331,4 +331,6 @@ void SlArray(void *array, size_t length, VarType conv);
void SlObject(void *object, const SaveLoad *sld);
bool SlObjectMember(void *object, const SaveLoad *sld);
+extern char _savegame_format[8];
+
#endif /* SAVELOAD_H */
diff --git a/src/screenshot.cpp b/src/screenshot.cpp
index 8d9d3b61d..b5df3d49a 100644
--- a/src/screenshot.cpp
+++ b/src/screenshot.cpp
@@ -21,6 +21,7 @@
char _screenshot_format_name[8];
uint _num_screenshot_formats;
uint _cur_screenshot_format;
+char _screenshot_name[128];
ScreenshotType current_screenshot_type;
/* called by the ScreenShot proc to generate screenshot lines. */
diff --git a/src/town.h b/src/town.h
index b7ee39e5a..169161505 100644
--- a/src/town.h
+++ b/src/town.h
@@ -347,6 +347,8 @@ Town *CalcClosestTownFromTile(TileIndex tile, uint threshold);
extern Town *_cleared_town;
extern int _cleared_town_rating;
+extern uint32 _cur_town_ctr;
+extern uint32 _cur_town_iter;
void ResetHouses();
diff --git a/src/town_cmd.cpp b/src/town_cmd.cpp
index 10d200ffd..1f7cb3938 100644
--- a/src/town_cmd.cpp
+++ b/src/town_cmd.cpp
@@ -52,6 +52,9 @@ HouseSpec _house_specs[HOUSE_MAX];
Town *_cleared_town;
int _cleared_town_rating;
+uint32 _cur_town_ctr; ///< iterator through all towns in OnTick_Town
+uint32 _cur_town_iter; ///< frequency iterator at the same place
+
/* Initialize the town-pool */
DEFINE_OLD_POOL_GENERIC(Town, Town)
diff --git a/src/variables.h b/src/variables.h
index 4ad8f9fb2..3325369dc 100644
--- a/src/variables.h
+++ b/src/variables.h
@@ -22,14 +22,6 @@ VARDEF uint16 _disaster_delay;
* tick handler. */
VARDEF uint16 _station_tick_ctr;
-/* Iterator through all towns in OnTick_Town */
-VARDEF uint32 _cur_town_ctr;
-/* Frequency iterator at the same place */
-VARDEF uint32 _cur_town_iter;
-
-VARDEF uint _cur_company_tick_index;
-VARDEF uint _next_competitor_start;
-
/* Determines how often to run the tree loop */
VARDEF byte _trees_tick_ctr;
@@ -42,15 +34,12 @@ VARDEF bool _do_autosave;
VARDEF int _autosave_ctr;
VARDEF byte _display_opt;
-VARDEF int _caret_timer;
VARDEF bool _rightclick_emulate;
/* IN/OUT parameters to commands */
VARDEF bool _generating_world;
-VARDEF char _savegame_format[8];
-
VARDEF char *_config_file;
VARDEF char *_highscore_file;
VARDEF char *_log_file;
@@ -58,9 +47,6 @@ VARDEF char *_log_file;
/* landscape.cpp */
extern const byte _tileh_to_sprite[32];
-/* misc */
-VARDEF char _screenshot_name[128];
-
/* Forking stuff */
VARDEF bool _dedicated_forks;