tron@2186: /* $Id$ */ tron@2186: belugas@6919: /** @file variables.h */ belugas@6919: truelight@0: #ifndef VARIABLES_H truelight@0: #define VARIABLES_H truelight@0: rubidium@8634: #include "tile_type.h" rubidium@8634: #include "strings_type.h" truelight@0: belugas@6919: /* Amount of game ticks */ truelight@0: VARDEF uint16 _tick_counter; truelight@0: belugas@6919: /* Skip aging of cargo? */ truelight@0: VARDEF byte _age_cargo_skip_counter; truelight@0: belugas@6919: /* Position in tile loop */ truelight@0: VARDEF TileIndex _cur_tileloop_tile; truelight@0: belugas@6919: /* Also save scrollpos_x, scrollpos_y and zoom */ truelight@0: VARDEF uint16 _disaster_delay; truelight@0: belugas@6919: /* Determines what station to operate on in the belugas@6919: * tick handler. */ truelight@0: VARDEF uint16 _station_tick_ctr; truelight@0: belugas@6919: /* Iterator through all towns in OnTick_Town */ pasky@1517: VARDEF uint32 _cur_town_ctr; belugas@6919: /* Frequency iterator at the same place */ pasky@1529: VARDEF uint32 _cur_town_iter; truelight@0: truelight@0: VARDEF uint _cur_player_tick_index; truelight@0: VARDEF uint _next_competitor_start; truelight@0: belugas@6919: /* Determines how often to run the tree loop */ truelight@0: VARDEF byte _trees_tick_ctr; truelight@0: belugas@6919: /* Keep track of current game position */ truelight@0: VARDEF int _saved_scrollpos_x; truelight@0: VARDEF int _saved_scrollpos_y; truelight@0: rubidium@6574: struct Cheat { bjarni@4237: bool been_used; // has this cheat been used before? bjarni@4237: bool value; // tells if the bool cheat is active or not rubidium@6574: }; truelight@0: truelight@0: belugas@6919: /* WARNING! Do _not_ remove entries in Cheats struct or change the order belugas@6919: * of the existing ones! Would break downward compatibility. belugas@6919: * Only add new entries at the end of the struct! */ truelight@0: rubidium@6574: struct Cheats { rubidium@4344: Cheat magic_bulldozer; // dynamite industries, unmovables rubidium@4344: Cheat switch_player; // change to another player rubidium@4344: Cheat money; // get rich rubidium@4344: Cheat crossing_tunnels; // allow tunnels that cross each other rubidium@4344: Cheat build_in_pause; // build while in pause mode rubidium@4344: Cheat no_jetcrash; // no jet will crash on small airports anymore dominik@100: Cheat switch_climate; rubidium@4344: Cheat change_date; // changes date ingame rubidium@4344: Cheat setup_prod; // setup raw-material production in game KUDr@5116: Cheat dummy; // empty cheat (enable running el-engines on normal rail) rubidium@6574: }; truelight@0: truelight@0: VARDEF Cheats _cheats; truelight@0: belugas@6919: /* NOSAVE: Used in palette animations only, not really important. */ truelight@7514: VARDEF int _palette_animation_counter; truelight@0: truelight@0: signde@206: VARDEF uint32 _frame_counter; truelight@7514: VARDEF uint32 _realtime_tick; truelight@0: truelight@2422: VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..) truelight@0: truelight@0: VARDEF bool _do_autosave; truelight@0: VARDEF int _autosave_ctr; truelight@0: truelight@0: VARDEF byte _display_opt; truelight@0: VARDEF int _caret_timer; truelight@0: truelight@0: VARDEF bool _rightclick_emulate; truelight@0: belugas@6919: /* IN/OUT parameters to commands */ tron@1977: VARDEF TileIndex _build_tunnel_endtile; truelight@0: VARDEF bool _generating_world; truelight@0: belugas@6919: /* Used when switching from the intro menu. */ truelight@0: VARDEF byte _switch_mode; darkvater@172: VARDEF StringID _switch_mode_errorstr; truelight@0: truelight@0: VARDEF char _savegame_format[8]; truelight@0: truelight@0: VARDEF char *_config_file; darkvater@983: VARDEF char *_highscore_file; truelight@704: VARDEF char *_log_file; truelight@0: belugas@6919: /* landscape.cpp */ truelight@0: extern const byte _tileh_to_sprite[32]; truelight@0: rubidium@8139: extern bool _draw_bounding_boxes; rubidium@8139: truelight@0: /* misc */ truelight@0: VARDEF char _screenshot_name[128]; truelight@0: VARDEF byte _vehicle_design_names; truelight@0: truelight@704: /* Forking stuff */ truelight@704: VARDEF bool _dedicated_forks; truelight@704: truelight@0: #endif /* VARIABLES_H */