2005-07-24 16:12:37 +02:00
|
|
|
/* $Id$ */
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/** @file variables.h */
|
|
|
|
|
2004-08-09 19:04:08 +02:00
|
|
|
#ifndef VARIABLES_H
|
|
|
|
#define VARIABLES_H
|
|
|
|
|
2007-12-26 00:42:52 +01:00
|
|
|
#include "tile_type.h"
|
|
|
|
#include "strings_type.h"
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Amount of game ticks */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF uint16 _tick_counter;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Skip aging of cargo? */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF byte _age_cargo_skip_counter;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Position in tile loop */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF TileIndex _cur_tileloop_tile;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Also save scrollpos_x, scrollpos_y and zoom */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF uint16 _disaster_delay;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Determines what station to operate on in the
|
|
|
|
* tick handler. */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF uint16 _station_tick_ctr;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Iterator through all towns in OnTick_Town */
|
2005-03-18 00:12:23 +01:00
|
|
|
VARDEF uint32 _cur_town_ctr;
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Frequency iterator at the same place */
|
2005-03-20 01:32:26 +01:00
|
|
|
VARDEF uint32 _cur_town_iter;
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
VARDEF uint _cur_player_tick_index;
|
|
|
|
VARDEF uint _next_competitor_start;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Determines how often to run the tree loop */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF byte _trees_tick_ctr;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Keep track of current game position */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF int _saved_scrollpos_x;
|
|
|
|
VARDEF int _saved_scrollpos_y;
|
|
|
|
|
2007-03-07 13:11:48 +01:00
|
|
|
struct Cheat {
|
2006-08-07 18:56:00 +02:00
|
|
|
bool been_used; // has this cheat been used before?
|
|
|
|
bool value; // tells if the bool cheat is active or not
|
2007-03-07 13:11:48 +01:00
|
|
|
};
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* WARNING! Do _not_ remove entries in Cheats struct or change the order
|
|
|
|
* of the existing ones! Would break downward compatibility.
|
|
|
|
* Only add new entries at the end of the struct! */
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2007-03-07 13:11:48 +01:00
|
|
|
struct Cheats {
|
2006-08-22 16:38:37 +02:00
|
|
|
Cheat magic_bulldozer; // dynamite industries, unmovables
|
|
|
|
Cheat switch_player; // change to another player
|
|
|
|
Cheat money; // get rich
|
|
|
|
Cheat crossing_tunnels; // allow tunnels that cross each other
|
|
|
|
Cheat build_in_pause; // build while in pause mode
|
|
|
|
Cheat no_jetcrash; // no jet will crash on small airports anymore
|
2004-08-21 15:21:09 +02:00
|
|
|
Cheat switch_climate;
|
2006-08-22 16:38:37 +02:00
|
|
|
Cheat change_date; // changes date ingame
|
|
|
|
Cheat setup_prod; // setup raw-material production in game
|
2006-11-17 20:31:44 +01:00
|
|
|
Cheat dummy; // empty cheat (enable running el-engines on normal rail)
|
2007-03-07 13:11:48 +01:00
|
|
|
};
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
VARDEF Cheats _cheats;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* NOSAVE: Used in palette animations only, not really important. */
|
2007-06-22 22:04:21 +02:00
|
|
|
VARDEF int _palette_animation_counter;
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
|
2004-09-11 21:34:11 +02:00
|
|
|
VARDEF uint32 _frame_counter;
|
2007-06-22 22:04:21 +02:00
|
|
|
VARDEF uint32 _realtime_tick;
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2005-09-13 14:19:27 +02:00
|
|
|
VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..)
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
VARDEF bool _do_autosave;
|
|
|
|
VARDEF int _autosave_ctr;
|
|
|
|
|
|
|
|
VARDEF byte _display_opt;
|
|
|
|
VARDEF int _caret_timer;
|
|
|
|
|
|
|
|
VARDEF bool _rightclick_emulate;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* IN/OUT parameters to commands */
|
2005-06-24 14:38:35 +02:00
|
|
|
VARDEF TileIndex _build_tunnel_endtile;
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF bool _generating_world;
|
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* Used when switching from the intro menu. */
|
2004-08-09 19:04:08 +02:00
|
|
|
VARDEF byte _switch_mode;
|
2004-09-07 00:46:02 +02:00
|
|
|
VARDEF StringID _switch_mode_errorstr;
|
2004-08-09 19:04:08 +02:00
|
|
|
|
|
|
|
VARDEF char _savegame_format[8];
|
|
|
|
|
|
|
|
VARDEF char *_config_file;
|
2005-01-11 01:54:06 +01:00
|
|
|
VARDEF char *_highscore_file;
|
2004-12-18 15:19:21 +01:00
|
|
|
VARDEF char *_log_file;
|
2004-08-09 19:04:08 +02:00
|
|
|
|
2007-04-04 06:08:47 +02:00
|
|
|
/* landscape.cpp */
|
2004-08-09 19:04:08 +02:00
|
|
|
extern const byte _tileh_to_sprite[32];
|
|
|
|
|
2007-09-26 21:27:29 +02:00
|
|
|
extern bool _draw_bounding_boxes;
|
|
|
|
|
2004-08-09 19:04:08 +02:00
|
|
|
/* misc */
|
|
|
|
VARDEF char _screenshot_name[128];
|
|
|
|
VARDEF byte _vehicle_design_names;
|
|
|
|
|
2004-12-18 15:19:21 +01:00
|
|
|
/* Forking stuff */
|
|
|
|
VARDEF bool _dedicated_forks;
|
|
|
|
|
2004-08-09 19:04:08 +02:00
|
|
|
#endif /* VARIABLES_H */
|