author | Darkvater |
Thu, 12 May 2005 23:46:01 +0000 | |
changeset 1796 | cae31916ae54 |
parent 1792 | 42a160b19baf |
child 1891 | 92a3b0aa0946 |
permissions | -rw-r--r-- |
0 | 1 |
#include "stdafx.h" |
2 |
#include "ttd.h" |
|
507
8aa8100b0b22
(svn r815) Include strings.h only in the files which need it.
tron
parents:
497
diff
changeset
|
3 |
#include "table/strings.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
|
4 |
#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
|
5 |
#include "tile.h" |
0 | 6 |
#include "command.h" |
7 |
#include "viewport.h" |
|
8 |
#include "player.h" |
|
9 |
#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
|
10 |
#include "station.h" |
0 | 11 |
#include "economy.h" |
12 |
#include "town.h" |
|
405
6830ae7a0d5d
(svn r602) -newgrf: Move DrawTileSeqStruct & co and struct SpriteGroup to sprite.h (pasky)
darkvater
parents:
384
diff
changeset
|
13 |
#include "sprite.h" |
0 | 14 |
|
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
|
15 |
/** 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
|
16 |
* 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
|
17 |
* 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
|
18 |
* @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
|
19 |
* @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
|
20 |
*/ |
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 |
int32 DestroyCompanyHQ(TileIndex tile, uint32 flags) |
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 |
{ |
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 |
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
|
24 |
|
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 |
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
|
26 |
|
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 |
/* Find player that has HQ flooded, and reset their location_of_house */ |
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 |
if (_current_player == OWNER_WATER) { |
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 |
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
|
30 |
|
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 |
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
|
32 |
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
|
33 |
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
|
34 |
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
|
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 |
} |
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 (!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
|
38 |
} else /* Destruction was initiated by player */ |
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 |
p = DEREF_PLAYER(_current_player); |
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 |
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
|
42 |
|
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 |
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
|
44 |
DoClearSquare(p->location_of_house + TILE_XY(0,0)); |
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 |
DoClearSquare(p->location_of_house + TILE_XY(0,1)); |
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 |
DoClearSquare(p->location_of_house + TILE_XY(1,0)); |
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 |
DoClearSquare(p->location_of_house + TILE_XY(1,1)); |
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 |
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
|
49 |
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
|
50 |
} |
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
|
51 |
|
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
|
52 |
// 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
|
53 |
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
|
54 |
} |
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 |
/** 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
|
57 |
* @param x,y the coordinates where the HQ will be built or relocated to |
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 |
* @param p1 relocate HQ (set to some value, usually 1 or 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
|
59 |
* @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
|
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 |
extern int32 CheckFlatLandBelow(uint tile, uint w, uint h, uint flags, uint invalid_dirs, int *); |
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 |
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
|
63 |
{ |
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 |
TileIndex tile = TILE_FROM_XY(x,y); |
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 |
Player *p = DEREF_PLAYER(_current_player); |
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
|
66 |
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
|
67 |
|
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 |
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
|
69 |
|
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
|
70 |
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
|
71 |
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
|
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 |
if (p1) { /* Moving 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
|
74 |
int32 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
|
75 |
|
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 (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
|
77 |
|
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
|
78 |
ret = DestroyCompanyHQ(p->location_of_house, flags); |
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
|
79 |
|
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 |
|
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 |
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
|
83 |
} else { /* Building new 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
|
84 |
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
|
85 |
} |
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 |
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
|
88 |
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
|
89 |
|
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
|
90 |
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
|
91 |
|
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
|
92 |
ModifyTile(tile + TILE_XY(0,0), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x80); |
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 |
ModifyTile(tile + TILE_XY(0,1), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x81); |
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 |
ModifyTile(tile + TILE_XY(1,0), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x82); |
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 |
ModifyTile(tile + TILE_XY(1,1), MP_SETTYPE(MP_UNMOVABLE) | MP_MAPOWNER_CURRENT | MP_MAP5, 0x83); |
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 |
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
|
97 |
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
|
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 |
|
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
|
100 |
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
|
101 |
} |
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
|
102 |
|
0 | 103 |
typedef struct DrawTileUnmovableStruct { |
104 |
uint16 image; |
|
105 |
byte subcoord_x; |
|
106 |
byte subcoord_y; |
|
107 |
byte width; |
|
108 |
byte height; |
|
109 |
byte z_size; |
|
110 |
byte unused; |
|
111 |
} DrawTileUnmovableStruct; |
|
112 |
||
113 |
#include "table/unmovable_land.h" |
|
114 |
||
115 |
static void DrawTile_Unmovable(TileInfo *ti) |
|
116 |
{ |
|
117 |
uint32 image, ormod; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
118 |
|
0 | 119 |
if (!(ti->map5 & 0x80)) { |
120 |
if (ti->map5 == 2) { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
121 |
|
0 | 122 |
// statue |
123 |
DrawGroundSprite(0x58C); |
|
124 |
||
125 |
image = PLAYER_SPRITE_COLOR(_map_owner[ti->tile]); |
|
126 |
image += 0x8A48; |
|
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
|
127 |
if (_display_opt & DO_TRANS_BUILDINGS) |
0 | 128 |
image = (image & 0x3FFF) | 0x3224000; |
129 |
AddSortableSpriteToDraw(image, ti->x, ti->y, 16, 16, 25, ti->z); |
|
130 |
} else if (ti->map5 == 3) { |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
131 |
|
0 | 132 |
// "owned by" sign |
133 |
DrawClearLandTile(ti, 0); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
134 |
|
0 | 135 |
AddSortableSpriteToDraw( |
136 |
PLAYER_SPRITE_COLOR(_map_owner[ti->tile]) + 0x92B6, |
|
137 |
ti->x+8, ti->y+8, |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
138 |
1, 1, |
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
139 |
10, |
0 | 140 |
GetSlopeZ(ti->x+8, ti->y+8) |
141 |
); |
|
142 |
} else { |
|
143 |
// lighthouse or transmitter |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
144 |
|
0 | 145 |
const DrawTileUnmovableStruct *dtus; |
146 |
||
147 |
if (ti->tileh) DrawFoundation(ti, ti->tileh); |
|
148 |
DrawClearLandTile(ti, 2); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
149 |
|
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
150 |
dtus = &_draw_tile_unmovable_data[ti->map5]; |
0 | 151 |
|
152 |
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
|
153 |
if (_display_opt & DO_TRANS_BUILDINGS) |
0 | 154 |
image = (image & 0x3FFF) | 0x3224000; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
155 |
|
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
156 |
AddSortableSpriteToDraw(image, |
0 | 157 |
ti->x | dtus->subcoord_x, |
158 |
ti->y | dtus->subcoord_y, |
|
159 |
dtus->width, dtus->height, |
|
160 |
dtus->z_size, ti->z); |
|
161 |
} |
|
162 |
} else { |
|
163 |
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
|
164 |
const DrawTileSprites *t; |
0 | 165 |
|
166 |
if (ti->tileh) DrawFoundation(ti, ti->tileh); |
|
167 |
||
168 |
ormod = PLAYER_SPRITE_COLOR(_map_owner[ti->tile]); |
|
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 |
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
|
171 |
DrawGroundSprite(t->ground_sprite | ormod); |
0 | 172 |
|
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
|
173 |
foreach_draw_tile_seq(dtss, t->seq) { |
0 | 174 |
image = dtss->image; |
175 |
if (_display_opt & DO_TRANS_BUILDINGS) { |
|
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
|
176 |
image = (image & 0x3FFF) | 0x03224000; |
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
|
177 |
} else { |
0 | 178 |
image |= ormod; |
179 |
} |
|
180 |
AddSortableSpriteToDraw(image, ti->x + dtss->delta_x, ti->y + dtss->delta_y, |
|
181 |
dtss->width, dtss->height, dtss->unk, ti->z + dtss->delta_z); |
|
182 |
} |
|
183 |
} |
|
184 |
} |
|
185 |
||
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
186 |
static uint GetSlopeZ_Unmovable(TileInfo *ti) |
0 | 187 |
{ |
188 |
return GetPartialZ(ti->x&0xF, ti->y&0xF, ti->tileh) + ti->z; |
|
189 |
} |
|
190 |
||
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
191 |
static uint GetSlopeTileh_Unmovable(TileInfo *ti) |
39 | 192 |
{ |
193 |
return 0; |
|
194 |
} |
|
195 |
||
0 | 196 |
static int32 ClearTile_Unmovable(uint tile, byte flags) |
197 |
{ |
|
198 |
byte m5 = _map5[tile]; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
199 |
|
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
|
200 |
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
|
201 |
if (_current_player == OWNER_WATER) return DestroyCompanyHQ(tile, DC_EXEC); |
0 | 202 |
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
|
203 |
} |
0 | 204 |
|
205 |
if (m5 == 3) // company owned land |
|
206 |
return DoCommandByTile(tile, 0, 0, flags, CMD_SELL_LAND_AREA); |
|
207 |
||
149
5f7d4b21df01
(svn r150) -Fix: [1010833] Turning on the magic bulldozer removes oil rigs
darkvater
parents:
147
diff
changeset
|
208 |
// 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
|
209 |
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
|
210 |
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
|
211 |
|
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
212 |
if (flags & DC_EXEC) { |
0 | 213 |
DoClearSquare(tile); |
214 |
} |
|
215 |
||
216 |
return 0; |
|
217 |
} |
|
218 |
||
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
410
diff
changeset
|
219 |
static void GetAcceptedCargo_Unmovable(uint tile, AcceptedCargo ac) |
0 | 220 |
{ |
221 |
byte m5 = _map5[tile]; |
|
222 |
uint level; // HQ level (depends on company performance) in the range 1..5. |
|
223 |
||
224 |
if (!(m5 & 0x80)) { |
|
225 |
/* not used */ |
|
226 |
return; |
|
227 |
} |
|
228 |
||
229 |
/* HQ accepts passenger and mail; but we have to divide the values |
|
230 |
* between 4 tiles it occupies! */ |
|
231 |
||
232 |
level = (m5 & ~0x80) / 4 + 1; |
|
233 |
||
234 |
// Top town building generates 10, so to make HQ interesting, the top |
|
235 |
// type makes 20. |
|
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
410
diff
changeset
|
236 |
ac[CT_PASSENGERS] = max(1, level); |
0 | 237 |
|
238 |
// Top town building generates 4, HQ can make up to 8. The |
|
239 |
// proportion passengers:mail is different because such a huge |
|
240 |
// commercial building generates unusually high amount of mail |
|
241 |
// correspondence per physical visitor. |
|
473
0da86c59e3ae
(svn r724) Remove restriction that a tile can only accept 3 cargo types.
tron
parents:
410
diff
changeset
|
242 |
ac[CT_MAIL] = max(1, level / 2); |
0 | 243 |
} |
244 |
||
245 |
static const StringID _unmovable_tile_str[] = { |
|
246 |
STR_5803_COMPANY_HEADQUARTERS, |
|
247 |
STR_5801_TRANSMITTER, |
|
248 |
STR_5802_LIGHTHOUSE, |
|
249 |
STR_2016_STATUE, |
|
250 |
STR_5805_COMPANY_OWNED_LAND, |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
251 |
}; |
0 | 252 |
|
253 |
static void GetTileDesc_Unmovable(uint tile, TileDesc *td) |
|
254 |
{ |
|
255 |
int i = _map5[tile]; |
|
256 |
if (i & 0x80) i = -1; |
|
257 |
td->str = _unmovable_tile_str[i + 1]; |
|
258 |
td->owner = _map_owner[tile]; |
|
259 |
} |
|
260 |
||
261 |
static void AnimateTile_Unmovable(uint tile) |
|
262 |
{ |
|
263 |
/* not used */ |
|
264 |
} |
|
265 |
||
266 |
static void TileLoop_Unmovable(uint tile) |
|
267 |
{ |
|
268 |
byte m5 = _map5[tile]; |
|
269 |
byte level; // HQ level (depends on company performance) in the range 1..5. |
|
270 |
uint32 r; |
|
271 |
||
272 |
if (!(m5 & 0x80)) { |
|
273 |
/* not used */ |
|
274 |
return; |
|
275 |
} |
|
276 |
||
277 |
/* HQ accepts passenger and mail; but we have to divide the values |
|
278 |
* between 4 tiles it occupies! */ |
|
279 |
||
280 |
level = (m5 & ~0x80) / 4 + 1; |
|
281 |
assert(level < 6); |
|
282 |
||
283 |
r = Random(); |
|
284 |
// Top town buildings generate 250, so the top HQ type makes 256. |
|
285 |
if ((byte) r < (256 / 4 / (6 - level))) { |
|
286 |
uint amt = ((byte) r >> 3) / 4 + 1; |
|
287 |
if (_economy.fluct <= 0) amt = (amt + 1) >> 1; |
|
288 |
MoveGoodsToStation(tile, 2, 2, CT_PASSENGERS, amt); |
|
289 |
} |
|
290 |
||
291 |
r >>= 8; |
|
292 |
// Top town building generates 90, HQ can make up to 196. The |
|
293 |
// proportion passengers:mail is about the same as in the acceptance |
|
294 |
// equations. |
|
295 |
if ((byte) r < (196 / 4 / (6 - level))) { |
|
296 |
uint amt = ((byte) r >> 3) / 4 + 1; |
|
297 |
if (_economy.fluct <= 0) amt = (amt + 1) >> 1; |
|
298 |
MoveGoodsToStation(tile, 2, 2, CT_MAIL, amt); |
|
299 |
} |
|
300 |
} |
|
301 |
||
302 |
||
160
db200af4794a
(svn r161) -Fix: added missing file to project and solved wrong type bug
darkvater
parents:
149
diff
changeset
|
303 |
static uint32 GetTileTrackStatus_Unmovable(uint tile, TransportType mode) |
0 | 304 |
{ |
305 |
return 0; |
|
306 |
} |
|
307 |
||
308 |
static void ClickTile_Unmovable(uint tile) |
|
309 |
{ |
|
310 |
if (_map5[tile] & 0x80) { |
|
311 |
ShowPlayerCompany(_map_owner[tile]); |
|
312 |
} |
|
313 |
} |
|
314 |
||
909
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
315 |
static const TileIndexDiffC _tile_add[] = { |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
316 |
{ 1, 0}, |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
317 |
{ 0, 1}, |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
318 |
{-1, 0}, |
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
319 |
{ 0, -1} |
0 | 320 |
}; |
321 |
||
322 |
/* checks, if a radio tower is within a 9x9 tile square around tile */ |
|
410 | 323 |
static bool checkRadioTowerNearby(uint tile) |
0 | 324 |
{ |
325 |
uint tile_s; |
|
326 |
||
926
bd4312619522
(svn r1414) Move TileIndex, TILE_MASK and GET_TILE_[XY] to map.h and turn the latter into inline functions names Tile[XY]
tron
parents:
909
diff
changeset
|
327 |
tile_s = TILE_XY(TileX(tile) - 4, TileY(tile) - 4); |
0 | 328 |
|
329 |
BEGIN_TILE_LOOP(tile, 9, 9, tile_s) |
|
330 |
// already a radio tower here? |
|
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
|
331 |
if (IsTileType(tile, MP_UNMOVABLE) && _map5[tile] == 0) |
0 | 332 |
return false; |
333 |
END_TILE_LOOP(tile, 9, 9, tile_s) |
|
334 |
return true; |
|
335 |
} |
|
336 |
||
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
|
337 |
void GenerateUnmovables(void) |
0 | 338 |
{ |
339 |
int i,j; |
|
340 |
uint tile; |
|
341 |
uint32 r; |
|
342 |
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
|
343 |
uint h; |
0 | 344 |
|
345 |
if (_opt.landscape == LT_CANDY) |
|
346 |
return; |
|
347 |
||
348 |
/* add radio tower */ |
|
1202
7d8b86bd8ba2
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents:
1093
diff
changeset
|
349 |
i = ScaleByMapSize(1000); |
7d8b86bd8ba2
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents:
1093
diff
changeset
|
350 |
j = ScaleByMapSize(40); // maximum number of radio towers on the map |
0 | 351 |
do { |
352 |
r = Random(); |
|
863
8d09f9331a80
(svn r1344) Use MapSize[XY]() (or MapSize()/MapMax[XY]() where appropriate) instead of TILES_[XY]
tron
parents:
856
diff
changeset
|
353 |
tile = r % MapSize(); |
0 | 354 |
// TILE_MASK seems to be not working correctly. Radio masts accumulate in one area. |
355 |
// tile = TILE_MASK(r); |
|
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
|
356 |
if (IsTileType(tile, MP_CLEAR) && GetTileSlope(tile, &h) == 0 && h >= 32) { |
0 | 357 |
if(!checkRadioTowerNearby(tile)) |
358 |
continue; |
|
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1035
diff
changeset
|
359 |
SetTileType(tile, MP_UNMOVABLE); |
0 | 360 |
_map5[tile] = 0; |
361 |
_map_owner[tile] = OWNER_NONE; |
|
362 |
if (--j == 0) |
|
363 |
break; |
|
364 |
} |
|
365 |
} while (--i); |
|
366 |
||
367 |
if (_opt.landscape == LT_DESERT) |
|
368 |
return; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
369 |
|
0 | 370 |
/* add lighthouses */ |
1202
7d8b86bd8ba2
(svn r1706) Implement ScaleByMapSize() and ScaleByMapSize1D()
tron
parents:
1093
diff
changeset
|
371 |
i = ScaleByMapSize1D((Random() & 3) + 7); |
0 | 372 |
do { |
373 |
restart: |
|
374 |
r = Random(); |
|
375 |
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
|
376 |
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
|
377 |
tile = |
1489
ce8d086d677b
(svn r1993) Fixed some devious [lack of] tabs usage.
pasky
parents:
1335
diff
changeset
|
378 |
(dir==0)?TILE_XY(0,r):0 + // left |
ce8d086d677b
(svn r1993) Fixed some devious [lack of] tabs usage.
pasky
parents:
1335
diff
changeset
|
379 |
(dir==1)?TILE_XY(r,0):0 + // top |
856
07dc27d0503e
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
tron
parents:
679
diff
changeset
|
380 |
(dir == 2) ? TILE_XY(MapMaxX(), r) : 0 + // right |
07dc27d0503e
(svn r1337) Use MapMax[XY]() (or MapSize[XY]() if appropriate) instead of TILE_MAX_[XY]
tron
parents:
679
diff
changeset
|
381 |
(dir == 3) ? TILE_XY(r, MapMaxY()) : 0; // bottom |
0 | 382 |
j = 20; |
383 |
do { |
|
384 |
if (--j == 0) |
|
385 |
goto restart; |
|
909
81bc9ef93f50
(svn r1396) Introduce TileIndexDiffC - the compile time version of TileIndexDiff
tron
parents:
889
diff
changeset
|
386 |
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
|
387 |
} 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
|
388 |
|
0 | 389 |
assert(tile == TILE_MASK(tile)); |
390 |
||
1059
c28c6be74291
(svn r1560) Introduce SetTileType() and SetTileHeight()
tron
parents:
1035
diff
changeset
|
391 |
SetTileType(tile, MP_UNMOVABLE); |
0 | 392 |
_map5[tile] = 1; |
393 |
_map_owner[tile] = OWNER_NONE; |
|
394 |
} while (--i); |
|
395 |
} |
|
396 |
||
397 |
static void ChangeTileOwner_Unmovable(uint tile, byte old_player, byte new_player) |
|
398 |
{ |
|
399 |
if (_map_owner[tile] != old_player) |
|
400 |
return; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
160
diff
changeset
|
401 |
|
0 | 402 |
if (_map5[tile]==3 && new_player != 255) { |
403 |
_map_owner[tile] = new_player; |
|
404 |
} else { |
|
405 |
DoClearSquare(tile); |
|
406 |
} |
|
407 |
} |
|
408 |
||
409 |
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
|
410 |
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
|
411 |
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
|
412 |
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
|
413 |
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
|
414 |
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
|
415 |
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
|
416 |
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
|
417 |
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
|
418 |
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
|
419 |
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
|
420 |
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
|
421 |
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
|
422 |
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
|
423 |
GetSlopeTileh_Unmovable, /* get_slope_tileh_proc */ |
0 | 424 |
}; |