author | tron |
Wed, 01 Feb 2006 06:32:03 +0000 | |
changeset 2951 | 2db3adee7736 |
parent 2893 | a234907badf7 |
child 3017 | 915fae59d5e0 |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
0 | 3 |
#include "stdafx.h" |
1891
92a3b0aa0946
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1796
diff
changeset
|
4 |
#include "openttd.h" |
507
8aa8100b0b22
(svn r815) Include strings.h only in the files which need it.
tron
parents:
497
diff
changeset
|
5 |
#include "table/strings.h" |
2148
47ba4a1b1c3b
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
celestar
parents:
2051
diff
changeset
|
6 |
#include "table/sprites.h" |
2163
637ec3c361f5
(svn r2673) Include functions.h directly, not globally via openttd.h
tron
parents:
2159
diff
changeset
|
7 |
#include "functions.h" |
679
e959706a3e4d
(svn r1117) Move map arrays and some related macros into their own files map.c and map.h
tron
parents:
507
diff
changeset
|
8 |
#include "map.h" |
1209
a1ac96655b79
(svn r1713) Split off several functions which query/set information about a single tile from map.h and put them into a seperate file tile.h
tron
parents:
1202
diff
changeset
|
9 |
#include "tile.h" |
0 | 10 |
#include "command.h" |
11 |
#include "viewport.h" |
|
12 |
#include "player.h" |
|
13 |
#include "gui.h" |
|
384
bf1303e754ff
(svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky)
darkvater
parents:
222
diff
changeset
|
14 |
#include "station.h" |
0 | 15 |
#include "economy.h" |
16 |
#include "town.h" |
|
405
6830ae7a0d5d
(svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to sprite.h (pasky)
darkvater
parents:
384
diff
changeset
|
17 |
#include "sprite.h" |
2159
3b634157c3b2
(svn r2669) Shuffle some more stuff around to reduce dependencies
tron
parents:
2150
diff
changeset
|
18 |
#include "variables.h" |
0 | 19 |
|
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
20 |
/** Destroy a HQ. |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
21 |
* During normal gameplay you can only implicitely destroy a HQ when you are |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
22 |
* rebuilding it. Otherwise, only water can destroy it. |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
23 |
* @param tile tile coordinates where HQ is located to destroy |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
24 |
* @param flags docommand flags of calling function |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
25 |
*/ |
2817 | 26 |
static int32 DestroyCompanyHQ(TileIndex tile, uint32 flags) |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
27 |
{ |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
28 |
Player *p; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
29 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
30 |
SET_EXPENSES_TYPE(EXPENSES_PROPERTY); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
31 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
32 |
/* Find player that has HQ flooded, and reset their location_of_house */ |
2026 | 33 |
if (_current_player == OWNER_WATER) { |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
34 |
bool dodelete = false; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
35 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
36 |
FOR_ALL_PLAYERS(p) { |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
37 |
if (p->location_of_house == tile) { |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
38 |
dodelete = true; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
39 |
break; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
40 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
41 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
42 |
if (!dodelete) return CMD_ERROR; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
43 |
} else /* Destruction was initiated by player */ |
1962
51ee4f459268
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
celestar
parents:
1902
diff
changeset
|
44 |
p = GetPlayer(_current_player); |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
45 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
46 |
if (p->location_of_house == 0) return CMD_ERROR; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
47 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
48 |
if (flags & DC_EXEC) { |
1981 | 49 |
DoClearSquare(p->location_of_house + TileDiffXY(0, 0)); |
50 |
DoClearSquare(p->location_of_house + TileDiffXY(0, 1)); |
|
51 |
DoClearSquare(p->location_of_house + TileDiffXY(1, 0)); |
|
52 |
DoClearSquare(p->location_of_house + TileDiffXY(1, 1)); |
|
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
53 |
p->location_of_house = 0; // reset HQ position |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
54 |
InvalidateWindow(WC_COMPANY, (int)p->index); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
55 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
56 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
57 |
// cost of relocating company is 1% of company value |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
58 |
return CalculateCompanyValue(p) / 100; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
59 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
60 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
61 |
/** Build or relocate the HQ. This depends if the HQ is already built or not |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
62 |
* @param x,y the coordinates where the HQ will be built or relocated to |
2473
bbc4e805214d
(svn r2999) Do not pass if the HQ gets built for the first time or gets relocated as parameter - the command function has to check this anyway
tron
parents:
2436
diff
changeset
|
63 |
* @param p1 unused |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
64 |
* @param p2 unused |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
65 |
*/ |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
66 |
extern int32 CheckFlatLandBelow(TileIndex tile, uint w, uint h, uint flags, uint invalid_dirs, int *); |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
67 |
int32 CmdBuildCompanyHQ(int x, int y, uint32 flags, uint32 p1, uint32 p2) |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
68 |
{ |
1980
9ea0c89fbb58
(svn r2486) Turn TILE_FROM_XY into an inline function and rename it to TileVirtXY
tron
parents:
1977
diff
changeset
|
69 |
TileIndex tile = TileVirtXY(x, y); |
1962
51ee4f459268
(svn r2468) -Codechange: Got rid of DEREF_PLAYER and replaced it by GetPlayer
celestar
parents:
1902
diff
changeset
|
70 |
Player *p = GetPlayer(_current_player); |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
71 |
int cost; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
72 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
73 |
SET_EXPENSES_TYPE(EXPENSES_PROPERTY); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
74 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
75 |
cost = CheckFlatLandBelow(tile, 2, 2, flags, 0, NULL); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
76 |
if (CmdFailed(cost)) return CMD_ERROR; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
77 |
|
2473
bbc4e805214d
(svn r2999) Do not pass if the HQ gets built for the first time or gets relocated as parameter - the command function has to check this anyway
tron
parents:
2436
diff
changeset
|
78 |
if (p->location_of_house != 0) { /* Moving HQ */ |
bbc4e805214d
(svn r2999) Do not pass if the HQ gets built for the first time or gets relocated as parameter - the command function has to check this anyway
tron
parents:
2436
diff
changeset
|
79 |
int32 ret = DestroyCompanyHQ(p->location_of_house, flags); |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
80 |
if (CmdFailed(ret)) return CMD_ERROR; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
81 |
cost += ret; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
82 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
83 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
84 |
if (flags & DC_EXEC) { |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
85 |
int score = UpdateCompanyRatingAndValue(p, false); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
86 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
87 |
p->location_of_house = tile; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
88 |
|
1981 | 89 |
ModifyTile(tile + TileDiffXY(0, 0), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x80); |
90 |
ModifyTile(tile + TileDiffXY(0, 1), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x81); |
|
91 |
ModifyTile(tile + TileDiffXY(1, 0), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x82); |
|
92 |
ModifyTile(tile + TileDiffXY(1, 1), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x83); |
|
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
93 |
UpdatePlayerHouse(p, score); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
94 |
InvalidateWindow(WC_COMPANY, (int)p->index); |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
95 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
96 |
|
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
97 |
return cost; |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
98 |
} |
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
99 |
|
0 | 100 |
typedef struct DrawTileUnmovableStruct { |
101 |
uint16 image; |
|
102 |
byte subcoord_x; |
|
103 |
byte subcoord_y; |
|
104 |
byte width; |
|
105 |
byte height; |
|
106 |
byte z_size; |
|
107 |
byte unused; |
|
108 |
} DrawTileUnmovableStruct; |
|
109 |
||
110 |
#include "table/unmovable_land.h" |
|
111 |
||
112 |
static void DrawTile_Unmovable(TileInfo *ti) |
|
113 |
{ |
|
114 |
uint32 image, ormod; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
115 |
|
0 | 116 |
if (!(ti->map5 & 0x80)) { |
117 |
if (ti->map5 == 2) { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
118 |
|
0 | 119 |
// statue |
2893
a234907badf7
(svn r3447) - CodeChange: [ 1360866 ] station_land.h Naming ALL sprites. Also replaced the SPTR_STATUE_GROUND by the more obvious SPR_CONCRETE_GROUND in unmovable_cmd.c. No functional changes except for commenting out PALETTE_RECOLOR_SPRITE in table/sprites.h. (Belugas)
Darkvater
parents:
2817
diff
changeset
|
120 |
DrawGroundSprite(SPR_CONCRETE_GROUND); |
0 | 121 |
|
1901
fb05044cf5c3
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
tron
parents:
1891
diff
changeset
|
122 |
image = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)); |
2517
b90693227193
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
tron
parents:
2502
diff
changeset
|
123 |
image += PALETTE_MODIFIER_COLOR | SPR_STATUE_COMPANY; |
497
2d6d31173813
(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
tron
parents:
473
diff
changeset
|
124 |
if (_display_opt & DO_TRANS_BUILDINGS) |
2148
47ba4a1b1c3b
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
celestar
parents:
2051
diff
changeset
|
125 |
MAKE_TRANSPARENT(image); |
0 | 126 |
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 25, ti->z); |
127 |
} else if (ti->map5 == 3) { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
128 |
|
0 | 129 |
// "owned by" sign |
130 |
DrawClearLandTile(ti, 0); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
131 |
|
0 | 132 |
AddSortableSpriteToDraw( |
2517
b90693227193
(svn r3046) Replace some numbers with sprite names and fix a typo in the sprite list
tron
parents:
2502
diff
changeset
|
133 |
PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)) + PALETTE_MODIFIER_COLOR + SPR_BOUGHT_LAND, |
0 | 134 |
ti->x+8, ti->y+8, |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
135 |
1, 1, |
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
136 |
10, |
0 | 137 |
GetSlopeZ(ti->x+8, ti->y+8) |
138 |
); |
|
139 |
} else { |
|
140 |
// lighthouse or transmitter |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
141 |
|
0 | 142 |
const DrawTileUnmovableStruct *dtus; |
143 |
||
144 |
if (ti->tileh) DrawFoundation(ti, ti->tileh); |
|
145 |
DrawClearLandTile(ti, 2); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
146 |
|
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
147 |
dtus = &_draw_tile_unmovable_data[ti->map5]; |
0 | 148 |
|
149 |
image = dtus->image; |
|
497
2d6d31173813
(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
tron
parents:
473
diff
changeset
|
150 |
if (_display_opt & DO_TRANS_BUILDINGS) |
2148
47ba4a1b1c3b
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
celestar
parents:
2051
diff
changeset
|
151 |
MAKE_TRANSPARENT(image); |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
152 |
|
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
153 |
AddSortableSpriteToDraw(image, |
0 | 154 |
ti->x | dtus->subcoord_x, |
155 |
ti->y | dtus->subcoord_y, |
|
156 |
dtus->width, dtus->height, |
|
157 |
dtus->z_size, ti->z); |
|
158 |
} |
|
159 |
} else { |
|
160 |
const DrawTileSeqStruct *dtss; |
|
384
bf1303e754ff
(svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky)
darkvater
parents:
222
diff
changeset
|
161 |
const DrawTileSprites *t; |
0 | 162 |
|
163 |
if (ti->tileh) DrawFoundation(ti, ti->tileh); |
|
164 |
||
1901
fb05044cf5c3
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
tron
parents:
1891
diff
changeset
|
165 |
ormod = PLAYER_SPRITE_COLOR(GetTileOwner(ti->tile)); |
0 | 166 |
|
384
bf1303e754ff
(svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky)
darkvater
parents:
222
diff
changeset
|
167 |
t = &_unmovable_display_datas[ti->map5 & 0x7F]; |
bf1303e754ff
(svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky)
darkvater
parents:
222
diff
changeset
|
168 |
DrawGroundSprite(t->ground_sprite | ormod); |
0 | 169 |
|
384
bf1303e754ff
(svn r576) -newgrf: Cleanup horrible table/(station|unmovable)_land.h DrawTileSeqStruct hacks needed for custom station supports (pasky)
darkvater
parents:
222
diff
changeset
|
170 |
foreach_draw_tile_seq(dtss, t->seq) { |
2026 | 171 |
image = dtss->image; |
0 | 172 |
if (_display_opt & DO_TRANS_BUILDINGS) { |
2148
47ba4a1b1c3b
(svn r2658) -Codechange: Use MAKE_TRANSPARENT to display a transparented sprite
celestar
parents:
2051
diff
changeset
|
173 |
MAKE_TRANSPARENT(image); |
497
2d6d31173813
(svn r787) Invert the sense of the DO_TRANS_BUILDINGS flag to be consistent with its own name and all other DO_* flags.
tron
parents:
473
diff
changeset
|
174 |
} else { |
0 | 175 |
image |= ormod; |
176 |
} |
|
177 |
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y, |
|
178 |
dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z); |
|
179 |
} |
|
180 |
} |
|
181 |
} |
|
182 |
||
2537 | 183 |
static uint GetSlopeZ_Unmovable(const TileInfo* ti) |
0 | 184 |
{ |
2537 | 185 |
return GetPartialZ(ti->x & 0xF, ti->y & 0xF, ti->tileh) + ti->z; |
0 | 186 |
} |
187 |
||
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2186
diff
changeset
|
188 |
static uint GetSlopeTileh_Unmovable(const TileInfo *ti) |
39 | 189 |
{ |
190 |
return 0; |
|
191 |
} |
|
192 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
193 |
static int32 ClearTile_Unmovable(TileIndex tile, byte flags) |
0 | 194 |
{ |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
195 |
byte m5 = _m[tile].m5; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
196 |
|
147
d0c8100d18cf
(svn r148) -Feature: Company HQ can now be moved somewhere else (cost 1% of company value). Water floods HQ.
darkvater
parents:
39
diff
changeset
|
197 |
if (m5 & 0x80) { |
1796
cae31916ae54
(svn r2300) - CodeChange: check the last number of commands, now only the refit ones remain, and some server-only commands.
Darkvater
parents:
1792
diff
changeset
|
198 |
if (_current_player == OWNER_WATER) return DestroyCompanyHQ(tile, DC_EXEC); |
0 | 199 |
return_cmd_error(STR_5804_COMPANY_HEADQUARTERS_IN); |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
200 |
} |
0 | 201 |
|
2026 | 202 |
if (m5 == 3) // company owned land |
0 | 203 |
return DoCommandByTile(tile, 0, 0, flags, CMD_SELL_LAND_AREA); |
204 |
||
149
5f7d4b21df01
(svn r150) -Fix: [1010833] Turning on the magic bulldozer removes oil rigs
darkvater
parents:
147
diff
changeset
|
205 |
// checks if you're allowed to remove unmovable things |
5f7d4b21df01
(svn r150) -Fix: [1010833] Turning on the magic bulldozer removes oil rigs
darkvater
parents:
147
diff
changeset
|
206 |
if (_game_mode != GM_EDITOR && _current_player != OWNER_WATER && ((flags & DC_AUTO || !_cheats.magic_bulldozer.value)) ) |
5f7d4b21df01
(svn r150) -Fix: [1010833] Turning on the magic bulldozer removes oil rigs
darkvater
parents:
147
diff
changeset
|
207 |
return_cmd_error(STR_5800_OBJECT_IN_THE_WAY); |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
208 |
|
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
209 |
if (flags & DC_EXEC) { |
0 | 210 |
DoClearSquare(tile); |
211 |
} |
|
212 |
||
213 |
return 0; |
|
214 |
} |
|
215 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
216 |
static void GetAcceptedCargo_Unmovable(TileIndex tile, AcceptedCargo ac) |
0 | 217 |
{ |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
218 |
byte m5 = _m[tile].m5; |
0 | 219 |
uint level; // HQ level (depends on company performance) in the range 1..5. |
220 |
||
221 |
if (!(m5 & 0x80)) { |
|
222 |
/* not used */ |
|
223 |
return; |
|
224 |
} |
|
225 |
||
226 |
/* HQ accepts passenger and mail; but we have to divide the values |
|
227 |
* between 4 tiles it occupies! */ |
|
228 |
||
229 |
level = (m5 & ~0x80) / 4 + 1; |
|
230 |
||
231 |
// Top town building generates 10, so to make HQ interesting, the top |
|
232 |
// type makes 20. |
|
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
410
diff
changeset
|
233 |
ac[CT_PASSENGERS] = max(1, level); |
0 | 234 |
|
235 |
// Top town building generates 4, HQ can make up to 8. The |
|
236 |
// proportion passengers:mail is different because such a huge |
|
237 |
// commercial building generates unusually high amount of mail |
|
238 |
// correspondence per physical visitor. |
|
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
410
diff
changeset
|
239 |
ac[CT_MAIL] = max(1, level / 2); |
0 | 240 |
} |
241 |
||
242 |
static const StringID _unmovable_tile_str[] = { |
|
243 |
STR_5803_COMPANY_HEADQUARTERS, |
|
244 |
STR_5801_TRANSMITTER, |
|
245 |
STR_5802_LIGHTHOUSE, |
|
246 |
STR_2016_STATUE, |
|
247 |
STR_5805_COMPANY_OWNED_LAND, |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
248 |
}; |
0 | 249 |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
250 |
static void GetTileDesc_Unmovable(TileIndex tile, TileDesc *td) |
0 | 251 |
{ |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
252 |
int i = _m[tile].m5; |
0 | 253 |
if (i & 0x80) i = -1; |
254 |
td->str = _unmovable_tile_str[i + 1]; |
|
1901
fb05044cf5c3
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
tron
parents:
1891
diff
changeset
|
255 |
td->owner = GetTileOwner(tile); |
0 | 256 |
} |
257 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
258 |
static void AnimateTile_Unmovable(TileIndex tile) |
0 | 259 |
{ |
260 |
/* not used */ |
|
261 |
} |
|
262 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
263 |
static void TileLoop_Unmovable(TileIndex tile) |
0 | 264 |
{ |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
265 |
byte m5 = _m[tile].m5; |
2150
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2148
diff
changeset
|
266 |
uint level; // HQ level (depends on company performance) in the range 1..5. |
0 | 267 |
uint32 r; |
268 |
||
269 |
if (!(m5 & 0x80)) { |
|
270 |
/* not used */ |
|
271 |
return; |
|
272 |
} |
|
273 |
||
274 |
/* HQ accepts passenger and mail; but we have to divide the values |
|
275 |
* between 4 tiles it occupies! */ |
|
276 |
||
2150
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2148
diff
changeset
|
277 |
level = GB(m5, 0, 7) / 4 + 1; |
0 | 278 |
assert(level < 6); |
279 |
||
280 |
r = Random(); |
|
281 |
// Top town buildings generate 250, so the top HQ type makes 256. |
|
2150
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2148
diff
changeset
|
282 |
if (GB(r, 0, 8) < (256 / 4 / (6 - level))) { |
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2148
diff
changeset
|
283 |
uint amt = GB(r, 0, 8) / 8 / 4 + 1; |
0 | 284 |
if (_economy.fluct <= 0) amt = (amt + 1) >> 1; |
285 |
MoveGoodsToStation(tile, 2, 2, CT_PASSENGERS, amt); |
|
286 |
} |
|
287 |
||
288 |
// Top town building generates 90, HQ can make up to 196. The |
|
289 |
// proportion passengers:mail is about the same as in the acceptance |
|
290 |
// equations. |
|
2150
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2148
diff
changeset
|
291 |
if (GB(r, 8, 8) < (196 / 4 / (6 - level))) { |
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2148
diff
changeset
|
292 |
uint amt = GB(r, 8, 8) / 8 / 4 + 1; |
0 | 293 |
if (_economy.fluct <= 0) amt = (amt + 1) >> 1; |
294 |
MoveGoodsToStation(tile, 2, 2, CT_MAIL, amt); |
|
295 |
} |
|
296 |
} |
|
297 |
||
298 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
299 |
static uint32 GetTileTrackStatus_Unmovable(TileIndex tile, TransportType mode) |
0 | 300 |
{ |
301 |
return 0; |
|
302 |
} |
|
303 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
304 |
static void ClickTile_Unmovable(TileIndex tile) |
0 | 305 |
{ |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
306 |
if (_m[tile].m5 & 0x80) { |
1901
fb05044cf5c3
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
tron
parents:
1891
diff
changeset
|
307 |
ShowPlayerCompany(GetTileOwner(tile)); |
0 | 308 |
} |
309 |
} |
|
310 |
||
909
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
311 |
static const TileIndexDiffC _tile_add[] = { |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
312 |
{ 1, 0}, |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
313 |
{ 0, 1}, |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
314 |
{-1, 0}, |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
315 |
{ 0, -1} |
0 | 316 |
}; |
317 |
||
318 |
/* checks, if a radio tower is within a 9x9 tile square around tile */ |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
319 |
static bool checkRadioTowerNearby(TileIndex tile) |
0 | 320 |
{ |
1981 | 321 |
TileIndex tile_s = tile - TileDiffXY(4, 4); |
0 | 322 |
|
323 |
BEGIN_TILE_LOOP(tile, 9, 9, tile_s) |
|
324 |
// already a radio tower here? |
|
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
325 |
if (IsTileType(tile, MP_UNMOVABLE) && _m[tile].m5 == 0) |
0 | 326 |
return false; |
327 |
END_TILE_LOOP(tile, 9, 9, tile_s) |
|
328 |
return true; |
|
329 |
} |
|
330 |
||
1093
e8d26c7dc42f
(svn r1594) Convert all undefined parameter lists to (void) and add the appropriate warning flags in the Makefile
tron
parents:
1059
diff
changeset
|
331 |
void GenerateUnmovables(void) |
0 | 332 |
{ |
333 |
int i,j; |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1962
diff
changeset
|
334 |
TileIndex tile; |
0 | 335 |
uint32 r; |
336 |
int dir; |
|
1335
a635854c23b6
(svn r1839) Move GetTileSlope() and GetTileZ() into tile.[ch] and use more explicit types as parameters
tron
parents:
1225
diff
changeset
|
337 |
uint h; |
0 | 338 |
|
2951 | 339 |
if (_opt.landscape == LT_CANDY) return; |
0 | 340 |
|
341 |
/* add radio tower */ |
|
1202
7d8b86bd8ba2
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents:
1093
diff
changeset
|
342 |
i = ScaleByMapSize(1000); |
7d8b86bd8ba2
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents:
1093
diff
changeset
|
343 |
j = ScaleByMapSize(40); // maximum number of radio towers on the map |
0 | 344 |
do { |
2051 | 345 |
tile = RandomTile(); |
1035
0a170deb6e33
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
tron
parents:
926
diff
changeset
|
346 |
if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h >= 32) { |
2951 | 347 |
if (!checkRadioTowerNearby(tile)) continue; |
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1035
diff
changeset
|
348 |
SetTileType(tile, MP_UNMOVABLE); |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
349 |
_m[tile].m5 = 0; |
1902 | 350 |
SetTileOwner(tile, OWNER_NONE); |
2951 | 351 |
if (--j == 0) break; |
0 | 352 |
} |
353 |
} while (--i); |
|
354 |
||
2951 | 355 |
if (_opt.landscape == LT_DESERT) return; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
356 |
|
0 | 357 |
/* add lighthouses */ |
1202
7d8b86bd8ba2
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents:
1093
diff
changeset
|
358 |
i = ScaleByMapSize1D((Random() & 3) + 7); |
0 | 359 |
do { |
360 |
restart: |
|
361 |
r = Random(); |
|
362 |
dir = r >> 30; |
|
856
07dc27d0503e
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
tron
parents:
679
diff
changeset
|
363 |
r %= (dir == 0 || dir == 2) ? MapMaxY() : MapMaxX(); |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
364 |
tile = |
1981 | 365 |
(dir == 0) ? TileXY(0, r) : 0 + // left |
366 |
(dir == 1) ? TileXY(r, 0) : 0 + // top |
|
367 |
(dir == 2) ? TileXY(MapMaxX(), r) : 0 + // right |
|
368 |
(dir == 3) ? TileXY(r, MapMaxY()) : 0; // bottom |
|
0 | 369 |
j = 20; |
370 |
do { |
|
2951 | 371 |
if (--j == 0) goto restart; |
909
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
372 |
tile = TILE_MASK(tile + ToTileIndexDiff(_tile_add[dir])); |
1035
0a170deb6e33
(svn r1536) Move GET_TILEHEIGHT, GET_TILETYPE and IS_TILETYPE to map.h, turn them into inline functions and add some asserts
tron
parents:
926
diff
changeset
|
373 |
} while (!(IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h <= 16)); |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
374 |
|
0 | 375 |
assert(tile == TILE_MASK(tile)); |
376 |
||
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1035
diff
changeset
|
377 |
SetTileType(tile, MP_UNMOVABLE); |
2049
ad0d49c916d4
(svn r2558) Change the internal map format from 7 arrays to one array of structs, this doesn't change the saved format for now. It's a stepping stone for further changes.
tron
parents:
2026
diff
changeset
|
378 |
_m[tile].m5 = 1; |
1902 | 379 |
SetTileOwner(tile, OWNER_NONE); |
0 | 380 |
} while (--i); |
381 |
} |
|
382 |
||
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2186
diff
changeset
|
383 |
static void ChangeTileOwner_Unmovable(TileIndex tile, PlayerID old_player, PlayerID new_player) |
0 | 384 |
{ |
1901
fb05044cf5c3
(svn r2407) Use {Get,Is}TileOwner to get/check the owner of a tile and fix some bogus reads of _map_owner
tron
parents:
1891
diff
changeset
|
385 |
if (!IsTileOwner(tile, old_player)) return; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
386 |
|
2502 | 387 |
if (_m[tile].m5 == 3 && new_player != OWNER_SPECTATOR) { |
1902 | 388 |
SetTileOwner(tile, new_player); |
2026 | 389 |
} else { |
0 | 390 |
DoClearSquare(tile); |
391 |
} |
|
392 |
} |
|
393 |
||
394 |
const TileTypeProcs _tile_type_unmovable_procs = { |
|
1493
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
395 |
DrawTile_Unmovable, /* draw_tile_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
396 |
GetSlopeZ_Unmovable, /* get_slope_z_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
397 |
ClearTile_Unmovable, /* clear_tile_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
398 |
GetAcceptedCargo_Unmovable, /* get_accepted_cargo_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
399 |
GetTileDesc_Unmovable, /* get_tile_desc_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
400 |
GetTileTrackStatus_Unmovable, /* get_tile_track_status_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
401 |
ClickTile_Unmovable, /* click_tile_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
402 |
AnimateTile_Unmovable, /* animate_tile_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
403 |
TileLoop_Unmovable, /* tile_loop_clear */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
404 |
ChangeTileOwner_Unmovable, /* change_tile_owner_clear */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
405 |
NULL, /* get_produced_cargo_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
406 |
NULL, /* vehicle_enter_tile_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
407 |
NULL, /* vehicle_leave_tile_proc */ |
ea21c3f7feea
(svn r1997) Fixed errorneous tab expansion on the indentation side which happenned in r1993. Pointed out by Tron.
pasky
parents:
1489
diff
changeset
|
408 |
GetSlopeTileh_Unmovable, /* get_slope_tileh_proc */ |
0 | 409 |
}; |