author | rubidium |
Sun, 13 Jan 2008 14:37:30 +0000 | |
changeset 8270 | e7c342f6b14c |
parent 8254 | 1496654ca5e7 |
child 8275 | f17d0c863ee3 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
3 |
/** @file variables.h */ |
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
4 |
|
0 | 5 |
#ifndef VARIABLES_H |
6 |
#define VARIABLES_H |
|
7 |
||
8138
dbfdc08fa6b9
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8121
diff
changeset
|
8 |
#include "tile_type.h" |
dbfdc08fa6b9
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8121
diff
changeset
|
9 |
#include "strings_type.h" |
0 | 10 |
|
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
11 |
/* Amount of game ticks */ |
0 | 12 |
VARDEF uint16 _tick_counter; |
13 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
14 |
/* Skip aging of cargo? */ |
0 | 15 |
VARDEF byte _age_cargo_skip_counter; |
16 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
17 |
/* Position in tile loop */ |
0 | 18 |
VARDEF TileIndex _cur_tileloop_tile; |
19 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
20 |
/* Also save scrollpos_x, scrollpos_y and zoom */ |
0 | 21 |
VARDEF uint16 _disaster_delay; |
22 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
23 |
/* Determines what station to operate on in the |
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
24 |
* tick handler. */ |
0 | 25 |
VARDEF uint16 _station_tick_ctr; |
26 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
27 |
/* Iterator through all towns in OnTick_Town */ |
1517
596d52828893
(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; |
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
29 |
/* Frequency iterator at the same place */ |
1529
3a8196d15b01
(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 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
35 |
/* Determines how often to run the tree loop */ |
0 | 36 |
VARDEF byte _trees_tick_ctr; |
37 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
38 |
/* Keep track of current game position */ |
0 | 39 |
VARDEF int _saved_scrollpos_x; |
40 |
VARDEF int _saved_scrollpos_y; |
|
41 |
||
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6091
diff
changeset
|
42 |
struct Cheat { |
4237
7097574bc219
(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? |
7097574bc219
(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 |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6091
diff
changeset
|
45 |
}; |
0 | 46 |
|
47 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
48 |
/* WARNING! Do _not_ remove entries in Cheats struct or change the order |
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
49 |
* of the existing ones! Would break downward compatibility. |
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
50 |
* Only add new entries at the end of the struct! */ |
0 | 51 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6091
diff
changeset
|
52 |
struct Cheats { |
4344
7e123fec5b0b
(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 |
7e123fec5b0b
(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 |
7e123fec5b0b
(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 |
7e123fec5b0b
(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 |
7e123fec5b0b
(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 |
7e123fec5b0b
(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
7e123fec5b0b
(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 |
7e123fec5b0b
(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
3c0c3da214ca
(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) |
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6091
diff
changeset
|
63 |
}; |
0 | 64 |
|
65 |
VARDEF Cheats _cheats; |
|
66 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
67 |
/* NOSAVE: Used in palette animations only, not really important. */ |
7018
71e174292e42
(svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
truelight
parents:
7002
diff
changeset
|
68 |
VARDEF int _palette_animation_counter; |
0 | 69 |
|
70 |
||
206 | 71 |
VARDEF uint32 _frame_counter; |
7018
71e174292e42
(svn r10276) -Codechange: made a counter based on milliseconds and independent of the game-state to base double-click and TGP Generation Process on
truelight
parents:
7002
diff
changeset
|
72 |
VARDEF uint32 _realtime_tick; |
0 | 73 |
|
2422
897a01f7c624
(svn r2948) -Fix: the old AI needs a special flag that triggers all kind of special
truelight
parents:
2304
diff
changeset
|
74 |
VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..) |
0 | 75 |
|
76 |
VARDEF bool _do_autosave; |
|
77 |
VARDEF int _autosave_ctr; |
|
78 |
||
79 |
VARDEF byte _display_opt; |
|
80 |
VARDEF int _caret_timer; |
|
81 |
||
82 |
VARDEF StringID _error_message; |
|
83 |
||
84 |
VARDEF bool _rightclick_emulate; |
|
85 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
86 |
/* IN/OUT parameters to commands */ |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1958
diff
changeset
|
87 |
VARDEF TileIndex _build_tunnel_endtile; |
0 | 88 |
VARDEF bool _generating_world; |
89 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
90 |
/* Used when switching from the intro menu. */ |
0 | 91 |
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
|
92 |
VARDEF StringID _switch_mode_errorstr; |
0 | 93 |
|
7567
ab5661f127f8
(svn r11092) -Add: allow 'blitter=<value>' in openttd.cfg to set the blitter (so you don't have to keep on doing 'openttd -b 32bpp-optimized'..)
truelight
parents:
7547
diff
changeset
|
94 |
VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32], _ini_blitter[32]; |
0 | 95 |
|
96 |
VARDEF int _num_resolutions; |
|
97 |
VARDEF uint16 _resolutions[32][2]; |
|
98 |
VARDEF uint16 _cur_resolution[2]; |
|
99 |
||
100 |
VARDEF char _savegame_format[8]; |
|
101 |
||
102 |
VARDEF char *_config_file; |
|
983
4765bf636f6b
(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
|
103 |
VARDEF char *_highscore_file; |
704
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
104 |
VARDEF char *_log_file; |
0 | 105 |
|
106 |
||
6423
8e10e79e0fd1
(svn r9559) -Documentation: doxygen and comment changes: 'U' and 'V' now. Almost done. Yeah. I know, I've already said that...
belugas
parents:
6344
diff
changeset
|
107 |
/* landscape.cpp */ |
0 | 108 |
extern const byte _tileh_to_sprite[32]; |
109 |
||
7643
af32b07bc027
(svn r11174) -Codechange: add possibility to show the bounding boxes of sprites using CTRL-B so one can get a better understanding of the used bounding boxes to fix the glitches that still exist. Patch by frosch.
rubidium
parents:
7641
diff
changeset
|
110 |
extern bool _draw_bounding_boxes; |
af32b07bc027
(svn r11174) -Codechange: add possibility to show the bounding boxes of sprites using CTRL-B so one can get a better understanding of the used bounding boxes to fix the glitches that still exist. Patch by frosch.
rubidium
parents:
7641
diff
changeset
|
111 |
|
0 | 112 |
/* misc */ |
113 |
VARDEF char _screenshot_name[128]; |
|
114 |
VARDEF byte _vehicle_design_names; |
|
115 |
||
704
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
116 |
/* Forking stuff */ |
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
117 |
VARDEF bool _dedicated_forks; |
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
118 |
|
0 | 119 |
#endif /* VARIABLES_H */ |