annotate Overlays.cpp @ 2472:e42e01ff1526

goto cleaning
author zipi
date Mon, 18 Aug 2014 18:17:20 +0100
parents f4af3b203f65
children
rev   line source
2415
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2369
diff changeset
1 #define _CRTDBG_MAP_ALLOC
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2369
diff changeset
2 #include <stdlib.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2369
diff changeset
3 #include <crtdbg.h>
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2369
diff changeset
4
f4af3b203f65 LOD.cpp cleaned and search memory corrupt
Ritor1
parents: 2369
diff changeset
5
2253
aff7a7b072b7 adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents: 2242
diff changeset
6 #define _CRT_SECURE_NO_WARNINGS
0
Ritor1
parents:
diff changeset
7 #include <stdlib.h>
2336
d6887ee81068 header file include cleanup
Grumpy7
parents: 2274
diff changeset
8 #include "ErrorHandling.h"
0
Ritor1
parents:
diff changeset
9
Ritor1
parents:
diff changeset
10 #include "Overlays.h"
Ritor1
parents:
diff changeset
11 #include "Sprites.h"
Ritor1
parents:
diff changeset
12 #include "FrameTableInc.h"
Ritor1
parents:
diff changeset
13 #include "IconFrameTable.h"
2044
28cb79ae2f6f Time.h rename
Ritor1
parents: 1583
diff changeset
14 #include "Timer.h"
0
Ritor1
parents:
diff changeset
15 #include "Party.h"
Ritor1
parents:
diff changeset
16 #include "TurnEngine.h"
Ritor1
parents:
diff changeset
17 #include "LOD.h"
Ritor1
parents:
diff changeset
18 #include "Render.h"
569
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
19 #include "GUIWindow.h"
0
Ritor1
parents:
diff changeset
20
Ritor1
parents:
diff changeset
21 #include "mm7_data.h"
Ritor1
parents:
diff changeset
22
Ritor1
parents:
diff changeset
23
Ritor1
parents:
diff changeset
24
Ritor1
parents:
diff changeset
25
Ritor1
parents:
diff changeset
26
Ritor1
parents:
diff changeset
27 struct OtherOverlayList *pOtherOverlayList = new OtherOverlayList; // idb
Ritor1
parents:
diff changeset
28 struct OverlayList *pOverlayList = new OverlayList;
Ritor1
parents:
diff changeset
29
Ritor1
parents:
diff changeset
30
Ritor1
parents:
diff changeset
31
Ritor1
parents:
diff changeset
32
Ritor1
parents:
diff changeset
33
Ritor1
parents:
diff changeset
34
783
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
35 // inlined
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
36 //----- (mm6c::0045BD50) --------------------------------------------------
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
37 void OtherOverlayList::Reset()
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
38 {
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
39 for (uint i = 0; i < 50; ++i)
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
40 pOverlays[i].Reset();
b27dd658ea77 Taveling by foot fixed.
Nomad
parents: 703
diff changeset
41 }
0
Ritor1
parents:
diff changeset
42
Ritor1
parents:
diff changeset
43 //----- (004418B1) --------------------------------------------------------
Ritor1
parents:
diff changeset
44 int OtherOverlayList::_4418B1(int a2, int a3, int a4, int a5)
Ritor1
parents:
diff changeset
45 {
Ritor1
parents:
diff changeset
46 return 0;
Ritor1
parents:
diff changeset
47 }
Ritor1
parents:
diff changeset
48
Ritor1
parents:
diff changeset
49 //----- (004418B6) --------------------------------------------------------
Ritor1
parents:
diff changeset
50 int OtherOverlayList::_4418B6(int uOverlayID, __int16 a3, int a4, int a5, __int16 a6)
Ritor1
parents:
diff changeset
51 {
Ritor1
parents:
diff changeset
52 signed int v9; // esi@6
Ritor1
parents:
diff changeset
53 __int16 v11; // dx@11
Ritor1
parents:
diff changeset
54
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
55 for ( uint i = 0; i < 50; ++i )
0
Ritor1
parents:
diff changeset
56 {
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
57 if ( this->pOverlays[i].field_6 <= 0 )
0
Ritor1
parents:
diff changeset
58 {
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
59 this->pOverlays[i].field_0 = 0;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
60 this->pOverlays[i].field_A = 0;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
61 this->pOverlays[i].field_8 = 0;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
62 this->pOverlays[i].field_C = a3;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
63 v9 = 0;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
64 for ( v9; v9 < (signed int)pOverlayList->uNumOverlays; ++v9 )
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
65 {
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
66 if ( uOverlayID == pOverlayList->pOverlays[v9].uOverlayID )
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
67 break;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
68 }
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
69 this->pOverlays[i].field_2 = v9;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
70 this->pOverlays[i].field_4 = 0;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
71 if ( a4 )
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
72 v11 = a4;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
73 else
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
74 v11 = 8 * pSpriteFrameTable->pSpriteSFrames[pOverlayList->pOverlays[v9].uSpriteFramesetID].uAnimLength;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
75 this->pOverlays[i].field_6 = v11;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
76 this->pOverlays[i].field_10 = a5;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
77 this->pOverlays[i].field_E = a6;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
78 bRedraw = true;
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
79 return true;
0
Ritor1
parents:
diff changeset
80 }
Ritor1
parents:
diff changeset
81 }
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
82 return 0;
0
Ritor1
parents:
diff changeset
83 }
Ritor1
parents:
diff changeset
84
Ritor1
parents:
diff changeset
85 //----- (00441964) --------------------------------------------------------
569
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
86 void OtherOverlayList::DrawTurnBasedIcon(int a2)
0
Ritor1
parents:
diff changeset
87 {
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
88 IconFrame *frame; // eax@12
0
Ritor1
parents:
diff changeset
89 unsigned int v5; // [sp-8h] [bp-Ch]@4
Ritor1
parents:
diff changeset
90
569
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
91 if ( pCurrentScreen != SCREEN_GAME || !pParty->bTurnBasedModeOn)
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
92 return;
f451efdb7c8b * Party buff icons drawing (right panel)
Nomad
parents: 472
diff changeset
93
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
94 if ( pTurnEngine->turn_stage == TE_MOVEMENT )//все персы отстрелялись(сжатый кулак)
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
95 frame = pIconsFrameTable->GetFrame(pIconIDs_Turn[5 - pTurnEngine->uActionPointsLeft / 26], pEventTimer->uStartTime);
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
96 else if ( pTurnEngine->turn_stage == TE_WAIT )
0
Ritor1
parents:
diff changeset
97 {
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
98 if ( dword_50C998_turnbased_icon_1A )
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
99 v5 = uIconID_TurnStart;//анимация руки(запуск пошагового режима)
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
100 else
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
101 v5 = uIconID_TurnHour; //группа ожидает(часы)
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
102 frame = pIconsFrameTable->GetFrame(v5, dword_50C994);
0
Ritor1
parents:
diff changeset
103 }
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
104 else if ( pTurnEngine->turn_stage == TE_ATTACK )//группа атакует(ладонь)
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
105 frame = pIconsFrameTable->GetFrame(uIconID_TurnStop, pEventTimer->uStartTime);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2153
diff changeset
106 //if ( pRenderer->pRenderD3D )
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
107 pRenderer->DrawTextureIndexed(394, 288, &pIcons_LOD->pTextures[frame->uTextureID]);
2154
9bd7522cdbbb Render decoupling.
Nomad
parents: 2153
diff changeset
108 /*else
9bd7522cdbbb Render decoupling.
Nomad
parents: 2153
diff changeset
109 pRenderer->DrawTextureTransparent(0x18Au, 0x120u, v7);*/
0
Ritor1
parents:
diff changeset
110 if ( dword_50C994 < dword_50C998_turnbased_icon_1A )
Ritor1
parents:
diff changeset
111 {
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
112 dword_50C994 += pEventTimer->uTimeElapsed;
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
113 if ( (signed int)dword_50C994 >= dword_50C998_turnbased_icon_1A )
0
Ritor1
parents:
diff changeset
114 dword_50C998_turnbased_icon_1A = 0;
Ritor1
parents:
diff changeset
115 }
Ritor1
parents:
diff changeset
116 }
Ritor1
parents:
diff changeset
117 // 4E28F8: using guessed type int pCurrentScreen;
Ritor1
parents:
diff changeset
118 // 50C994: using guessed type int dword_50C994;
Ritor1
parents:
diff changeset
119 // 50C998: using guessed type int dword_50C998_turnbased_icon_1A;
Ritor1
parents:
diff changeset
120
Ritor1
parents:
diff changeset
121
Ritor1
parents:
diff changeset
122 //----- (00458D97) --------------------------------------------------------
Ritor1
parents:
diff changeset
123 void OverlayList::InitializeSprites()
Ritor1
parents:
diff changeset
124 {
472
7dfe960c323c BLV_UpdateDoors
Nomad
parents: 142
diff changeset
125 for (uint i = 0; i < uNumOverlays; ++i)
7dfe960c323c BLV_UpdateDoors
Nomad
parents: 142
diff changeset
126 pSpriteFrameTable->InitializeSprite(pOverlays[i].uSpriteFramesetID);
0
Ritor1
parents:
diff changeset
127 }
Ritor1
parents:
diff changeset
128
Ritor1
parents:
diff changeset
129 //----- (00458DBC) --------------------------------------------------------
Ritor1
parents:
diff changeset
130 void OverlayList::ToFile()
Ritor1
parents:
diff changeset
131 {
Ritor1
parents:
diff changeset
132 FILE *v2; // eax@1
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
133 //FILE *v3; // edi@1
0
Ritor1
parents:
diff changeset
134
Ritor1
parents:
diff changeset
135 v2 = fopen("data\\doverlay.bin", "wb");
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
136 //v3 = v2;
0
Ritor1
parents:
diff changeset
137 if ( !v2 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
138 Error("Unable to save doverlay.bin!");
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
139 fwrite(this, 4, 1, v2);
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
140 fwrite(this->pOverlays, 8, this->uNumOverlays, v2);
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
141 fclose(v2);
0
Ritor1
parents:
diff changeset
142 }
Ritor1
parents:
diff changeset
143
Ritor1
parents:
diff changeset
144 //----- (00458E08) --------------------------------------------------------
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
145 void OverlayList::FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
0
Ritor1
parents:
diff changeset
146 {
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
147 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
148 num_mm7_overlays = data_mm7 ? *(int *)data_mm7 : 0,
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
149 num_mm8_overlays = data_mm8 ? *(int *)data_mm8 : 0;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
150
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
151 uNumOverlays = num_mm6_overlays + num_mm7_overlays + num_mm8_overlays;
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
152 Assert(uNumOverlays);
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
153 Assert(!num_mm8_overlays);
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
154
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
155 pOverlays = (OverlayDesc *)malloc(uNumOverlays * sizeof(OverlayDesc));
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1340
diff changeset
156 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
157 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
158 memcpy(pOverlays + num_mm6_overlays + num_mm7_overlays, (char *)data_mm8 + 4, num_mm8_overlays * sizeof(OverlayDesc));
0
Ritor1
parents:
diff changeset
159 }
Ritor1
parents:
diff changeset
160
Ritor1
parents:
diff changeset
161 //----- (00458E4F) --------------------------------------------------------
Ritor1
parents:
diff changeset
162 bool OverlayList::FromFileTxt(const char *Args)
Ritor1
parents:
diff changeset
163 {
Ritor1
parents:
diff changeset
164 __int32 v3; // edi@1
Ritor1
parents:
diff changeset
165 FILE *v4; // eax@1
Ritor1
parents:
diff changeset
166 unsigned int v5; // esi@3
Ritor1
parents:
diff changeset
167 void *v7; // eax@9
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
168 //FILE *v8; // ST0C_4@11
0
Ritor1
parents:
diff changeset
169 char *i; // eax@11
Ritor1
parents:
diff changeset
170 char Buf; // [sp+10h] [bp-2F0h]@3
Ritor1
parents:
diff changeset
171 FrameTableTxtLine v18; // [sp+204h] [bp-FCh]@4
Ritor1
parents:
diff changeset
172 FrameTableTxtLine v19; // [sp+280h] [bp-80h]@4
Ritor1
parents:
diff changeset
173 FILE *File; // [sp+2FCh] [bp-4h]@1
Ritor1
parents:
diff changeset
174 unsigned int Argsa; // [sp+308h] [bp+8h]@3
Ritor1
parents:
diff changeset
175
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
176 free(this->pOverlays);
0
Ritor1
parents:
diff changeset
177 v3 = 0;
2369
bddcaf5d5db2 removing non-nullptr conditions before frees, chaning 0 and NULL assignmnets to pointers to nullptr assignments
Grumpy7
parents: 2336
diff changeset
178 this->pOverlays = nullptr;
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
179 this->uNumOverlays = 0;
0
Ritor1
parents:
diff changeset
180 v4 = fopen(Args, "r");
Ritor1
parents:
diff changeset
181 File = v4;
Ritor1
parents:
diff changeset
182 if ( !v4 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
183 Error("ObjectDescriptionList::load - Unable to open file: %s.");
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
184
0
Ritor1
parents:
diff changeset
185 v5 = 0;
Ritor1
parents:
diff changeset
186 Argsa = 0;
Ritor1
parents:
diff changeset
187 if ( fgets(&Buf, 490, v4) )
Ritor1
parents:
diff changeset
188 {
Ritor1
parents:
diff changeset
189 do
Ritor1
parents:
diff changeset
190 {
Ritor1
parents:
diff changeset
191 *strchr(&Buf, 10) = 0;
703
a9c1fb7483c2 monster parser almost complete.
Gloval
parents: 701
diff changeset
192 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
193 if ( v19.uPropCount && *v19.pProperties[0] != 47 )
0
Ritor1
parents:
diff changeset
194 ++Argsa;
Ritor1
parents:
diff changeset
195 }
Ritor1
parents:
diff changeset
196 while ( fgets(&Buf, 490, File) );
Ritor1
parents:
diff changeset
197 v5 = Argsa;
Ritor1
parents:
diff changeset
198 v3 = 0;
Ritor1
parents:
diff changeset
199 }
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
200 this->uNumOverlays = v5;
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
201 v7 = malloc(8 * v5);
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
202 this->pOverlays = (OverlayDesc *)v7;
0
Ritor1
parents:
diff changeset
203 if ( v7 == (void *)v3 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
204 Error("OverlayDescriptionList::load - Out of Memory!");
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
205
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
206 memset(v7, v3, 8 * this->uNumOverlays);
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
207 //v8 = File;
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
208 this->uNumOverlays = v3;
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
209 fseek(File, v3, v3);
0
Ritor1
parents:
diff changeset
210 for ( i = fgets(&Buf, 490, File); i; i = fgets(&Buf, 490, File) )
Ritor1
parents:
diff changeset
211 {
Ritor1
parents:
diff changeset
212 *strchr(&Buf, 10) = 0;
703
a9c1fb7483c2 monster parser almost complete.
Gloval
parents: 701
diff changeset
213 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
214 if ( v19.uPropCount && *v19.pProperties[0] != 47 )
0
Ritor1
parents:
diff changeset
215 {
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
216 this->pOverlays[this->uNumOverlays].uOverlayID = atoi(v19.pProperties[0]);
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
217 if ( _stricmp(v19.pProperties[1], "center") )
0
Ritor1
parents:
diff changeset
218 {
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
219 if ( !_stricmp(v19.pProperties[1], "transparent") )
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
220 this->pOverlays[this->uNumOverlays].uOverlayType = 2;
0
Ritor1
parents:
diff changeset
221 else
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
222 this->pOverlays[this->uNumOverlays].uOverlayType = 1;
0
Ritor1
parents:
diff changeset
223 }
Ritor1
parents:
diff changeset
224 else
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
225 this->pOverlays[this->uNumOverlays].uOverlayType = 0;
2274
90f56da08d76 small cleaning
Ritor1
parents: 2253
diff changeset
226 this->pOverlays[this->uNumOverlays++].uSpriteFramesetID = pSpriteFrameTable->FastFindSprite((char *)v19.pProperties[2]);
0
Ritor1
parents:
diff changeset
227 }
Ritor1
parents:
diff changeset
228 }
Ritor1
parents:
diff changeset
229 fclose(File);
Ritor1
parents:
diff changeset
230 return 1;
Ritor1
parents:
diff changeset
231 }
Ritor1
parents:
diff changeset
232
Ritor1
parents:
diff changeset
233 //----- (0045855F) --------------------------------------------------------
Ritor1
parents:
diff changeset
234 void OtherOverlay::Reset()
Ritor1
parents:
diff changeset
235 {
2228
b65e71eadd1b add this->field_0 = 0; in OtherOverlay::Reset()
Ritor1
parents: 2154
diff changeset
236 this->field_0 = 0;
b65e71eadd1b add this->field_0 = 0; in OtherOverlay::Reset()
Ritor1
parents: 2154
diff changeset
237 this->field_2 = 0;
b65e71eadd1b add this->field_0 = 0; in OtherOverlay::Reset()
Ritor1
parents: 2154
diff changeset
238 this->field_4 = 0;
b65e71eadd1b add this->field_0 = 0; in OtherOverlay::Reset()
Ritor1
parents: 2154
diff changeset
239 this->field_6 = 0;
0
Ritor1
parents:
diff changeset
240 this->field_8 = 0;
2228
b65e71eadd1b add this->field_0 = 0; in OtherOverlay::Reset()
Ritor1
parents: 2154
diff changeset
241 this->field_A = 0;
0
Ritor1
parents:
diff changeset
242 this->field_C = 0;
Ritor1
parents:
diff changeset
243 this->field_E = 0;
2228
b65e71eadd1b add this->field_0 = 0; in OtherOverlay::Reset()
Ritor1
parents: 2154
diff changeset
244 this->field_10 = 65536;
0
Ritor1
parents:
diff changeset
245 }
Ritor1
parents:
diff changeset
246
Ritor1
parents:
diff changeset
247 //----- (004584B8) --------------------------------------------------------
Ritor1
parents:
diff changeset
248 OtherOverlay::OtherOverlay()
Ritor1
parents:
diff changeset
249 {
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
250 this->field_0 = 0;
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
251 this->field_2 = 0;
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
252 this->field_4 = 0;
0
Ritor1
parents:
diff changeset
253 this->field_6 = 0;
2242
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
254 this->field_8 = 0;
c4f87fb3cfee for NextTurn()
Ritor1
parents: 2228
diff changeset
255 this->field_A = 0;
0
Ritor1
parents:
diff changeset
256 this->field_C = 0;
Ritor1
parents:
diff changeset
257 this->field_E = 0;
Ritor1
parents:
diff changeset
258 this->field_10 = 65536;
Ritor1
parents:
diff changeset
259 }