|
|
#ifndef VARIABLES_H
|
|
|
#define VARIABLES_H
|
|
|
|
|
|
#include "player.h"
|
|
|
|
|
|
// ********* START OF SAVE REGION
|
|
|
#if !defined(MAX_PATH)
|
|
|
# define MAX_PATH 260
|
|
|
#endif
|
|
|
|
|
|
// Prices and also the fractional part.
|
|
|
VARDEF Prices _price;
|
|
|
VARDEF uint16 _price_frac[NUM_PRICES];
|
|
|
|
|
|
VARDEF uint32 _cargo_payment_rates[NUM_CARGO];
|
|
|
VARDEF uint16 _cargo_payment_rates_frac[NUM_CARGO];
|
|
|
|
|
|
typedef struct {
|
|
|
GameDifficulty diff;
|
|
|
byte diff_level;
|
|
|
byte currency;
|
|
|
bool kilometers;
|
|
|
byte town_name;
|
|
|
byte landscape;
|
|
|
byte snow_line;
|
|
|
byte autosave;
|
|
|
byte road_side;
|
|
|
} GameOptions;
|
|
|
|
|
@@ -244,73 +242,69 @@ typedef struct Cheats {
|
|
|
VARDEF Cheats _cheats;
|
|
|
|
|
|
typedef struct Paths {
|
|
|
char *personal_dir; // includes cfg file and save folder
|
|
|
char *game_data_dir; // includes data, gm, lang
|
|
|
char *data_dir;
|
|
|
char *gm_dir;
|
|
|
char *lang_dir;
|
|
|
char *save_dir;
|
|
|
char *autosave_dir;
|
|
|
char *scenario_dir;
|
|
|
char *second_data_dir;
|
|
|
} Paths;
|
|
|
|
|
|
VARDEF Paths _path;
|
|
|
|
|
|
// NOSAVE: Used in palette animations only, not really important.
|
|
|
VARDEF int _timer_counter;
|
|
|
|
|
|
|
|
|
// NOSAVE: can be determined from _date
|
|
|
VARDEF byte _cur_year;
|
|
|
VARDEF byte _cur_month;
|
|
|
|
|
|
// NOSAVE: can be determined from player structs
|
|
|
VARDEF byte _player_colors[MAX_PLAYERS];
|
|
|
|
|
|
VARDEF bool _in_state_game_loop;
|
|
|
VARDEF uint32 _frame_counter;
|
|
|
|
|
|
VARDEF bool _is_ai_player; // current player is an AI player? - Can be removed if new AI is done
|
|
|
|
|
|
VARDEF bool _do_autosave;
|
|
|
VARDEF int _autosave_ctr;
|
|
|
|
|
|
VARDEF PlayerID _local_player;
|
|
|
VARDEF byte _display_opt;
|
|
|
VARDEF byte _pause;
|
|
|
VARDEF int _caret_timer;
|
|
|
VARDEF uint32 _news_display_opt;
|
|
|
VARDEF bool _news_ticker_sound;
|
|
|
VARDEF byte _game_mode;
|
|
|
|
|
|
VARDEF StringID _error_message;
|
|
|
VARDEF StringID _error_message_2;
|
|
|
VARDEF int32 _additional_cash_required;
|
|
|
|
|
|
VARDEF uint32 _decode_parameters[20];
|
|
|
VARDEF PlayerID _current_player;
|
|
|
|
|
|
VARDEF int _docommand_recursive;
|
|
|
|
|
|
VARDEF uint32 _pressed_key; // Low 8 bits = ASCII, High 16 bits = keycode
|
|
|
VARDEF bool _ctrl_pressed; // Is Ctrl pressed?
|
|
|
VARDEF bool _shift_pressed; // Is Alt pressed?
|
|
|
VARDEF byte _dirkeys; // 1=left, 2=up, 4=right, 8=down
|
|
|
|
|
|
VARDEF bool _fullscreen;
|
|
|
VARDEF bool _double_size;
|
|
|
VARDEF uint _display_hz;
|
|
|
VARDEF bool _force_full_redraw;
|
|
|
VARDEF uint _fullscreen_bpp;
|
|
|
VARDEF bool _fast_forward;
|
|
|
VARDEF bool _rightclick_emulate;
|
|
|
|
|
|
// IN/OUT parameters to commands
|
|
|
VARDEF byte _yearly_expenses_type;
|
|
|
VARDEF TileIndex _terraform_err_tile;
|
|
|
VARDEF TileIndex _build_tunnel_endtile;
|
|
|
VARDEF bool _generating_world;
|
|
|
VARDEF int _new_town_size;
|
|
|
VARDEF uint _returned_refit_amount;
|
|
|
|