author | rubidium |
Mon, 07 Jan 2008 00:45:05 +0000 | |
changeset 8210 | cc873256f63a |
parent 8208 | 3d0590aa2124 |
child 8230 | 64f28fe2d5c8 |
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 |
||
8208
3d0590aa2124
(svn r11771) -Codechange: split settings.h into better separated headers.
rubidium
parents:
8151
diff
changeset
|
8 |
#include "settings_type.h" |
8138
dbfdc08fa6b9
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8121
diff
changeset
|
9 |
#include "tile_type.h" |
dbfdc08fa6b9
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8121
diff
changeset
|
10 |
#include "strings_type.h" |
0 | 11 |
|
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
|
12 |
/* Amount of game ticks */ |
0 | 13 |
VARDEF uint16 _tick_counter; |
14 |
||
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
|
15 |
/* Skip aging of cargo? */ |
0 | 16 |
VARDEF byte _age_cargo_skip_counter; |
17 |
||
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
|
18 |
/* Position in tile loop */ |
0 | 19 |
VARDEF TileIndex _cur_tileloop_tile; |
20 |
||
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
|
21 |
/* Also save scrollpos_x, scrollpos_y and zoom */ |
0 | 22 |
VARDEF uint16 _disaster_delay; |
23 |
||
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
|
24 |
/* 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
|
25 |
* tick handler. */ |
0 | 26 |
VARDEF uint16 _station_tick_ctr; |
27 |
||
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
|
28 |
/* 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
|
29 |
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
|
30 |
/* 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
|
31 |
VARDEF uint32 _cur_town_iter; |
0 | 32 |
|
33 |
VARDEF uint _cur_player_tick_index; |
|
34 |
VARDEF uint _next_competitor_start; |
|
35 |
||
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
|
36 |
/* Determines how often to run the tree loop */ |
0 | 37 |
VARDEF byte _trees_tick_ctr; |
38 |
||
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
|
39 |
/* Keep track of current game position */ |
0 | 40 |
VARDEF int _saved_scrollpos_x; |
41 |
VARDEF int _saved_scrollpos_y; |
|
42 |
||
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6091
diff
changeset
|
43 |
struct Cheat { |
4237
7097574bc219
(svn r5805) -Fix: FS#189 Boolean cheats do not work
bjarni
parents:
4184
diff
changeset
|
44 |
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
|
45 |
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
|
46 |
}; |
0 | 47 |
|
48 |
||
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
|
49 |
/* 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
|
50 |
* 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
|
51 |
* Only add new entries at the end of the struct! */ |
0 | 52 |
|
6248
e4a2ed7e5613
(svn r9051) -Codechange: typedef [enum|struct] Y {} X; -> [enum|struct] X {};
rubidium
parents:
6091
diff
changeset
|
53 |
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
|
54 |
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
|
55 |
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
|
56 |
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
|
57 |
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
|
58 |
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
|
59 |
Cheat no_jetcrash; // no jet will crash on small airports anymore |
100 | 60 |
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
|
61 |
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
|
62 |
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
|
63 |
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
|
64 |
}; |
0 | 65 |
|
66 |
VARDEF Cheats _cheats; |
|
67 |
||
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
|
68 |
/* 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
|
69 |
VARDEF int _palette_animation_counter; |
0 | 70 |
|
71 |
||
206 | 72 |
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
|
73 |
VARDEF uint32 _realtime_tick; |
0 | 74 |
|
2422
897a01f7c624
(svn r2948) -Fix: the old AI needs a special flag that triggers all kind of special
truelight
parents:
2304
diff
changeset
|
75 |
VARDEF bool _is_old_ai_player; // current player is an oldAI player? (enables a lot of cheats..) |
0 | 76 |
|
77 |
VARDEF bool _do_autosave; |
|
78 |
VARDEF int _autosave_ctr; |
|
79 |
||
80 |
VARDEF byte _display_opt; |
|
81 |
VARDEF int _caret_timer; |
|
1688
af2bb9bcb2ed
(svn r2192) - Add greater control to the 'message options' window. Now you can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930].
Darkvater
parents:
1643
diff
changeset
|
82 |
VARDEF uint32 _news_display_opt; |
af2bb9bcb2ed
(svn r2192) - Add greater control to the 'message options' window. Now you can turn off the telegraphc ticker sound for summarized messages, or turn off news-messages altogether (you get a red blot to notify you though). The [<][>] set the settings in one way, while clicking on the option itself, cycles it. This commit also 'fixes' bugs [1166973], [1121484] and patch [1169930].
Darkvater
parents:
1643
diff
changeset
|
83 |
VARDEF bool _news_ticker_sound; |
0 | 84 |
|
85 |
VARDEF StringID _error_message; |
|
86 |
||
87 |
VARDEF bool _rightclick_emulate; |
|
88 |
||
7734
627817106768
(svn r11269) -Feature: user customisable faces. Patch by BigBB.
rubidium
parents:
7657
diff
changeset
|
89 |
VARDEF PlayerFace _player_face; ///< for player face storage in openttd.cfg |
627817106768
(svn r11269) -Feature: user customisable faces. Patch by BigBB.
rubidium
parents:
7657
diff
changeset
|
90 |
|
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
|
91 |
/* IN/OUT parameters to commands */ |
0 | 92 |
VARDEF byte _yearly_expenses_type; |
1977
37bbebf94434
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1958
diff
changeset
|
93 |
VARDEF TileIndex _build_tunnel_endtile; |
0 | 94 |
VARDEF bool _generating_world; |
95 |
||
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
|
96 |
/* Used when switching from the intro menu. */ |
0 | 97 |
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
|
98 |
VARDEF StringID _switch_mode_errorstr; |
0 | 99 |
|
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
|
100 |
VARDEF char _ini_videodriver[32], _ini_musicdriver[32], _ini_sounddriver[32], _ini_blitter[32]; |
0 | 101 |
|
102 |
VARDEF int _num_resolutions; |
|
103 |
VARDEF uint16 _resolutions[32][2]; |
|
104 |
VARDEF uint16 _cur_resolution[2]; |
|
105 |
||
106 |
VARDEF char _savegame_format[8]; |
|
107 |
||
108 |
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
|
109 |
VARDEF char *_highscore_file; |
704
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
110 |
VARDEF char *_log_file; |
0 | 111 |
|
112 |
||
889
64d2f7d5f02b
(svn r1375) -Fix: [1050990] Buying trains sometimes accounted for incorrectly. Was the result of the cost getting reset in a recursive call of docommand. That is fixed. In addition all cost-commands are typed explicitely. Please do not forget to do so or your costs will be credited to construction if you are unlucky.
darkvater
parents:
842
diff
changeset
|
113 |
#define SET_EXPENSES_TYPE(x) _yearly_expenses_type = x; |
0 | 114 |
|
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
|
115 |
/* landscape.cpp */ |
0 | 116 |
extern const byte _tileh_to_sprite[32]; |
117 |
||
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
|
118 |
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
|
119 |
|
0 | 120 |
/* misc */ |
121 |
VARDEF char _screenshot_name[128]; |
|
122 |
VARDEF byte _vehicle_design_names; |
|
123 |
||
704
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
124 |
/* Forking stuff */ |
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
125 |
VARDEF bool _dedicated_forks; |
e843dd369938
(svn r1154) -Add: [Network] Forked dedicated server (start openttd with -Df) (GeniusDex)
truelight
parents:
679
diff
changeset
|
126 |
|
0 | 127 |
#endif /* VARIABLES_H */ |