| author | truebrain |
| Mon, 31 Mar 2008 09:25:03 +0000 | |
| branch | noai |
| changeset 9841 | f931a10242c9 |
| parent 9724 | b39bc69bb2f2 |
| child 10249 | 58810805030e |
| permissions | -rw-r--r-- |
| 2186 | 1 |
/* $Id$ */ |
2 |
||
| 9574 | 3 |
/** @file variables.h */ |
4 |
||
| 0 | 5 |
#ifndef VARIABLES_H |
6 |
#define VARIABLES_H |
|
7 |
||
|
9723
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9722
diff
changeset
|
8 |
#include "tile_type.h" |
|
eee46cb39750
(svn r11796) [NoAI] -Sync: with trunk r11502:11795.
rubidium
parents:
9722
diff
changeset
|
9 |
#include "strings_type.h" |
| 0 | 10 |
|
| 9574 | 11 |
/* Amount of game ticks */ |
| 0 | 12 |
VARDEF uint16 _tick_counter; |
13 |
||
| 9574 | 14 |
/* Skip aging of cargo? */ |
| 0 | 15 |
VARDEF byte _age_cargo_skip_counter; |
16 |
||
| 9574 | 17 |
/* Position in tile loop */ |
| 0 | 18 |
VARDEF TileIndex _cur_tileloop_tile; |
19 |
||
| 9574 | 20 |
/* Also save scrollpos_x, scrollpos_y and zoom */ |
| 0 | 21 |
VARDEF uint16 _disaster_delay; |
22 |
||
| 9574 | 23 |
/* Determines what station to operate on in the |
24 |
* tick handler. */ |
|
| 0 | 25 |
VARDEF uint16 _station_tick_ctr; |
26 |
||
| 9574 | 27 |
/* Iterator through all towns in OnTick_Town */ |
|
1517
b77361b13ae4
(svn r2021) Fix: Enlarge _cur_town_ctr from byte to uint32 so that all the towns are considered when growing them even for big maps, where much more than 256 towns are around; reported by Tomasz Dubi?ski <uboottd@hydra.polsl.gliwice.pl>. The savegame still saves just the lowest 8 bits but that doesn't hurt so much.
pasky
parents:
1500
diff
changeset
|
28 |
VARDEF uint32 _cur_town_ctr; |
| 9574 | 29 |
/* Frequency iterator at the same place */ |
|
1529
be4a2259d2ff
(svn r2033) - Fix: Fix some more desync by saving the town growth frequency iterator _cur_town_iter. Needed to bump a svg revision for that thanks to the braindead SlGlob thing, or at least I don't know how to do it without bumping it.
pasky
parents:
1517
diff
changeset
|
30 |
VARDEF uint32 _cur_town_iter; |
| 0 | 31 |
|
32 |
VARDEF uint _cur_player_tick_index; |
|
33 |
VARDEF uint _next_competitor_start; |
|
34 |
||
| 9574 | 35 |
/* Determines how often to run the tree loop */ |
| 0 | 36 |
VARDEF byte _trees_tick_ctr; |
37 |
||
| 9574 | 38 |
/* Keep track of current game position */ |
| 0 | 39 |
VARDEF int _saved_scrollpos_x; |
40 |
VARDEF int _saved_scrollpos_y; |
|
41 |
||
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6417
diff
changeset
|
42 |
struct Cheat {
|
|
4237
d10d168c4d48
(svn r5805) -Fix: FS#189 Boolean cheats do not work
bjarni
parents:
4184
diff
changeset
|
43 |
bool been_used; // has this cheat been used before? |
|
d10d168c4d48
(svn r5805) -Fix: FS#189 Boolean cheats do not work
bjarni
parents:
4184
diff
changeset
|
44 |
bool value; // tells if the bool cheat is active or not |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6417
diff
changeset
|
45 |
}; |
| 0 | 46 |
|
47 |
||
| 9574 | 48 |
/* WARNING! Do _not_ remove entries in Cheats struct or change the order |
49 |
* of the existing ones! Would break downward compatibility. |
|
50 |
* Only add new entries at the end of the struct! */ |
|
| 0 | 51 |
|
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6417
diff
changeset
|
52 |
struct Cheats {
|
|
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
53 |
Cheat magic_bulldozer; // dynamite industries, unmovables |
|
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
54 |
Cheat switch_player; // change to another player |
|
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
55 |
Cheat money; // get rich |
|
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
56 |
Cheat crossing_tunnels; // allow tunnels that cross each other |
|
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
57 |
Cheat build_in_pause; // build while in pause mode |
|
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
58 |
Cheat no_jetcrash; // no jet will crash on small airports anymore |
| 100 | 59 |
Cheat switch_climate; |
|
4344
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
60 |
Cheat change_date; // changes date ingame |
|
5d0e40cd67b9
(svn r6045) -Cleanup: align all table-like structures using spaces, i.e. whitespace fixes only except for a few comments to make them uniform for the whole enum/struct.
rubidium
parents:
4300
diff
changeset
|
61 |
Cheat setup_prod; // setup raw-material production in game |
|
5116
2a33a74925c5
(svn r7195) -Feature: [FS#297, optional elrails] New patches/vehicles option 'disable electrified railways'.
KUDr
parents:
5108
diff
changeset
|
62 |
Cheat dummy; // empty cheat (enable running el-engines on normal rail) |
|
6574
e1d1a12faaf7
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6417
diff
changeset
|
63 |
}; |
| 0 | 64 |
|
65 |
VARDEF Cheats _cheats; |
|
66 |
||
| 9574 | 67 |
/* NOSAVE: Used in palette animations only, not really important. */ |
| 9629 | 68 |
VARDEF int _palette_animation_counter; |
| 0 | 69 |
|
70 |
||
| 206 | 71 |
VARDEF uint32 _frame_counter; |
| 9629 | 72 |
VARDEF uint32 _realtime_tick; |
| 0 | 73 |
|
74 |
VARDEF bool _do_autosave; |
|
75 |
VARDEF int _autosave_ctr; |
|
76 |
||
77 |
VARDEF byte _display_opt; |
|
78 |
VARDEF int _caret_timer; |
|
79 |
||
80 |
VARDEF bool _rightclick_emulate; |
|
81 |
||
| 9574 | 82 |
/* IN/OUT parameters to commands */ |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1958
diff
changeset
|
83 |
VARDEF TileIndex _build_tunnel_endtile; |
| 0 | 84 |
VARDEF bool _generating_world; |
85 |
||
| 9574 | 86 |
/* Used when switching from the intro menu. */ |
| 0 | 87 |
VARDEF byte _switch_mode; |
|
172
8d8b3383470d
(svn r173) -Network: [1023231] Debug Code + ErrorBoxes + Load Game/Scenario. Added some more desync debug code and replaced some of the error() calls with some better error boxes. Hopefully find desyncs easier (sign_de)
darkvater
parents:
156
diff
changeset
|
88 |
VARDEF StringID _switch_mode_errorstr; |
| 0 | 89 |
|
90 |
VARDEF char _savegame_format[8]; |
|
91 |
||
92 |
VARDEF char *_config_file; |
|
|
983
1be852dcdd4c
(svn r1479) -Added highscore chart (accessible from the difficulty window) with top5 companies for a given difficulty (select the difficulty in the menu)
darkvater
parents:
930
diff
changeset
|
93 |
VARDEF char *_highscore_file; |
|
704
a526dc96fbfc
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
94 |
VARDEF char *_log_file; |
| 0 | 95 |
|
| 9574 | 96 |
/* landscape.cpp */ |
| 0 | 97 |
extern const byte _tileh_to_sprite[32]; |
98 |
||
| 9704 | 99 |
extern bool _draw_bounding_boxes; |
100 |
||
| 0 | 101 |
/* misc */ |
102 |
VARDEF char _screenshot_name[128]; |
|
103 |
VARDEF byte _vehicle_design_names; |
|
104 |
||
|
704
a526dc96fbfc
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
105 |
/* Forking stuff */ |
|
a526dc96fbfc
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
106 |
VARDEF bool _dedicated_forks; |
|
a526dc96fbfc
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
107 |
|
| 0 | 108 |
#endif /* VARIABLES_H */ |