author | Tero Marttila <terom@fixme.fi> |
Fri, 18 Jul 2008 21:28:42 +0300 | |
changeset 11175 | 020c61e39c94 |
parent 10775 | 7061477bfbcf |
permissions | -rw-r--r-- |
2186 | 1 |
/* $Id$ */ |
2 |
||
10429
1b99254f9607
(svn r12971) -Documentation: add @file in files that missed them and add something more than whitespace as description of files that don't have a description.
rubidium
parents:
9112
diff
changeset
|
3 |
/** @file clear_cmd.cpp Commands related to clear tiles. */ |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
4 |
|
0 | 5 |
#include "stdafx.h" |
1891
92a3b0aa0946
(svn r2397) - CodeChange: rename all "ttd" files to "openttd" files.
Darkvater
parents:
1878
diff
changeset
|
6 |
#include "openttd.h" |
3144
426b825578f9
(svn r3763) Adapt to the new 'map accessors go in foo_map.h'-scheme
tron
parents:
2989
diff
changeset
|
7 |
#include "clear_map.h" |
8612
6414fc21c2f3
(svn r11677) -Codechange: move price and command related types/functions to their respective places.
rubidium
parents:
8604
diff
changeset
|
8 |
#include "command_func.h" |
6486
4f8af35b11eb
(svn r8908) -Codechange: declaration of DrawBridgeMiddle does not belong in a map accessors header.
rubidium
parents:
6449
diff
changeset
|
9 |
#include "bridge.h" |
6669
487ac09b95c4
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
6574
diff
changeset
|
10 |
#include "landscape.h" |
2153
91e89aa8c299
(svn r2663) Include variables.h only in these files which need it, not globally via openttd.h
tron
parents:
2150
diff
changeset
|
11 |
#include "variables.h" |
3310
7339b2b1e957
(svn r4073) Add functions to make and test for (most) unmovable tiles
tron
parents:
3279
diff
changeset
|
12 |
#include "unmovable_map.h" |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
13 |
#include "genworld.h" |
4328
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
14 |
#include "industry.h" |
7470
73cfc62015c9
(svn r10230) -Fix [FS#594]: terraforming wipes out canals. Now you always have to remove the canal before terraforming, instead of "just" removing the canal.
rubidium
parents:
7468
diff
changeset
|
15 |
#include "water_map.h" |
8615
6b91ca653bad
(svn r11680) -Codechange: refactor more out of openttd.h and functions.h.
rubidium
parents:
8612
diff
changeset
|
16 |
#include "tile_cmd.h" |
8627
448ebf3a8291
(svn r11692) -Codechange: move some functions from 'functions.h' to a more logical place and remove about 50% of the includes of 'functions.h'
rubidium
parents:
8615
diff
changeset
|
17 |
#include "functions.h" |
8634
5ffca02f9115
(svn r11700) -Codechange: reduce the amount of unnecessary includes.
rubidium
parents:
8627
diff
changeset
|
18 |
#include "economy_func.h" |
8760
ce0891c412ce
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents:
8750
diff
changeset
|
19 |
#include "viewport_func.h" |
8766
c86cfa3a7580
(svn r11834) -Codechange: only include settings_type.h if needed.
rubidium
parents:
8760
diff
changeset
|
20 |
#include "settings_type.h" |
8760
ce0891c412ce
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents:
8750
diff
changeset
|
21 |
|
ce0891c412ce
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents:
8750
diff
changeset
|
22 |
#include "table/strings.h" |
ce0891c412ce
(svn r11828) -Codechange: include table/* as the last includes and remove an unneeded include from openttd.h.
rubidium
parents:
8750
diff
changeset
|
23 |
#include "table/sprites.h" |
8706
e76561c3dd66
(svn r11773) -Codechange: move some non-clear-land functions from clear_cmd.cpp to a more correct location.
rubidium
parents:
8692
diff
changeset
|
24 |
#include "table/clear_land.h" |
0 | 25 |
|
7439
0c0e2945c890
(svn r10197) -Codechange: replace int32 with CommandCost where appropriate.
rubidium
parents:
7214
diff
changeset
|
26 |
static CommandCost ClearTile_Clear(TileIndex tile, byte flags) |
1095 | 27 |
{ |
7449
5cedaf2c861c
(svn r10208) -Codechange: replace int32 with Money where appropriate.
rubidium
parents:
7446
diff
changeset
|
28 |
static const Money* clear_price_table[] = { |
8473
773b817b64d0
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
belugas
parents:
8223
diff
changeset
|
29 |
&_price.clear_grass, |
773b817b64d0
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
belugas
parents:
8223
diff
changeset
|
30 |
&_price.clear_roughland, |
773b817b64d0
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
belugas
parents:
8223
diff
changeset
|
31 |
&_price.clear_rocks, |
773b817b64d0
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
belugas
parents:
8223
diff
changeset
|
32 |
&_price.clear_fields, |
773b817b64d0
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
belugas
parents:
8223
diff
changeset
|
33 |
&_price.clear_roughland, |
773b817b64d0
(svn r11533) -Codechange: Rename some unclear clear_x prices member names.
belugas
parents:
8223
diff
changeset
|
34 |
&_price.clear_roughland, |
0 | 35 |
}; |
8726
5ae45b46506b
(svn r11793) -Codechange: pass the expense type via the CommandCost instead of a global variable. Patch by Noldo (FS#1114).
rubidium
parents:
8720
diff
changeset
|
36 |
CommandCost price(EXPENSES_CONSTRUCTION); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
37 |
|
7446
1c4d469f986e
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
rubidium
parents:
7439
diff
changeset
|
38 |
if (!IsClearGround(tile, CLEAR_GRASS) || GetClearDensity(tile) != 0) { |
1c4d469f986e
(svn r10205) -Codechange: refactor returning of cost, so it can be more easily modified.
rubidium
parents:
7439
diff
changeset
|
39 |
price.AddCost(*clear_price_table[GetClearGround(tile)]); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
40 |
} |
0 | 41 |
|
2220 | 42 |
if (flags & DC_EXEC) DoClearSquare(tile); |
0 | 43 |
|
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
44 |
return price; |
0 | 45 |
} |
46 |
||
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2221
diff
changeset
|
47 |
void DrawClearLandTile(const TileInfo *ti, byte set) |
0 | 48 |
{ |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
49 |
DrawGroundSprite(SPR_FLAT_BARE_LAND + _tileh_to_sprite[ti->tileh] + set * 19, PAL_NONE); |
0 | 50 |
} |
51 |
||
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2221
diff
changeset
|
52 |
void DrawHillyLandTile(const TileInfo *ti) |
0 | 53 |
{ |
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3491
diff
changeset
|
54 |
if (ti->tileh != SLOPE_FLAT) { |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
55 |
DrawGroundSprite(SPR_FLAT_ROUGH_LAND + _tileh_to_sprite[ti->tileh], PAL_NONE); |
0 | 56 |
} else { |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
57 |
DrawGroundSprite(_landscape_clear_sprites[GB(ti->x ^ ti->y, 4, 3)], PAL_NONE); |
0 | 58 |
} |
59 |
} |
|
60 |
||
2220 | 61 |
void DrawClearLandFence(const TileInfo *ti) |
0 | 62 |
{ |
63 |
byte z = ti->z; |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
64 |
|
3636
d87b21df2944
(svn r4541) Add a type for slopes and replace many magic numbers by the appropriate enums
tron
parents:
3491
diff
changeset
|
65 |
if (ti->tileh & SLOPE_S) { |
3645
86af43f87885
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
tron
parents:
3636
diff
changeset
|
66 |
z += TILE_HEIGHT; |
86af43f87885
(svn r4554) Replace magic numbers by TILE_{HEIGHT,SIZE}
tron
parents:
3636
diff
changeset
|
67 |
if (ti->tileh == SLOPE_STEEP_S) z += TILE_HEIGHT; |
0 | 68 |
} |
69 |
||
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
70 |
if (GetFenceSW(ti->tile) != 0) { |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
71 |
DrawGroundSpriteAt(_clear_land_fence_sprites_1[GetFenceSW(ti->tile) - 1] + _fence_mod_by_tileh[ti->tileh], PAL_NONE, ti->x, ti->y, z); |
0 | 72 |
} |
73 |
||
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
74 |
if (GetFenceSE(ti->tile) != 0) { |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
75 |
DrawGroundSpriteAt(_clear_land_fence_sprites_1[GetFenceSE(ti->tile) - 1] + _fence_mod_by_tileh_2[ti->tileh], PAL_NONE, ti->x, ti->y, z); |
0 | 76 |
} |
77 |
} |
|
78 |
||
79 |
static void DrawTile_Clear(TileInfo *ti) |
|
80 |
{ |
|
3166
747e74d236f0
(svn r3794) Use already available accessor functions instead of GB()
tron
parents:
3156
diff
changeset
|
81 |
switch (GetClearGround(ti->tile)) { |
3447 | 82 |
case CLEAR_GRASS: |
3166
747e74d236f0
(svn r3794) Use already available accessor functions instead of GB()
tron
parents:
3156
diff
changeset
|
83 |
DrawClearLandTile(ti, GetClearDensity(ti->tile)); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
84 |
break; |
0 | 85 |
|
3447 | 86 |
case CLEAR_ROUGH: |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
87 |
DrawHillyLandTile(ti); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
88 |
break; |
0 | 89 |
|
3447 | 90 |
case CLEAR_ROCKS: |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
91 |
DrawGroundSprite(SPR_FLAT_ROCKY_LAND_1 + _tileh_to_sprite[ti->tileh], PAL_NONE); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
92 |
break; |
0 | 93 |
|
3447 | 94 |
case CLEAR_FIELDS: |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
95 |
DrawGroundSprite(_clear_land_sprites_1[GetFieldType(ti->tile)] + _tileh_to_sprite[ti->tileh], PAL_NONE); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
96 |
break; |
0 | 97 |
|
3447 | 98 |
case CLEAR_SNOW: |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
99 |
DrawGroundSprite(_clear_land_sprites_2[GetClearDensity(ti->tile)] + _tileh_to_sprite[ti->tileh], PAL_NONE); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
100 |
break; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
101 |
|
3447 | 102 |
case CLEAR_DESERT: |
5919
2b58160d667d
(svn r8128) -Codechange: Split sprite and palette remap into separate 32 bit values.
peter1138
parents:
5838
diff
changeset
|
103 |
DrawGroundSprite(_clear_land_sprites_3[GetClearDensity(ti->tile)] + _tileh_to_sprite[ti->tileh], PAL_NONE); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
104 |
break; |
0 | 105 |
} |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
106 |
|
2220 | 107 |
DrawClearLandFence(ti); |
5573
afa6f92a71fd
(svn r7573) -Merged the bridge branch. Allows to build bridges of arbitrary rail/road combinations (including signals)
celestar
parents:
4815
diff
changeset
|
108 |
DrawBridgeMiddle(ti); |
0 | 109 |
} |
110 |
||
4231
dea6a63dd058
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
tron
parents:
4157
diff
changeset
|
111 |
static uint GetSlopeZ_Clear(TileIndex tile, uint x, uint y) |
1095 | 112 |
{ |
4231
dea6a63dd058
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
tron
parents:
4157
diff
changeset
|
113 |
uint z; |
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5835
diff
changeset
|
114 |
Slope tileh = GetTileSlope(tile, &z); |
4231
dea6a63dd058
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
tron
parents:
4157
diff
changeset
|
115 |
|
dea6a63dd058
(svn r5794) Pass the TileIndex plus x and y coordinates into GetSlopeZ_* instead of a TileInfo
tron
parents:
4157
diff
changeset
|
116 |
return z + GetPartialZ(x & 0xF, y & 0xF, tileh); |
1095 | 117 |
} |
0 | 118 |
|
7831
5dded9b03500
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
rubidium
parents:
7813
diff
changeset
|
119 |
static Foundation GetFoundation_Clear(TileIndex tile, Slope tileh) |
39 | 120 |
{ |
7831
5dded9b03500
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
rubidium
parents:
7813
diff
changeset
|
121 |
return FOUNDATION_NONE; |
39 | 122 |
} |
123 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
124 |
static void GetAcceptedCargo_Clear(TileIndex tile, AcceptedCargo ac) |
0 | 125 |
{ |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
126 |
/* unused */ |
0 | 127 |
} |
128 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
129 |
static void AnimateTile_Clear(TileIndex tile) |
0 | 130 |
{ |
131 |
/* unused */ |
|
132 |
} |
|
133 |
||
1293 | 134 |
void TileLoopClearHelper(TileIndex tile) |
0 | 135 |
{ |
2221
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
136 |
byte self; |
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
137 |
byte neighbour; |
1293 | 138 |
TileIndex dirty = INVALID_TILE; |
0 | 139 |
|
3447 | 140 |
self = (IsTileType(tile, MP_CLEAR) && IsClearGround(tile, CLEAR_FIELDS)); |
0 | 141 |
|
3447 | 142 |
neighbour = (IsTileType(TILE_ADDXY(tile, 1, 0), MP_CLEAR) && IsClearGround(TILE_ADDXY(tile, 1, 0), CLEAR_FIELDS)); |
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
143 |
if (GetFenceSW(tile) == 0) { |
2221
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
144 |
if (self != neighbour) { |
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
145 |
SetFenceSW(tile, 3); |
0 | 146 |
dirty = tile; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
147 |
} |
0 | 148 |
} else { |
2221
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
149 |
if (self == 0 && neighbour == 0) { |
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
150 |
SetFenceSW(tile, 0); |
0 | 151 |
dirty = tile; |
152 |
} |
|
153 |
} |
|
154 |
||
3447 | 155 |
neighbour = (IsTileType(TILE_ADDXY(tile, 0, 1), MP_CLEAR) && IsClearGround(TILE_ADDXY(tile, 0, 1), CLEAR_FIELDS)); |
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
156 |
if (GetFenceSE(tile) == 0) { |
2221
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
157 |
if (self != neighbour) { |
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
158 |
SetFenceSE(tile, 3); |
0 | 159 |
dirty = tile; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
160 |
} |
0 | 161 |
} else { |
2221
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
162 |
if (self == 0 && neighbour == 0) { |
2979
883788245931
(svn r3554) Add accessors for the field type and fences of clear tiles
tron
parents:
2956
diff
changeset
|
163 |
SetFenceSE(tile, 0); |
0 | 164 |
dirty = tile; |
165 |
} |
|
166 |
} |
|
167 |
||
2221
a25240840b32
(svn r2739) -Fix(?): Change the fence algorithm so it removes fences when no farm tile is adjacent
tron
parents:
2220
diff
changeset
|
168 |
if (dirty != INVALID_TILE) MarkTileDirtyByTile(dirty); |
0 | 169 |
} |
170 |
||
171 |
||
172 |
/* convert into snowy tiles */ |
|
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
173 |
static void TileLoopClearAlps(TileIndex tile) |
0 | 174 |
{ |
6669
487ac09b95c4
(svn r9371) -Feature: Add support for variable snow lines in the arctic climate, supplied
maedhros
parents:
6574
diff
changeset
|
175 |
int k = GetTileZ(tile) - GetSnowLine() + TILE_HEIGHT; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
176 |
|
4157
0c3210247472
(svn r5581) Slightly alter some snow line related calculations to make them a bit clearer
tron
parents:
4069
diff
changeset
|
177 |
if (k < 0) { // well below the snow line |
3447 | 178 |
if (!IsClearGround(tile, CLEAR_SNOW)) return; |
179 |
if (GetClearDensity(tile) == 0) SetClearGroundDensity(tile, CLEAR_GRASS, 3); |
|
0 | 180 |
} else { |
3447 | 181 |
if (!IsClearGround(tile, CLEAR_SNOW)) { |
182 |
SetClearGroundDensity(tile, CLEAR_SNOW, 0); |
|
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
183 |
} else { |
4157
0c3210247472
(svn r5581) Slightly alter some snow line related calculations to make them a bit clearer
tron
parents:
4069
diff
changeset
|
184 |
uint density = min((uint)k / TILE_HEIGHT, 3); |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
185 |
|
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
186 |
if (GetClearDensity(tile) < density) { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
187 |
AddClearDensity(tile, 1); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
188 |
} else if (GetClearDensity(tile) > density) { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
189 |
AddClearDensity(tile, -1); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
190 |
} else { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
191 |
return; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
192 |
} |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
193 |
} |
0 | 194 |
} |
195 |
||
196 |
MarkTileDirtyByTile(tile); |
|
197 |
} |
|
198 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
199 |
static void TileLoopClearDesert(TileIndex tile) |
0 | 200 |
{ |
3447 | 201 |
if (IsClearGround(tile, CLEAR_DESERT)) return; |
0 | 202 |
|
3379
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3310
diff
changeset
|
203 |
if (GetTropicZone(tile) == TROPICZONE_DESERT) { |
3447 | 204 |
SetClearGroundDensity(tile, CLEAR_DESERT, 3); |
0 | 205 |
} else { |
3379
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3310
diff
changeset
|
206 |
if (GetTropicZone(tile + TileDiffXY( 1, 0)) != TROPICZONE_DESERT && |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3310
diff
changeset
|
207 |
GetTropicZone(tile + TileDiffXY(-1, 0)) != TROPICZONE_DESERT && |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3310
diff
changeset
|
208 |
GetTropicZone(tile + TileDiffXY( 0, 1)) != TROPICZONE_DESERT && |
ea8aa9e71328
(svn r4181) CodeChange : Replaced [G/S]etMapExtraBits by [G/S]etTropicZone. Although it was an accessor, nor his usage nor the values were clear.
belugas
parents:
3310
diff
changeset
|
209 |
GetTropicZone(tile + TileDiffXY( 0, -1)) != TROPICZONE_DESERT) |
1981 | 210 |
return; |
3447 | 211 |
SetClearGroundDensity(tile, CLEAR_DESERT, 1); |
0 | 212 |
} |
213 |
||
214 |
MarkTileDirtyByTile(tile); |
|
215 |
} |
|
216 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
217 |
static void TileLoop_Clear(TileIndex tile) |
0 | 218 |
{ |
219 |
TileLoopClearHelper(tile); |
|
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
220 |
|
10775
7061477bfbcf
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents:
10707
diff
changeset
|
221 |
switch (_settings_game.game_creation.landscape) { |
6683
7ec558346172
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents:
6669
diff
changeset
|
222 |
case LT_TROPIC: TileLoopClearDesert(tile); break; |
7ec558346172
(svn r9400) -Codechange: Use some more representative enum names for landscape types.
belugas
parents:
6669
diff
changeset
|
223 |
case LT_ARCTIC: TileLoopClearAlps(tile); break; |
0 | 224 |
} |
225 |
||
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
226 |
switch (GetClearGround(tile)) { |
3447 | 227 |
case CLEAR_GRASS: |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
228 |
if (GetClearDensity(tile) == 3) return; |
193
0a7025304867
(svn r194) -Codechange: stripping trailing-spaces. Please keep this that way!
truelight
parents:
159
diff
changeset
|
229 |
|
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
230 |
if (_game_mode != GM_EDITOR) { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
231 |
if (GetClearCounter(tile) < 7) { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
232 |
AddClearCounter(tile, 1); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
233 |
return; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
234 |
} else { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
235 |
SetClearCounter(tile, 0); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
236 |
AddClearDensity(tile, 1); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
237 |
} |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
238 |
} else { |
3447 | 239 |
SetClearGroundDensity(tile, GB(Random(), 0, 8) > 21 ? CLEAR_GRASS : CLEAR_ROUGH, 3); |
0 | 240 |
} |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
241 |
break; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
242 |
|
3447 | 243 |
case CLEAR_FIELDS: { |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
244 |
uint field_type; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
245 |
|
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
246 |
if (_game_mode == GM_EDITOR) return; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
247 |
|
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
248 |
if (GetClearCounter(tile) < 7) { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
249 |
AddClearCounter(tile, 1); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
250 |
return; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
251 |
} else { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
252 |
SetClearCounter(tile, 0); |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
253 |
} |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
254 |
|
4333
2ff83c9c81fa
(svn r6032) -Fix: when a farm is gone, remove the fields when it is full grown and should be harvest (not before that)
truelight
parents:
4328
diff
changeset
|
255 |
if (GetIndustryIndexOfField(tile) == INVALID_INDUSTRY && GetFieldType(tile) >= 7) { |
4328
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
256 |
/* This farmfield is no longer farmfield, so make it grass again */ |
4815
c2a54b213fde
(svn r6739) -Fix (r6001): Crash on removing farmland belonging to a farm. The search would loop
Darkvater
parents:
4560
diff
changeset
|
257 |
MakeClear(tile, CLEAR_GRASS, 2); |
4328
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
258 |
} else { |
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
259 |
field_type = GetFieldType(tile); |
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
260 |
field_type = (field_type < 8) ? field_type + 1 : 0; |
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
261 |
SetFieldType(tile, field_type); |
23dd79414386
(svn r6001) -Feature: when removing a farm, his farmland is removed too (over time) (based on peter1138's patch, FS#82)
truelight
parents:
4300
diff
changeset
|
262 |
} |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
263 |
break; |
0 | 264 |
} |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
265 |
|
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
266 |
default: |
0 | 267 |
return; |
268 |
} |
|
269 |
||
270 |
MarkTileDirtyByTile(tile); |
|
271 |
} |
|
272 |
||
6573 | 273 |
void GenerateClearTile() |
0 | 274 |
{ |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
275 |
uint i, gi; |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
276 |
TileIndex tile; |
0 | 277 |
|
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
278 |
/* add rough tiles */ |
2635 | 279 |
i = ScaleByMapSize(GB(Random(), 0, 10) + 0x400); |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
280 |
gi = ScaleByMapSize(GB(Random(), 0, 7) + 0x80); |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
281 |
|
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
282 |
SetGeneratingWorldProgress(GWP_ROUGH_ROCKY, gi + i); |
0 | 283 |
do { |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
284 |
IncreaseGeneratingWorldProgress(GWP_ROUGH_ROCKY); |
2051 | 285 |
tile = RandomTile(); |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
286 |
if (IsTileType(tile, MP_CLEAR) && !IsClearGround(tile, CLEAR_DESERT)) SetClearGroundDensity(tile, CLEAR_ROUGH, 3); |
0 | 287 |
} while (--i); |
288 |
||
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
289 |
/* add rocky tiles */ |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
290 |
i = gi; |
0 | 291 |
do { |
2150
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2140
diff
changeset
|
292 |
uint32 r = Random(); |
2051 | 293 |
tile = RandomTileSeed(r); |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
294 |
|
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
295 |
IncreaseGeneratingWorldProgress(GWP_ROUGH_ROCKY); |
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
296 |
if (IsTileType(tile, MP_CLEAR) && !IsClearGround(tile, CLEAR_DESERT)) { |
2150
010d923a81a9
(svn r2660) Get rid of some more shifting/anding/casting
tron
parents:
2140
diff
changeset
|
297 |
uint j = GB(r, 16, 4) + 5; |
2951 | 298 |
for (;;) { |
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
299 |
TileIndex tile_new; |
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
300 |
|
3447 | 301 |
SetClearGroundDensity(tile, CLEAR_ROCKS, 3); |
0 | 302 |
do { |
303 |
if (--j == 0) goto get_out; |
|
7813
49fbe41f8a04
(svn r10672) -Codechange: typify some parameters/variables.
rubidium
parents:
7809
diff
changeset
|
304 |
tile_new = tile + TileOffsByDiagDir((DiagDirection)GB(Random(), 0, 2)); |
4300
687a17c9c557
(svn r5946) -Add: merged the TGP branch to mainline. TGP adds:
truelight
parents:
4231
diff
changeset
|
305 |
} while (!IsTileType(tile_new, MP_CLEAR) || IsClearGround(tile_new, CLEAR_DESERT)); |
0 | 306 |
tile = tile_new; |
307 |
} |
|
308 |
get_out:; |
|
309 |
} |
|
310 |
} while (--i); |
|
311 |
} |
|
312 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
313 |
static void ClickTile_Clear(TileIndex tile) |
0 | 314 |
{ |
315 |
/* not used */ |
|
316 |
} |
|
317 |
||
9112
ec6800eaa340
(svn r12199) -Codechange: Remove magic around the results of GetTileTrackStatus().
frosch
parents:
9092
diff
changeset
|
318 |
static TrackStatus GetTileTrackStatus_Clear(TileIndex tile, TransportType mode, uint sub_mode, DiagDirection side) |
0 | 319 |
{ |
320 |
return 0; |
|
321 |
} |
|
322 |
||
2220 | 323 |
static const StringID _clear_land_str[] = { |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
324 |
STR_080D_GRASS, |
0 | 325 |
STR_080B_ROUGH_LAND, |
326 |
STR_080A_ROCKS, |
|
327 |
STR_080E_FIELDS, |
|
328 |
STR_080F_SNOW_COVERED_LAND, |
|
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
329 |
STR_0810_DESERT |
0 | 330 |
}; |
331 |
||
1977
4392ae3d8e31
(svn r2483) Replace almost 500 "uint tile" (and variants) with "TileIndex tile"
tron
parents:
1901
diff
changeset
|
332 |
static void GetTileDesc_Clear(TileIndex tile, TileDesc *td) |
0 | 333 |
{ |
3447 | 334 |
if (IsClearGround(tile, CLEAR_GRASS) && GetClearDensity(tile) == 0) { |
2955
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
335 |
td->str = STR_080C_BARE_LAND; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
336 |
} else { |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
337 |
td->str = _clear_land_str[GetClearGround(tile)]; |
27221592ebbc
(svn r3514) -Codechange: Replace direct fiddling of bits for the ground type and density of clear tiles with symbolic names and accessors.
tron
parents:
2952
diff
changeset
|
338 |
} |
10662
f455941692a3
(svn r13206) -Feature(ette): Display all owners of a tile in the tile-info-window.
frosch
parents:
10429
diff
changeset
|
339 |
td->owner[0] = GetTileOwner(tile); |
0 | 340 |
} |
341 |
||
2436
177cb6a8339f
(svn r2962) - const correctness for all Get* functions and most Draw* functions that don't change their pointer parameters
Darkvater
parents:
2221
diff
changeset
|
342 |
static void ChangeTileOwner_Clear(TileIndex tile, PlayerID old_player, PlayerID new_player) |
0 | 343 |
{ |
344 |
return; |
|
345 |
} |
|
346 |
||
6573 | 347 |
void InitializeClearLand() |
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
|
348 |
{ |
10775
7061477bfbcf
(svn r13325) -Codechange: split the client-side only settings from the settings stored in the savegame so there is no need to have a duplicate copy of it for new games.
rubidium
parents:
10707
diff
changeset
|
349 |
_settings_game.game_creation.snow_line = _settings_game.game_creation.snow_line_height * TILE_HEIGHT; |
0 | 350 |
} |
351 |
||
7990
70039e33e893
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
rubidium
parents:
7983
diff
changeset
|
352 |
static CommandCost TerraformTile_Clear(TileIndex tile, uint32 flags, uint z_new, Slope tileh_new) |
70039e33e893
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
rubidium
parents:
7983
diff
changeset
|
353 |
{ |
70039e33e893
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
rubidium
parents:
7983
diff
changeset
|
354 |
return DoCommand(tile, 0, 0, flags, CMD_LANDSCAPE_CLEAR); |
70039e33e893
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
rubidium
parents:
7983
diff
changeset
|
355 |
} |
70039e33e893
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
rubidium
parents:
7983
diff
changeset
|
356 |
|
5838
9c3129cb019b
(svn r8038) -Merge: the cpp branch. Effort of KUDr, Celestar, glx, Smoovius, stillunknown and pv2b.
rubidium
parents:
5835
diff
changeset
|
357 |
extern const TileTypeProcs _tile_type_clear_procs = { |
6449
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
358 |
DrawTile_Clear, ///< draw_tile_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
359 |
GetSlopeZ_Clear, ///< get_slope_z_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
360 |
ClearTile_Clear, ///< clear_tile_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
361 |
GetAcceptedCargo_Clear, ///< get_accepted_cargo_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
362 |
GetTileDesc_Clear, ///< get_tile_desc_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
363 |
GetTileTrackStatus_Clear, ///< get_tile_track_status_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
364 |
ClickTile_Clear, ///< click_tile_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
365 |
AnimateTile_Clear, ///< animate_tile_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
366 |
TileLoop_Clear, ///< tile_loop_clear |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
367 |
ChangeTileOwner_Clear, ///< change_tile_owner_clear |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
368 |
NULL, ///< get_produced_cargo_proc |
e520244dc71e
(svn r8859) -Cleanup: doxygen changes. Mostly @files missing tags and a few comments style.
belugas
parents:
6432
diff
changeset
|
369 |
NULL, ///< vehicle_enter_tile_proc |
7831
5dded9b03500
(svn r10698) -Codechange [FS#1082]: simplify the code related to foundations. Primarily removal of (duplicated|magic) code and introduction of few helper functions to ease foundation determination. Patch by frosch.
rubidium
parents:
7813
diff
changeset
|
370 |
GetFoundation_Clear, ///< get_foundation_proc |
7990
70039e33e893
(svn r11005) -Codechange: move the tiletype specific terraforming checks to the functions for those tile types.
rubidium
parents:
7983
diff
changeset
|
371 |
TerraformTile_Clear, ///< terraform_tile_proc |
0 | 372 |
}; |