annotate TileTable.cpp @ 1035:306ec23b37df

004C1EE5 & other stuff
author Nomad
date Wed, 22 May 2013 14:12:51 +0200
parents f24fb0d64a5c
children 5d5c78088274
rev   line source
761
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
1 #include <assert.h>
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
2 #include <stdio.h>
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
3 #include <stdlib.h>
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
4 #include <string.h>
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
5
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
6 #include "TileFrameTable.h"
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
7 #include "FrameTableInc.h"
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
8 #include "Allocator.h"
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
9 #include "PaletteManager.h"
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
10 #include "LOD.h"
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
11
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
12 #include "mm7_data.h"
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
13
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
14
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
15 //----- (00487E1D) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
16 TileTable::~TileTable()
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
17 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
18 if ( pTiles )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
19 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
20 pAllocator->FreeChunk(pTiles);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
21 pTiles = nullptr;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
22 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
23 sNumTiles = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
24 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
25
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
26 //----- (00487E3B) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
27 TileDesc *TileTable::GetTileById(unsigned int uTileID)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
28 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
29 /*TileDesc *result; // eax@3
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
30
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
31 if ( (uTileID & 0x80000000u) != 0 || (signed int)uTileID > (signed int)(this->uNumTiles - 1) )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
32 result = this->pTiles;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
33 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
34 result = &this->pTiles[uTileID];
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
35 return result;*/
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
36
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
37 assert(uTileID < sNumTiles);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
38 return &pTiles[uTileID];
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
39 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
40
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
41 //----- (00487E58) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
42 void TileTable::InitializeTileset(Tileset tileset)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
43 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
44 for (int i = 0; i < sNumTiles; ++i )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
45 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
46 if (pTiles[i].tileset == tileset && pTiles[i].pTileName[0] )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
47 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
48 pTiles[i].uBitmapID = pBitmaps_LOD->LoadTexture(pTiles[i].pTileName);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
49 if ( pTiles[i].uBitmapID != -1 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
50 pBitmaps_LOD->pTextures[pTiles[i].uBitmapID].palette_id2 = pPaletteManager->LoadPalette(pBitmaps_LOD->pTextures[pTiles[i].uBitmapID].palette_id1);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
51 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
52 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
53 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
54
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
55 //----- (00487ED6) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
56 int TileTable::GetTileForTerrainType( signed int terrain_type, bool not_random )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
57 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
58 int v5; // edx@3
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
59 int v6; // edx@11
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
60
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
61 if ( not_random || terrain_type > 8 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
62 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
63 return GetTileId(terrain_type, 0);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
64 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
65 v5 = rand() % 50;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
66 if ( v5 < 20)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
67 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
68 return GetTileId(terrain_type, 0);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
69 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
70 else if ( v5 < 30 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
71 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
72 return GetTileId(terrain_type, 1);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
73 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
74 else if ( v5 < 40 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
75 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
76 return GetTileId(terrain_type, 2);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
77 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
78 else if ( v5 < 48 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
79 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
80 return GetTileId(terrain_type, 3);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
81 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
82 v6 = rand() % 8;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
83 return GetTileId(terrain_type, v6+4);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
84 return 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
85 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
86
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
87 //----- (00487F84) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
88 unsigned int TileTable::GetTileId(unsigned int uTerrainType, unsigned int uSection)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
89 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
90 for (int i=0; i<sNumTiles; ++i)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
91 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
92 if( (pTiles[i].tileset==uTerrainType)&&(pTiles[i].uSection==uSection))
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
93 return i;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
94 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
95 return 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
96 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
97
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
98 //----- (00487FB4) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
99 void TileTable::ToFile()
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
100 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
101 TileTable *v1; // esi@1
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
102 FILE *v2; // eax@1
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
103 FILE *v3; // edi@1
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
104
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
105 auto Str = this;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
106
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
107 v1 = Str;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
108 v2 = fopen("data\\dtile.bin", "wb");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
109 v3 = v2;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
110 if ( !v2 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
111 Abortf("Unable to save dtile.bin!");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
112 fwrite(v1, 4u, 1u, v2);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
113 fwrite(v1->pTiles, 0x1Au, v1->sNumTiles, v3);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
114 fclose(v3);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
115 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
116
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
117 //----- (00488000) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
118 void TileTable::FromFile(void *pSerialized)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
119 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
120 sNumTiles = *(int *)pSerialized;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
121 pTiles = (TileDesc *)pAllocator->AllocNamedChunk(pTiles, sizeof(TileDesc) * sNumTiles, "Tile Descrip");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
122 memcpy(pTiles, (char *)pSerialized + 4, sizeof(TileDesc) * sNumTiles);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
123 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
124
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
125 //----- (00488047) --------------------------------------------------------
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
126 int TileTable::FromFileTxt(const char *pFilename)
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
127 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
128 TileTable *v2; // ebp@1
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
129 FILE *v3; // eax@1
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
130 unsigned int v4; // ebx@3
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
131 void *v5; // eax@9
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
132 unsigned __int16 v6; // ax@14
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
133 const char *v7; // ST14_4@14
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
134 unsigned __int16 v8; // ax@14
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
135 const char *v9; // esi@14
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
136 int v10; // eax@17
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
137 int v11; // eax@20
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
138 int v12; // eax@22
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
139 int v13; // eax@24
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
140 int v14; // eax@26
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
141 int v15; // eax@28
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
142 int v16; // eax@30
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
143 int v17; // eax@32
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
144 int v18; // eax@34
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
145 int v19; // eax@36
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
146 int v20; // eax@38
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
147 int v21; // eax@40
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
148 int v22; // eax@42
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
149 int v23; // eax@44
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
150 int v24; // eax@46
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
151 int v25; // eax@48
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
152 int v26; // eax@50
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
153 int v27; // eax@52
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
154 int v28; // eax@54
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
155 int v29; // eax@56
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
156 int v30; // eax@58
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
157 int v31; // eax@60
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
158 int v32; // eax@62
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
159 int v33; // eax@64
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
160 int v34; // eax@66
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
161 const char *v35; // esi@67
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
162 int v36; // eax@70
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
163 int v37; // eax@73
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
164 int v38; // eax@75
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
165 int v39; // eax@77
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
166 int v40; // eax@79
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
167 int v41; // eax@81
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
168 int v42; // eax@83
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
169 int v43; // eax@85
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
170 int v44; // eax@87
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
171 int v45; // eax@89
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
172 int v46; // eax@91
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
173 int v47; // eax@93
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
174 int v48; // eax@108
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
175 int v49; // eax@110
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
176 int v50; // eax@112
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
177 int v51; // eax@114
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
178 int v52; // eax@116
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
179 int v53; // eax@118
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
180 int v54; // eax@120
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
181 int v55; // eax@122
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
182 int v56; // eax@124
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
183 int v57; // eax@126
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
184 int v58; // eax@128
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
185 int v59; // eax@130
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
186 int v60; // eax@132
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
187 int v61; // eax@134
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
188 int v62; // eax@136
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
189 int v63; // eax@138
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
190 int v64; // eax@140
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
191 int v65; // eax@142
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
192 int v66; // eax@144
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
193 int v67; // eax@146
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
194 int v68; // eax@148
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
195 int v69; // eax@150
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
196 int v70; // eax@151
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
197 int j; // edi@152
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
198 const char *v72; // esi@153
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
199 int v73; // eax@154
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
200 int v74; // eax@156
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
201 int v75; // eax@160
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
202 int v76; // eax@162
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
203 int v77; // eax@164
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
204 int v78; // eax@166
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
205 int v79; // eax@168
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
206 int v80; // eax@170
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
207 FILE *i; // [sp-10h] [bp-304h]@3
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
208 FILE *File; // [sp+4h] [bp-2F0h]@1
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
209 FrameTableTxtLine v84; // [sp+8h] [bp-2ECh]@4
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
210 FrameTableTxtLine v85; // [sp+84h] [bp-270h]@4
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
211 char Buf; // [sp+100h] [bp-1F4h]@4
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
212
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
213 v2 = this;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
214 v3 = fopen(pFilename, "r");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
215 File = v3;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
216 if ( !v3 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
217 Abortf("TileTable::load - Unable to open file: %s.");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
218 v4 = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
219 for ( i = v3; fgets(&Buf, 490, i); i = File )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
220 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
221 *strchr(&Buf, 10) = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
222 memcpy(&v84, txt_file_frametable_parser(&Buf, &v85), sizeof(v84));
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
223 if ( v84.uPropCount && *v84.pProperties[0] != 47 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
224 ++v4;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
225 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
226 v2->sNumTiles = v4;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
227 v5 = pAllocator->AllocNamedChunk(v2->pTiles, 26 * v4, "Tile Descrip");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
228 v2->pTiles = (TileDesc *)v5;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
229 if ( !v5 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
230 Abortf("TileTable::Load - Out of Memory!");
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
231 memset(v5, 0, 26 * v2->sNumTiles);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
232 v2->sNumTiles = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
233 fseek(File, 0, 0);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
234 if ( fgets(&Buf, 490, File) )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
235 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
236 while ( 1 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
237 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
238 *strchr(&Buf, 10) = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
239 memcpy(&v84, txt_file_frametable_parser(&Buf, &v85), sizeof(v84));
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
240 if ( v84.uPropCount )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
241 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
242 if ( *v84.pProperties[0] != 47 )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
243 break;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
244 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
245 LABEL_173:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
246 if ( !fgets(&Buf, 490, File) )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
247 goto LABEL_174;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
248 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
249 strcpy(v2->pTiles[v2->sNumTiles].pTileName, v84.pProperties[0]);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
250 v6 = atoi(v84.pProperties[1]);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
251 v7 = v84.pProperties[2];
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
252 v2->pTiles[v2->sNumTiles].uTileID = v6;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
253 v8 = atoi(v7);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
254 v9 = v84.pProperties[3];
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
255 v2->pTiles[v2->sNumTiles].uBitmapID = v8;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
256 v2->pTiles[v2->sNumTiles].tileset = Tileset_Grass;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
257 if ( _strcmpi(v9, "TTtype_NULL") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
258 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
259 if ( _strcmpi(v9, "TTtype_Start") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
260 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
261 if ( _strcmpi(v9, "TTtype_Grass") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
262 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
263 if ( _strcmpi(v9, "TTtype_Cracked") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
264 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
265 if ( _strcmpi(v9, "TTtype_Snow") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
266 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
267 if ( _strcmpi(v9, "TTtype_Sand") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
268 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
269 if ( _strcmpi(v9, "TTtype_Volcano") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
270 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
271 if ( _strcmpi(v9, "TTtype_Dirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
272 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
273 if ( _strcmpi(v9, "TTtype_Water") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
274 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
275 if ( _strcmpi(v9, "TTtype_Tropical") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
276 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
277 if ( _strcmpi(v9, "TTtype_Swamp") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
278 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
279 if ( _strcmpi(v9, "TTtype_City") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
280 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
281 if ( _strcmpi(v9, "TTtype_RoadGrassCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
282 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
283 if ( _strcmpi(v9, "TTtype_RoadGrassDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
284 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
285 if ( _strcmpi(v9, "TTtype_RoadCrackedCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
286 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
287 if ( _strcmpi(v9, "TTtype_RoadCrackedDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
288 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
289 if ( _strcmpi(v9, "TTtype_RoadSandCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
290 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
291 if ( _strcmpi(v9, "TTtype_RoadSandDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
292 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
293 if ( _strcmpi(v9, "TTtype_RoadVolcanoCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
294 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
295 if ( _strcmpi(v9, "TTtype_RoadVolcanoDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
296 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
297 if ( _strcmpi(v9, "TTtype_RoadSwampCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
298 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
299 if ( _strcmpi(v9, "TTtype_RoadSwampDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
300 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
301 if ( _strcmpi(v9, "TTtype_RoadTropicalCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
302 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
303 if ( _strcmpi(v9, "TTtype_RoadTropicalDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
304 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
305 if ( _strcmpi(v9, "TTtype_RoadSnowCobble") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
306 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
307 if ( _strcmpi(v9, "TTtype_RoadSnowDirt") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
308 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
309 if ( !_strcmpi(v9, "TTtype_RoadCityStone") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
310 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
311 v34 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
312 *(char *)v34 |= 0x1Cu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
313 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
314 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
315 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
316 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
317 v33 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
318 *(char *)v33 |= 0xDu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
319 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
320 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
321 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
322 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
323 v32 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
324 *(char *)v32 |= 0xCu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
325 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
326 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
327 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
328 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
329 v31 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
330 *(char *)v31 |= 0x1Bu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
331 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
332 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
333 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
334 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
335 v30 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
336 *(char *)v30 |= 0x1Au;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
337 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
338 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
339 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
340 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
341 v29 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
342 *(char *)v29 |= 0x19u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
343 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
344 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
345 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
346 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
347 v28 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
348 *(char *)v28 |= 0x18u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
349 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
350 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
351 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
352 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
353 v27 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
354 *(char *)v27 |= 0x11u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
355 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
356 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
357 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
358 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
359 v26 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
360 *(char *)v26 |= 0x10u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
361 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
362 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
363 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
364 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
365 v25 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
366 *(char *)v25 |= 0xFu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
367 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
368 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
369 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
370 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
371 v24 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
372 *(char *)v24 |= 0xEu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
373 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
374 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
375 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
376 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
377 v23 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
378 *(char *)v23 |= 0x17u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
379 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
380 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
381 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
382 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
383 v22 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
384 *(char *)v22 |= 0x16u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
385 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
386 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
387 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
388 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
389 v21 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
390 *(char *)v21 |= 0xBu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
391 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
392 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
393 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
394 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
395 v20 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
396 *(char *)v20 |= 0xAu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
397 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
398 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
399 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
400 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
401 v19 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
402 *(char *)v19 |= 9u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
403 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
404 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
405 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
406 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
407 v18 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
408 *(char *)v18 |= 7u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
409 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
410 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
411 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
412 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
413 v17 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
414 *(char *)v17 |= 8u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
415 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
416 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
417 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
418 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
419 v16 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
420 *(char *)v16 |= 5u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
421 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
422 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
423 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
424 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
425 v15 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
426 *(char *)v15 |= 4u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
427 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
428 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
429 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
430 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
431 v14 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
432 *(char *)v14 |= 3u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
433 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
434 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
435 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
436 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
437 v13 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
438 *(char *)v13 |= 2u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
439 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
440 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
441 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
442 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
443 v12 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
444 *(char *)v12 |= 1u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
445 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
446 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
447 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
448 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
449 v11 = (int)&v2->pTiles[v2->sNumTiles].tileset;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
450 *(char *)v11 |= 6u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
451 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
452 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
453 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
454 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
455 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
456 v10 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
457 *(char *)v10 |= 0xFEu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
458 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
459 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
460 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
461 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
462 LOBYTE(v2->pTiles[v2->sNumTiles].tileset) = -1;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
463 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
464 v35 = v84.pProperties[4];
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
465 v2->pTiles[v2->sNumTiles].uSection = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
466 v2->pTiles[v2->sNumTiles].uAttributes = 0;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
467 if ( !_strcmpi(v35, "TTsect_NULL") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
468 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
469 LOBYTE(v2->pTiles[v2->sNumTiles].uSection) = -1;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
470 LABEL_152:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
471 for ( j = 5; j < v84.uPropCount; ++j )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
472 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
473 v72 = v84.pProperties[j];
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
474 if ( _strcmpi(v84.pProperties[j], "TTattr_Burn") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
475 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
476 if ( _strcmpi(v72, "TTattr_Water") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
477 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
478 if ( _strcmpi(v72, "TTattr_Water2") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
479 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
480 if ( _strcmpi(v72, "TTattr_Block") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
481 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
482 if ( _strcmpi(v72, "TTattr_Repulse") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
483 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
484 if ( _strcmpi(v72, "TTattr_Flat") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
485 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
486 if ( _strcmpi(v72, "TTattr_Wave") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
487 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
488 if ( _strcmpi(v72, "TTattr_NoDraw") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
489 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
490 if ( !_strcmpi(v72, "TTattr_Transition") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
491 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
492 v80 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
493 *(short *)v80 |= 0x200u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
494 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
495 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
496 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
497 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
498 v79 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
499 *(char *)v79 |= 0x40u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
500 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
501 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
502 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
503 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
504 v78 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
505 *(char *)v78 |= 0x20u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
506 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
507 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
508 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
509 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
510 v77 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
511 *(char *)v77 |= 0x10u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
512 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
513 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
514 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
515 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
516 v76 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
517 *(char *)v76 |= 8u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
518 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
519 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
520 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
521 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
522 v75 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
523 *(char *)v75 |= 4u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
524 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
525 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
526 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
527 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
528 HIBYTE(v2->pTiles[v2->sNumTiles].uAttributes) |= 1u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
529 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
530 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
531 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
532 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
533 v74 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
534 *(char *)v74 |= 2u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
535 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
536 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
537 else
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
538 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
539 v73 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
540 *(char *)v73 |= 1u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
541 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
542 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
543 ++v2->sNumTiles;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
544 goto LABEL_173;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
545 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
546 if ( !_strcmpi(v35, "TTsect_Start") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
547 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
548 v36 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
549 *(char *)v36 |= 0xFEu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
550 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
551 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
552 if ( !_strcmpi(v35, "TTsect_Base1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
553 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
554 if ( !_strcmpi(v35, "TTsect_Base2") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
555 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
556 v37 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
557 *(char *)v37 |= 1u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
558 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
559 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
560 if ( !_strcmpi(v35, "TTsect_Base3") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
561 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
562 v38 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
563 *(char *)v38 |= 2u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
564 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
565 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
566 if ( !_strcmpi(v35, "TTsect_Base4") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
567 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
568 v39 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
569 *(char *)v39 |= 3u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
570 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
571 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
572 if ( !_strcmpi(v35, "TTsect_Special1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
573 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
574 v40 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
575 *(char *)v40 |= 4u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
576 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
577 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
578 if ( !_strcmpi(v35, "TTsect_Special2") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
579 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
580 v41 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
581 *(char *)v41 |= 5u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
582 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
583 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
584 if ( !_strcmpi(v35, "TTsect_Special3") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
585 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
586 v42 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
587 *(char *)v42 |= 6u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
588 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
589 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
590 if ( !_strcmpi(v35, "TTsect_Special4") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
591 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
592 v43 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
593 *(char *)v43 |= 7u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
594 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
595 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
596 if ( !_strcmpi(v35, "TTsect_Special5") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
597 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
598 v44 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
599 *(char *)v44 |= 8u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
600 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
601 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
602 if ( !_strcmpi(v35, "TTsect_Special6") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
603 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
604 v45 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
605 *(char *)v45 |= 9u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
606 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
607 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
608 if ( !_strcmpi(v35, "TTsect_Special7") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
609 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
610 v46 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
611 *(char *)v46 |= 0xAu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
612 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
613 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
614 if ( !_strcmpi(v35, "TTsect_Special8") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
615 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
616 v47 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
617 *(char *)v47 |= 0xBu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
618 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
619 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
620 if ( !_strcmpi(v35, "TTsect_NE1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
621 goto LABEL_130;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
622 if ( !_strcmpi(v35, "TTsect_NW1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
623 goto LABEL_134;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
624 if ( !_strcmpi(v35, "TTsect_SE1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
625 goto LABEL_130;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
626 if ( !_strcmpi(v35, "TTsect_SW1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
627 goto LABEL_134;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
628 if ( !_strcmpi(v35, "TTsect_E1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
629 goto LABEL_138;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
630 if ( !_strcmpi(v35, "TTsect_W1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
631 goto LABEL_140;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
632 if ( !_strcmpi(v35, "TTsect_N1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
633 goto LABEL_142;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
634 if ( !_strcmpi(v35, "TTsect_S1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
635 goto LABEL_144;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
636 if ( !_strcmpi(v35, "TTsect_XNE1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
637 goto LABEL_146;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
638 if ( _strcmpi(v35, "TTsect_XNW1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
639 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
640 if ( !_strcmpi(v35, "TTsect_XSE1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
641 goto LABEL_146;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
642 if ( _strcmpi(v35, "TTsect_XSW1") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
643 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
644 if ( !_strcmpi(v35, "TTsect_CROS") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
645 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
646 LABEL_151:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
647 v70 = (int)&v2->pTiles[v2->sNumTiles].uAttributes;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
648 *(short *)v70 |= 0x200u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
649 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
650 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
651 if ( !_strcmpi(v35, "TTsect_NS") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
652 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
653 v48 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
654 *(char *)v48 |= 1u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
655 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
656 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
657 if ( !_strcmpi(v35, "TTsect_EW") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
658 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
659 v49 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
660 *(char *)v49 |= 2u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
661 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
662 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
663 if ( !_strcmpi(v35, "TTsect_N_E") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
664 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
665 v50 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
666 *(char *)v50 |= 3u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
667 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
668 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
669 if ( !_strcmpi(v35, "TTsect_N_W") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
670 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
671 v51 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
672 *(char *)v51 |= 4u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
673 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
674 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
675 if ( !_strcmpi(v35, "TTsect_S_E") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
676 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
677 v52 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
678 *(char *)v52 |= 5u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
679 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
680 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
681 if ( !_strcmpi(v35, "TTsect_S_W") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
682 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
683 v53 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
684 *(char *)v53 |= 6u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
685 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
686 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
687 if ( !_strcmpi(v35, "TTsect_NS_E") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
688 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
689 v54 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
690 *(char *)v54 |= 7u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
691 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
692 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
693 if ( !_strcmpi(v35, "TTsect_NS_W") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
694 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
695 v55 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
696 *(char *)v55 |= 8u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
697 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
698 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
699 if ( !_strcmpi(v35, "TTsect_EW_N") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
700 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
701 v56 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
702 *(char *)v56 |= 9u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
703 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
704 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
705 if ( !_strcmpi(v35, "TTsect_EW_S") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
706 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
707 v57 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
708 *(char *)v57 |= 0xAu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
709 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
710 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
711 if ( !_strcmpi(v35, "TTsect_NCAP") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
712 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
713 v58 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
714 *(char *)v58 |= 0xBu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
715 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
716 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
717 if ( !_strcmpi(v35, "TTsect_ECAP") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
718 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
719 LABEL_130:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
720 v59 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
721 *(char *)v59 |= 0xCu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
722 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
723 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
724 if ( !_strcmpi(v35, "TTsect_SCAP") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
725 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
726 v60 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
727 *(char *)v60 |= 0xDu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
728 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
729 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
730 if ( !_strcmpi(v35, "TTsect_WCAP") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
731 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
732 LABEL_134:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
733 v61 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
734 *(char *)v61 |= 0xEu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
735 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
736 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
737 if ( !_strcmpi(v35, "TTsect_DN") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
738 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
739 v62 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
740 *(char *)v62 |= 0xFu;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
741 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
742 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
743 if ( !_strcmpi(v35, "TTsect_DS") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
744 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
745 LABEL_138:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
746 v63 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
747 *(char *)v63 |= 0x10u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
748 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
749 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
750 if ( !_strcmpi(v35, "TTsect_DW") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
751 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
752 LABEL_140:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
753 v64 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
754 *(char *)v64 |= 0x11u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
755 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
756 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
757 if ( !_strcmpi(v35, "TTsect_DE") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
758 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
759 LABEL_142:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
760 v65 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
761 *(char *)v65 |= 0x12u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
762 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
763 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
764 if ( !_strcmpi(v35, "TTsect_DSW") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
765 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
766 LABEL_144:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
767 v66 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
768 *(char *)v66 |= 0x13u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
769 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
770 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
771 if ( !_strcmpi(v35, "TTsect_DNE") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
772 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
773 LABEL_146:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
774 v67 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
775 *(char *)v67 |= 0x14u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
776 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
777 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
778 if ( !_strcmpi(v35, "TTsect_DSE") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
779 {
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
780 v68 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
781 *(char *)v68 |= 0x15u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
782 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
783 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
784 if ( _strcmpi(v35, "TTsect_DNW") )
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
785 goto LABEL_152;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
786 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
787 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
788 v69 = (int)&v2->pTiles[v2->sNumTiles].uSection;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
789 *(char *)v69 |= 0x16u;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
790 goto LABEL_151;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
791 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
792 LABEL_174:
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
793 fclose(File);
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
794 return 1;
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
795 }
f24fb0d64a5c TileTable File
Gloval
parents:
diff changeset
796