annotate Engine/Tables/TileTable.cpp @ 2559:6ab1273bc507

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