annotate Overlays.cpp @ 1808:4002c0fe5efc

Слияние
author Ritor1
date Mon, 07 Oct 2013 09:31:32 +0600
parents 75fafd8ced59
children 28cb79ae2f6f
rev   line source
1165
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1104
diff changeset
1 #ifdef _MSC_VER
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1104
diff changeset
2 #define _CRT_SECURE_NO_WARNINGS
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1104
diff changeset
3 #endif
29a8defbad9e temporary _CRT_SECURE_NO_WARNINGS to remove some warnings
Grumpy7
parents: 1104
diff changeset
4
0
Ritor1
parents:
diff changeset
5 #include <stdlib.h>
Ritor1
parents:
diff changeset
6
Ritor1
parents:
diff changeset
7 #include "Overlays.h"
Ritor1
parents:
diff changeset
8 #include "Sprites.h"
Ritor1
parents:
diff changeset
9 #include "FrameTableInc.h"
Ritor1
parents:
diff changeset
10 #include "IconFrameTable.h"
Ritor1
parents:
diff changeset
11 #include "Time.h"
Ritor1
parents:
diff changeset
12 #include "Party.h"
Ritor1
parents:
diff changeset
13 #include "TurnEngine.h"
Ritor1
parents:
diff changeset
14 #include "LOD.h"
Ritor1
parents:
diff changeset
15 #include "Render.h"
569
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
16 #include "GUIWindow.h"
0
Ritor1
parents:
diff changeset
17
Ritor1
parents:
diff changeset
18 #include "mm7_data.h"
Ritor1
parents:
diff changeset
19
Ritor1
parents:
diff changeset
20
Ritor1
parents:
diff changeset
21
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24 struct OtherOverlayList *pOtherOverlayList = new OtherOverlayList; // idb
Ritor1
parents:
diff changeset
25 struct OverlayList *pOverlayList = new OverlayList;
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27
Ritor1
parents:
diff changeset
28
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
32 // inlined
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
33 //----- (mm6c::0045BD50) --------------------------------------------------
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
34 void OtherOverlayList::Reset()
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
35 {
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
36 for (uint i = 0; i < 50; ++i)
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
37 pOverlays[i].Reset();
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
38 }
0
Ritor1
parents:
diff changeset
39
Ritor1
parents:
diff changeset
40 //----- (004418B1) --------------------------------------------------------
Ritor1
parents:
diff changeset
41 int OtherOverlayList::_4418B1(int a2, int a3, int a4, int a5)
Ritor1
parents:
diff changeset
42 {
Ritor1
parents:
diff changeset
43 return 0;
Ritor1
parents:
diff changeset
44 }
Ritor1
parents:
diff changeset
45
Ritor1
parents:
diff changeset
46 //----- (004418B6) --------------------------------------------------------
Ritor1
parents:
diff changeset
47 int OtherOverlayList::_4418B6(int uOverlayID, __int16 a3, int a4, int a5, __int16 a6)
Ritor1
parents:
diff changeset
48 {
Ritor1
parents:
diff changeset
49 signed int v6; // edx@1
Ritor1
parents:
diff changeset
50 OtherOverlayList *v7; // eax@1
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
51 //signed int result; // eax@4
0
Ritor1
parents:
diff changeset
52 signed int v9; // esi@6
Ritor1
parents:
diff changeset
53 __int16 v10; // dx@9
Ritor1
parents:
diff changeset
54 __int16 v11; // dx@11
Ritor1
parents:
diff changeset
55
Ritor1
parents:
diff changeset
56 v6 = 0;
Ritor1
parents:
diff changeset
57 v7 = this;
Ritor1
parents:
diff changeset
58 while ( v7->pOverlays[0].field_6 > 0 )
Ritor1
parents:
diff changeset
59 {
Ritor1
parents:
diff changeset
60 ++v6;
Ritor1
parents:
diff changeset
61 v7 = (OtherOverlayList *)((char *)v7 + 20);
Ritor1
parents:
diff changeset
62 if ( v6 >= 50 )
Ritor1
parents:
diff changeset
63 return 0;
Ritor1
parents:
diff changeset
64 }
Ritor1
parents:
diff changeset
65 v7->pOverlays[0].field_0 = 0;
Ritor1
parents:
diff changeset
66 v7->pOverlays[0].field_A = 0;
Ritor1
parents:
diff changeset
67 v7->pOverlays[0].field_8 = 0;
Ritor1
parents:
diff changeset
68 v7->pOverlays[0].field_C = a3;
Ritor1
parents:
diff changeset
69 v9 = 0;
Ritor1
parents:
diff changeset
70 if ( (signed int)pOverlayList->uNumOverlays <= 0 )
Ritor1
parents:
diff changeset
71 {
Ritor1
parents:
diff changeset
72 LABEL_9:
Ritor1
parents:
diff changeset
73 v10 = 0;
Ritor1
parents:
diff changeset
74 }
Ritor1
parents:
diff changeset
75 else
Ritor1
parents:
diff changeset
76 {
Ritor1
parents:
diff changeset
77 while ( uOverlayID != pOverlayList->pOverlays[v9].uOverlayID )
Ritor1
parents:
diff changeset
78 {
Ritor1
parents:
diff changeset
79 ++v9;
Ritor1
parents:
diff changeset
80 if ( v9 >= (signed int)pOverlayList->uNumOverlays )
Ritor1
parents:
diff changeset
81 goto LABEL_9;
Ritor1
parents:
diff changeset
82 }
Ritor1
parents:
diff changeset
83 v10 = v9;
Ritor1
parents:
diff changeset
84 }
Ritor1
parents:
diff changeset
85 v7->pOverlays[0].field_2 = v10;
Ritor1
parents:
diff changeset
86 v7->pOverlays[0].field_4 = 0;
Ritor1
parents:
diff changeset
87 if ( a4 )
Ritor1
parents:
diff changeset
88 v11 = a4;
Ritor1
parents:
diff changeset
89 else
Ritor1
parents:
diff changeset
90 v11 = 8 * pSpriteFrameTable->pSpriteSFrames[pOverlayList->pOverlays[v10].uSpriteFramesetID].uAnimLength;
Ritor1
parents:
diff changeset
91 v7->pOverlays[0].field_6 = v11;
Ritor1
parents:
diff changeset
92 v7->pOverlays[0].field_10 = a5;
Ritor1
parents:
diff changeset
93 v7->pOverlays[0].field_E = a6;
142
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
94
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
95 bRedraw = true;
8b8fd4d83fdc Various things here and there
Nomad
parents: 0
diff changeset
96 return true;
0
Ritor1
parents:
diff changeset
97 }
Ritor1
parents:
diff changeset
98
Ritor1
parents:
diff changeset
99 //----- (00441964) --------------------------------------------------------
569
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
100 void OtherOverlayList::DrawTurnBasedIcon(int a2)
0
Ritor1
parents:
diff changeset
101 {
Ritor1
parents:
diff changeset
102 unsigned int result; // eax@1
Ritor1
parents:
diff changeset
103 IconFrameTable *v3; // ecx@6
Ritor1
parents:
diff changeset
104 void *v4; // eax@12
Ritor1
parents:
diff changeset
105 unsigned int v5; // [sp-8h] [bp-Ch]@4
Ritor1
parents:
diff changeset
106 int v6; // [sp-4h] [bp-8h]@4
Ritor1
parents:
diff changeset
107 Texture *v7; // [sp-4h] [bp-8h]@14
Ritor1
parents:
diff changeset
108
569
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
109 if ( pCurrentScreen != SCREEN_GAME || !pParty->bTurnBasedModeOn)
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
110 return;
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
111
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1165
diff changeset
112 if ( pTurnEngine->turn_stage == 3 )
0
Ritor1
parents:
diff changeset
113 {
Ritor1
parents:
diff changeset
114 v6 = pEventTimer->uStartTime;
Ritor1
parents:
diff changeset
115 v5 = pIconIDs_Turn[5 - pTurnEngine->uActionPointsLeft / 26];
Ritor1
parents:
diff changeset
116 }
Ritor1
parents:
diff changeset
117 else
Ritor1
parents:
diff changeset
118 {
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1165
diff changeset
119 if ( pTurnEngine->turn_stage == 1 )
0
Ritor1
parents:
diff changeset
120 {
Ritor1
parents:
diff changeset
121 v6 = dword_50C994;
Ritor1
parents:
diff changeset
122 v3 = pIconsFrameTable;
Ritor1
parents:
diff changeset
123 if ( dword_50C998_turnbased_icon_1A )
Ritor1
parents:
diff changeset
124 v5 = uIconID_TurnStart;
Ritor1
parents:
diff changeset
125 else
Ritor1
parents:
diff changeset
126 v5 = uIconID_TurnHour;
Ritor1
parents:
diff changeset
127 goto LABEL_12;
Ritor1
parents:
diff changeset
128 }
1340
22cb507446a4 turnengine refactoring continue
Gloval
parents: 1165
diff changeset
129 if ( pTurnEngine->turn_stage != 2 )
0
Ritor1
parents:
diff changeset
130 {
Ritor1
parents:
diff changeset
131 v4 = this;
Ritor1
parents:
diff changeset
132 goto LABEL_14;
Ritor1
parents:
diff changeset
133 }
Ritor1
parents:
diff changeset
134 v6 = pEventTimer->uStartTime;
Ritor1
parents:
diff changeset
135 v5 = uIconID_TurnStop;
Ritor1
parents:
diff changeset
136 }
Ritor1
parents:
diff changeset
137 v3 = pIconsFrameTable;
Ritor1
parents:
diff changeset
138 LABEL_12:
Ritor1
parents:
diff changeset
139 v4 = pIconsFrameTable->GetFrame(v5, v6);
Ritor1
parents:
diff changeset
140 LABEL_14:
Ritor1
parents:
diff changeset
141 v7 = &pIcons_LOD->pTextures[*((short *)v4 + 15)];
Ritor1
parents:
diff changeset
142 if ( pRenderer->pRenderD3D )
Ritor1
parents:
diff changeset
143 pRenderer->DrawTextureIndexed(0x18Au, 0x120u, v7);
Ritor1
parents:
diff changeset
144 else
Ritor1
parents:
diff changeset
145 pRenderer->DrawTextureTransparent(0x18Au, 0x120u, v7);
Ritor1
parents:
diff changeset
146 result = dword_50C994;
Ritor1
parents:
diff changeset
147 if ( dword_50C994 < dword_50C998_turnbased_icon_1A )
Ritor1
parents:
diff changeset
148 {
Ritor1
parents:
diff changeset
149 result = pEventTimer->uTimeElapsed + dword_50C994;
Ritor1
parents:
diff changeset
150 dword_50C994 = result;
Ritor1
parents:
diff changeset
151 if ( (signed int)result >= dword_50C998_turnbased_icon_1A )
Ritor1
parents:
diff changeset
152 dword_50C998_turnbased_icon_1A = 0;
Ritor1
parents:
diff changeset
153 }
Ritor1
parents:
diff changeset
154 }
Ritor1
parents:
diff changeset
155 // 4E28F8: using guessed type int pCurrentScreen;
Ritor1
parents:
diff changeset
156 // 50C994: using guessed type int dword_50C994;
Ritor1
parents:
diff changeset
157 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
Ritor1
parents:
diff changeset
158
Ritor1
parents:
diff changeset
159
Ritor1
parents:
diff changeset
160 //----- (00458D97) --------------------------------------------------------
Ritor1
parents:
diff changeset
161 void OverlayList::InitializeSprites()
Ritor1
parents:
diff changeset
162 {
472
7dfe960c323c BLV_UpdateDoors
Nomad
parents: 142
diff changeset
163 for (uint i = 0; i < uNumOverlays; ++i)
7dfe960c323c BLV_UpdateDoors
Nomad
parents: 142
diff changeset
164 pSpriteFrameTable->InitializeSprite(pOverlays[i].uSpriteFramesetID);
0
Ritor1
parents:
diff changeset
165 }
Ritor1
parents:
diff changeset
166
Ritor1
parents:
diff changeset
167 //----- (00458DBC) --------------------------------------------------------
Ritor1
parents:
diff changeset
168 void OverlayList::ToFile()
Ritor1
parents:
diff changeset
169 {
Ritor1
parents:
diff changeset
170 OverlayList *v1; // esi@1
Ritor1
parents:
diff changeset
171 FILE *v2; // eax@1
Ritor1
parents:
diff changeset
172 FILE *v3; // edi@1
Ritor1
parents:
diff changeset
173
Ritor1
parents:
diff changeset
174 v1 = this;
Ritor1
parents:
diff changeset
175 v2 = fopen("data\\doverlay.bin", "wb");
Ritor1
parents:
diff changeset
176 v3 = v2;
Ritor1
parents:
diff changeset
177 if ( !v2 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
178 Error("Unable to save doverlay.bin!");
0
Ritor1
parents:
diff changeset
179 fwrite(v1, 4u, 1u, v2);
Ritor1
parents:
diff changeset
180 fwrite(v1->pOverlays, 8u, v1->uNumOverlays, v3);
Ritor1
parents:
diff changeset
181 fclose(v3);
Ritor1
parents:
diff changeset
182 }
Ritor1
parents:
diff changeset
183
Ritor1
parents:
diff changeset
184 //----- (00458E08) --------------------------------------------------------
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
185 void OverlayList::FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
0
Ritor1
parents:
diff changeset
186 {
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
187 uint num_mm6_overlays = data_mm6 ? *(int *)data_mm6 : 0,
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
188 num_mm7_overlays = data_mm7 ? *(int *)data_mm7 : 0,
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
189 num_mm8_overlays = data_mm8 ? *(int *)data_mm8 : 0;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
190
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
191 uNumOverlays = num_mm6_overlays + num_mm7_overlays + num_mm8_overlays;
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
192 Assert(uNumOverlays);
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
193 Assert(!num_mm8_overlays);
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
194
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
195 pOverlays = (OverlayDesc *)malloc(uNumOverlays * sizeof(OverlayDesc));
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
196 memcpy(pOverlays, (char *)data_mm7 + 4, num_mm7_overlays * sizeof(OverlayDesc));
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
197 memcpy(pOverlays + num_mm7_overlays, (char *)data_mm6 + 4, num_mm6_overlays * sizeof(OverlayDesc));
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
198 memcpy(pOverlays + num_mm6_overlays + num_mm7_overlays, (char *)data_mm8 + 4, num_mm8_overlays * sizeof(OverlayDesc));
0
Ritor1
parents:
diff changeset
199 }
Ritor1
parents:
diff changeset
200
Ritor1
parents:
diff changeset
201 //----- (00458E4F) --------------------------------------------------------
Ritor1
parents:
diff changeset
202 bool OverlayList::FromFileTxt(const char *Args)
Ritor1
parents:
diff changeset
203 {
Ritor1
parents:
diff changeset
204 OverlayList *v2; // ebx@1
Ritor1
parents:
diff changeset
205 __int32 v3; // edi@1
Ritor1
parents:
diff changeset
206 FILE *v4; // eax@1
Ritor1
parents:
diff changeset
207 unsigned int v5; // esi@3
Ritor1
parents:
diff changeset
208 const void *v6; // ST18_4@9
Ritor1
parents:
diff changeset
209 void *v7; // eax@9
Ritor1
parents:
diff changeset
210 FILE *v8; // ST0C_4@11
Ritor1
parents:
diff changeset
211 char *i; // eax@11
Ritor1
parents:
diff changeset
212 unsigned __int16 v10; // ax@14
Ritor1
parents:
diff changeset
213 const char *v11; // ST1C_4@14
Ritor1
parents:
diff changeset
214 int v12; // eax@16
Ritor1
parents:
diff changeset
215 OverlayDesc *v13; // ecx@16
Ritor1
parents:
diff changeset
216 char v14; // zf@16
Ritor1
parents:
diff changeset
217 unsigned int v15; // eax@16
Ritor1
parents:
diff changeset
218 char Buf; // [sp+10h] [bp-2F0h]@3
Ritor1
parents:
diff changeset
219 FrameTableTxtLine v18; // [sp+204h] [bp-FCh]@4
Ritor1
parents:
diff changeset
220 FrameTableTxtLine v19; // [sp+280h] [bp-80h]@4
Ritor1
parents:
diff changeset
221 FILE *File; // [sp+2FCh] [bp-4h]@1
Ritor1
parents:
diff changeset
222 unsigned int Argsa; // [sp+308h] [bp+8h]@3
Ritor1
parents:
diff changeset
223
Ritor1
parents:
diff changeset
224 v2 = this;
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
225 free(this->pOverlays);
0
Ritor1
parents:
diff changeset
226 v3 = 0;
Ritor1
parents:
diff changeset
227 v2->pOverlays = 0;
Ritor1
parents:
diff changeset
228 v2->uNumOverlays = 0;
Ritor1
parents:
diff changeset
229 v4 = fopen(Args, "r");
Ritor1
parents:
diff changeset
230 File = v4;
Ritor1
parents:
diff changeset
231 if ( !v4 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
232 Error("ObjectDescriptionList::load - Unable to open file: %s.");
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
233
0
Ritor1
parents:
diff changeset
234 v5 = 0;
Ritor1
parents:
diff changeset
235 Argsa = 0;
Ritor1
parents:
diff changeset
236 if ( fgets(&Buf, 490, v4) )
Ritor1
parents:
diff changeset
237 {
Ritor1
parents:
diff changeset
238 do
Ritor1
parents:
diff changeset
239 {
Ritor1
parents:
diff changeset
240 *strchr(&Buf, 10) = 0;
703
a9c1fb7483c2 monster parser almost complete.
Gloval
parents: 701
diff changeset
241 memcpy(&v19, txt_file_frametable_parser(&Buf, &v18), sizeof(v19));
701
d5b16a44d9b3 frame_table parser, new files for UI func
Gloval
parents: 569
diff changeset
242 if ( v19.uPropCount && *v19.pProperties[0] != 47 )
0
Ritor1
parents:
diff changeset
243 ++Argsa;
Ritor1
parents:
diff changeset
244 }
Ritor1
parents:
diff changeset
245 while ( fgets(&Buf, 490, File) );
Ritor1
parents:
diff changeset
246 v5 = Argsa;
Ritor1
parents:
diff changeset
247 v3 = 0;
Ritor1
parents:
diff changeset
248 }
Ritor1
parents:
diff changeset
249 v6 = v2->pOverlays;
Ritor1
parents:
diff changeset
250 v2->uNumOverlays = v5;
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
251 v7 = malloc(8 * v5);
0
Ritor1
parents:
diff changeset
252 v2->pOverlays = (OverlayDesc *)v7;
Ritor1
parents:
diff changeset
253 if ( v7 == (void *)v3 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
254 Error("OverlayDescriptionList::load - Out of Memory!");
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
255
0
Ritor1
parents:
diff changeset
256 memset(v7, v3, 8 * v2->uNumOverlays);
Ritor1
parents:
diff changeset
257 v8 = File;
Ritor1
parents:
diff changeset
258 v2->uNumOverlays = v3;
Ritor1
parents:
diff changeset
259 fseek(v8, v3, v3);
Ritor1
parents:
diff changeset
260 for ( i = fgets(&Buf, 490, File); i; i = fgets(&Buf, 490, File) )
Ritor1
parents:
diff changeset
261 {
Ritor1
parents:
diff changeset
262 *strchr(&Buf, 10) = 0;
703
a9c1fb7483c2 monster parser almost complete.
Gloval
parents: 701
diff changeset
263 memcpy(&v19, txt_file_frametable_parser(&Buf, &v18), sizeof(v19));
701
d5b16a44d9b3 frame_table parser, new files for UI func
Gloval
parents: 569
diff changeset
264 if ( v19.uPropCount && *v19.pProperties[0] != 47 )
0
Ritor1
parents:
diff changeset
265 {
Ritor1
parents:
diff changeset
266 v10 = atoi(v19.pProperties[0]);
Ritor1
parents:
diff changeset
267 v11 = v19.pProperties[1];
Ritor1
parents:
diff changeset
268 v2->pOverlays[v2->uNumOverlays].uOverlayID = v10;
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 783
diff changeset
269 if ( _stricmp(v11, "center") )
0
Ritor1
parents:
diff changeset
270 {
1104
5d5c78088274 strcmpi to stricmp conversion
Grumpy7
parents: 783
diff changeset
271 v12 = _stricmp(v19.pProperties[1], "transparent");
0
Ritor1
parents:
diff changeset
272 v13 = v2->pOverlays;
Ritor1
parents:
diff changeset
273 v14 = v12 == 0;
Ritor1
parents:
diff changeset
274 v15 = v2->uNumOverlays;
Ritor1
parents:
diff changeset
275 if ( v14 )
Ritor1
parents:
diff changeset
276 v13[v15].uOverlayType = 2;
Ritor1
parents:
diff changeset
277 else
Ritor1
parents:
diff changeset
278 v13[v15].uOverlayType = 1;
Ritor1
parents:
diff changeset
279 }
Ritor1
parents:
diff changeset
280 else
Ritor1
parents:
diff changeset
281 {
Ritor1
parents:
diff changeset
282 v2->pOverlays[v2->uNumOverlays].uOverlayType = 0;
Ritor1
parents:
diff changeset
283 }
Ritor1
parents:
diff changeset
284 v2->pOverlays[v2->uNumOverlays++].uSpriteFramesetID = pSpriteFrameTable->FastFindSprite(
Ritor1
parents:
diff changeset
285 (char *)v19.pProperties[2]);
Ritor1
parents:
diff changeset
286 }
Ritor1
parents:
diff changeset
287 }
Ritor1
parents:
diff changeset
288 fclose(File);
Ritor1
parents:
diff changeset
289 return 1;
Ritor1
parents:
diff changeset
290 }
Ritor1
parents:
diff changeset
291
Ritor1
parents:
diff changeset
292
Ritor1
parents:
diff changeset
293 //----- (0045855F) --------------------------------------------------------
Ritor1
parents:
diff changeset
294 void OtherOverlay::Reset()
Ritor1
parents:
diff changeset
295 {
Ritor1
parents:
diff changeset
296 this->field_10 = 65536;
Ritor1
parents:
diff changeset
297 this->field_A = 0;
Ritor1
parents:
diff changeset
298 this->field_8 = 0;
Ritor1
parents:
diff changeset
299 this->field_6 = 0;
Ritor1
parents:
diff changeset
300 this->field_4 = 0;
Ritor1
parents:
diff changeset
301 this->field_2 = 0;
Ritor1
parents:
diff changeset
302 this->field_C = 0;
Ritor1
parents:
diff changeset
303 this->field_E = 0;
Ritor1
parents:
diff changeset
304 }
Ritor1
parents:
diff changeset
305
Ritor1
parents:
diff changeset
306 //----- (004584B8) --------------------------------------------------------
Ritor1
parents:
diff changeset
307 OtherOverlay::OtherOverlay()
Ritor1
parents:
diff changeset
308 {
Ritor1
parents:
diff changeset
309 this->field_A = 0;
Ritor1
parents:
diff changeset
310 this->field_8 = 0;
Ritor1
parents:
diff changeset
311 this->field_6 = 0;
Ritor1
parents:
diff changeset
312 this->field_4 = 0;
Ritor1
parents:
diff changeset
313 this->field_2 = 0;
Ritor1
parents:
diff changeset
314 this->field_C = 0;
Ritor1
parents:
diff changeset
315 this->field_E = 0;
Ritor1
parents:
diff changeset
316 this->field_10 = 65536;
Ritor1
parents:
diff changeset
317 }