# variables.h

Go to the documentation of this file.

    00001 /* $Id: variables.h 11839 2008-01-13 21:41:24Z rubidium $ */
    00002
    00005 #ifndef VARIABLES_H
    00006 #define VARIABLES_H
    00007
    00008 #include "tile_type.h"
    00009 #include "strings_type.h"
    00010
    00011 /* Amount of game ticks */
    00012 VARDEF uint16 _tick_counter;
    00013
    00014 /* Skip aging of cargo? */
    00015 VARDEF byte _age_cargo_skip_counter;
    00016
    00017 /* Position in tile loop */
    00018 VARDEF TileIndex _cur_tileloop_tile;
    00019
    00020 /* Also save scrollpos_x, scrollpos_y and zoom */
    00021 VARDEF uint16 _disaster_delay;
    00022
    00023 /* Determines what station to operate on in the
    00024  *  tick handler. */
    00025 VARDEF uint16 _station_tick_ctr;
    00026
    00027 /* Iterator through all towns in OnTick_Town */
    00028 VARDEF uint32 _cur_town_ctr;
    00029 /* Frequency iterator at the same place */
    00030 VARDEF uint32 _cur_town_iter;
    00031
    00032 VARDEF uint _cur_player_tick_index;
    00033 VARDEF uint _next_competitor_start;
    00034
    00035 /* Determines how often to run the tree loop */
    00036 VARDEF byte _trees_tick_ctr;
    00037
    00038 /* Keep track of current game position */
    00039 VARDEF int _saved_scrollpos_x;
    00040 VARDEF int _saved_scrollpos_y;
    00041
    00042 struct Cheat {
    00043   bool been_used; // has this cheat been used before?
    00044   bool value;     // tells if the bool cheat is active or not
    00045 };
    00046
    00047
    00048 /* WARNING! Do _not_ remove entries in Cheats struct or change the order
    00049  * of the existing ones! Would break downward compatibility.
    00050  * Only add new entries at the end of the struct! */
    00051
    00052 struct Cheats {
    00053   Cheat magic_bulldozer;  // dynamite industries, unmovables
    00054   Cheat switch_player;    // change to another player
    00055   Cheat money;            // get rich
    00056   Cheat crossing_tunnels; // allow tunnels that cross each other
    00057   Cheat build_in_pause;   // build while in pause mode
    00058   Cheat no_jetcrash;      // no jet will crash on small airports anymore
    00059   Cheat switch_climate;
    00060   Cheat change_date;      // changes date ingame
    00061   Cheat setup_prod;       // setup raw-material production in game
    00062   Cheat dummy;            // empty cheat (enable running el-engines on normal rail)
    00063 };
    00064
    00065 VARDEF Cheats _cheats;
    00066
    00067 /* NOSAVE: Used in palette animations only, not really important. */
    00068 VARDEF int _palette_animation_counter;
    00069
    00070
    00071 VARDEF uint32 _frame_counter;
    00072 VARDEF uint32 _realtime_tick;
    00073
    00074 VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..)
    00075
    00076 VARDEF bool _do_autosave;
    00077 VARDEF int _autosave_ctr;
    00078
    00079 VARDEF byte _display_opt;
    00080 VARDEF int _caret_timer;
    00081
    00082 VARDEF bool _rightclick_emulate;
    00083
    00084 /* IN/OUT parameters to commands */
    00085 VARDEF TileIndex _build_tunnel_endtile;
    00086 VARDEF bool _generating_world;
    00087
    00088 /* Used when switching from the intro menu. */
    00089 VARDEF byte _switch_mode;
    00090 VARDEF StringID _switch_mode_errorstr;
    00091
    00092 VARDEF char _savegame_format[8];
    00093
    00094 VARDEF char *_config_file;
    00095 VARDEF char *_highscore_file;
    00096 VARDEF char *_log_file;
    00097
    00098 /* landscape.cpp */
    00099 extern const byte _tileh_to_sprite[32];
    00100
    00101 extern bool _draw_bounding_boxes;
    00102
    00103 /* misc */
    00104 VARDEF char _screenshot_name[128];
    00105 VARDEF byte _vehicle_design_names;
    00106
    00107 /* Forking stuff */
    00108 VARDEF bool _dedicated_forks;
    00109
    00110 #endif /* VARIABLES_H */