annotate IconFrameTable.cpp @ 2360:63ad4e3606f4

MovieRelease();
author Ritor1
date Wed, 16 Apr 2014 17:36:47 +0600
parents d6887ee81068
children f4af3b203f65
rev   line source
2253
aff7a7b072b7 adding _CRT_SECURE_NO_WARNINGS to get rid of a few hundrer annoying warnings + adding count parameter to swprintf
Grumpy7
parents: 2098
diff changeset
1 #define _CRT_SECURE_NO_WARNINGS
2336
d6887ee81068 header file include cleanup
Grumpy7
parents: 2273
diff changeset
2 #include "ErrorHandling.h"
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
3 #include "IconFrameTable.h"
86a83e12d795 moving files
Ritor1
parents:
diff changeset
4 #include "LOD.h"
86a83e12d795 moving files
Ritor1
parents:
diff changeset
5 #include "mm7_data.h"
86a83e12d795 moving files
Ritor1
parents:
diff changeset
6 #include "FrameTableInc.h"
86a83e12d795 moving files
Ritor1
parents:
diff changeset
7
86a83e12d795 moving files
Ritor1
parents:
diff changeset
8 //----- (00494F3A) --------------------------------------------------------
86a83e12d795 moving files
Ritor1
parents:
diff changeset
9 unsigned int IconFrameTable::FindIcon(const char *pIconName)
86a83e12d795 moving files
Ritor1
parents:
diff changeset
10 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
11 for ( uint i = 0; i < (signed int)this->uNumIcons; i++ )
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
12 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
13 if ( !_stricmp(pIconName, this->pIcons[i].pAnimationName) )
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
14 return i;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
15 }
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
16 return 0;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
17 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
18
86a83e12d795 moving files
Ritor1
parents:
diff changeset
19 //----- (00494F70) --------------------------------------------------------
86a83e12d795 moving files
Ritor1
parents:
diff changeset
20 IconFrame *IconFrameTable::GetFrame(unsigned int uIconID, unsigned int uFrameID)
86a83e12d795 moving files
Ritor1
parents:
diff changeset
21 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
22 int v6; // edx@3
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
23 uint i;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
24
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
25 if ( this->pIcons[uIconID].uFlags & 1 && this->pIcons[uIconID].uAnimLength != 0 )
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
26 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
27 v6 = ((signed int)uFrameID >> 3) % (unsigned __int16)this->pIcons[uIconID].uAnimLength;
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
28 for ( i = uIconID; v6 > this->pIcons[i].uAnimTime; i++ )
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
29 v6 -= this->pIcons[i].uAnimTime;
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
30 return &this->pIcons[i];
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
31 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
32 else
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
33 return &this->pIcons[uIconID];
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
34 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
35
86a83e12d795 moving files
Ritor1
parents:
diff changeset
36 //----- (00494FBF) --------------------------------------------------------
86a83e12d795 moving files
Ritor1
parents:
diff changeset
37 void IconFrameTable::InitializeAnimation(unsigned int uIconID)
86a83e12d795 moving files
Ritor1
parents:
diff changeset
38 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
39 unsigned int v3; // edi@3
86a83e12d795 moving files
Ritor1
parents:
diff changeset
40 const char *i; // eax@3
86a83e12d795 moving files
Ritor1
parents:
diff changeset
41
86a83e12d795 moving files
Ritor1
parents:
diff changeset
42 if ( (signed int)uIconID <= (signed int)this->uNumIcons && (uIconID & 0x80000000u) == 0 )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
43 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
44 v3 = uIconID;
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
45 for ( i = this->pIcons[uIconID].pTextureName; ; i = this->pIcons[v3].pTextureName )
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
46 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
47 this->pIcons[v3].uTextureID = pIcons_LOD->LoadTexture(i, TEXTURE_16BIT_PALETTE);
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
48 if ( !(this->pIcons[v3].uFlags & 1) )
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
49 break;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
50 ++v3;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
51 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
52 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
53 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
54
86a83e12d795 moving files
Ritor1
parents:
diff changeset
55 //----- (0049500A) --------------------------------------------------------
86a83e12d795 moving files
Ritor1
parents:
diff changeset
56 void IconFrameTable::ToFile()
86a83e12d795 moving files
Ritor1
parents:
diff changeset
57 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
58 //IconFrameTable *v1; // esi@1
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
59 FILE *v2; // eax@1
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
60 //FILE *v3; // edi@1
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
61
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
62 //IconFrameTable* Str = this;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
63
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
64 //v1 = Str;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
65 v2 = fopen("data\\dift.bin", "wb");
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
66 //v3 = v2;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
67 if ( !v2 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
68 Error("Unable to save dift.bin!");
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
69 fwrite(this, 4, 1, v2);
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
70 fwrite(this->pIcons, 0x20u, this->uNumIcons, v2);
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
71 fclose(v2);
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
72 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
73
86a83e12d795 moving files
Ritor1
parents:
diff changeset
74 //----- (00495056) --------------------------------------------------------
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
75 void IconFrameTable::FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
76 {
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
77 uint num_mm6_frames = data_mm6 ? *(int *)data_mm6 : 0,
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
78 num_mm7_frames = data_mm7 ? *(int *)data_mm7 : 0,
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
79 num_mm8_frames = data_mm8 ? *(int *)data_mm8 : 0;
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
80
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
81 uNumIcons = num_mm6_frames + num_mm7_frames + num_mm8_frames;
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
82 Assert(uNumIcons);
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
83 Assert(!num_mm8_frames);
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
84
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
85 pIcons = (IconFrame *)malloc(uNumIcons * sizeof(IconFrame));
1477
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
86 memcpy(pIcons, (char *)data_mm7 + 4, num_mm7_frames * sizeof(IconFrame));
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
87 memcpy(pIcons + num_mm7_frames, (char *)data_mm6 + 4, num_mm6_frames * sizeof(IconFrame));
7ef4b64f6329 * LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load
Nomad
parents: 1296
diff changeset
88 memcpy(pIcons + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 4, num_mm8_frames * sizeof(IconFrame));
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
89 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
90
86a83e12d795 moving files
Ritor1
parents:
diff changeset
91 //----- (0049509D) --------------------------------------------------------
86a83e12d795 moving files
Ritor1
parents:
diff changeset
92 int IconFrameTable::FromFileTxt(const char *Args)
86a83e12d795 moving files
Ritor1
parents:
diff changeset
93 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
94 //IconFrameTable *v2; // ebx@1
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
95 FILE *v3; // eax@1
86a83e12d795 moving files
Ritor1
parents:
diff changeset
96 int v4; // esi@3
86a83e12d795 moving files
Ritor1
parents:
diff changeset
97 void *v5; // eax@10
86a83e12d795 moving files
Ritor1
parents:
diff changeset
98 FILE *v6; // ST0C_4@12
86a83e12d795 moving files
Ritor1
parents:
diff changeset
99 char *i; // eax@12
86a83e12d795 moving files
Ritor1
parents:
diff changeset
100 const char *v8; // ST00_4@15
86a83e12d795 moving files
Ritor1
parents:
diff changeset
101 int v9; // eax@16
86a83e12d795 moving files
Ritor1
parents:
diff changeset
102 int v10; // edx@20
86a83e12d795 moving files
Ritor1
parents:
diff changeset
103 int v11; // ecx@21
86a83e12d795 moving files
Ritor1
parents:
diff changeset
104 int v12; // eax@22
86a83e12d795 moving files
Ritor1
parents:
diff changeset
105 signed int j; // edx@25
86a83e12d795 moving files
Ritor1
parents:
diff changeset
106 IconFrame *v14; // ecx@26
86a83e12d795 moving files
Ritor1
parents:
diff changeset
107 int v15; // esi@26
86a83e12d795 moving files
Ritor1
parents:
diff changeset
108 int k; // eax@27
86a83e12d795 moving files
Ritor1
parents:
diff changeset
109 signed int result; // eax@11
86a83e12d795 moving files
Ritor1
parents:
diff changeset
110 char Buf; // [sp+Ch] [bp-2F8h]@3
86a83e12d795 moving files
Ritor1
parents:
diff changeset
111 FrameTableTxtLine v19; // [sp+200h] [bp-104h]@4
86a83e12d795 moving files
Ritor1
parents:
diff changeset
112 FrameTableTxtLine v20; // [sp+27Ch] [bp-88h]@4
86a83e12d795 moving files
Ritor1
parents:
diff changeset
113 int v21; // [sp+2F8h] [bp-Ch]@3
86a83e12d795 moving files
Ritor1
parents:
diff changeset
114 int v22; // [sp+2FCh] [bp-8h]@3
86a83e12d795 moving files
Ritor1
parents:
diff changeset
115 FILE *File; // [sp+300h] [bp-4h]@1
86a83e12d795 moving files
Ritor1
parents:
diff changeset
116 int Argsa; // [sp+30Ch] [bp+8h]@26
86a83e12d795 moving files
Ritor1
parents:
diff changeset
117
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
118 //v2 = this;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
119 //TileTable::dtor((TileTable *)this);
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
120 __debugbreak();//Ritor1: this function not used
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
121 v3 = fopen(Args, "r");
86a83e12d795 moving files
Ritor1
parents:
diff changeset
122 File = v3;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
123 if ( !v3 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
124 Error("IconFrameTable::load - Unable to open file: %s.", Args);
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
125 v4 = 0;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
126 v21 = 0;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
127 v22 = 1;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
128 if ( fgets(&Buf, 490, v3) )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
129 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
130 do
86a83e12d795 moving files
Ritor1
parents:
diff changeset
131 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
132 *strchr(&Buf, 10) = 0;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
133 memcpy(&v20, frame_table_txt_parser(&Buf, &v19), sizeof(v20));
86a83e12d795 moving files
Ritor1
parents:
diff changeset
134 if ( v20.uPropCount && *v20.pProperties[0] != 47 )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
135 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
136 if ( v20.uPropCount < 3 )
1545
c4ab816fcc5e assert, Abortf, AbortWithError -> Assert, Error
Nomad
parents: 1477
diff changeset
137 Error("IconFrameTable::loadText, too few arguments, %s line %i.", Args, v22);
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
138 ++v21;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
139 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
140 ++v22;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
141 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
142 while ( fgets(&Buf, 490, File) );
86a83e12d795 moving files
Ritor1
parents:
diff changeset
143 v4 = v21;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
144 }
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
145 this->uNumIcons = v4;
1583
75fafd8ced59 Allocator (CMemory) bye-bye
Nomad
parents: 1545
diff changeset
146 v5 = malloc(32 * v4);//, "I Frames");
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
147 this->pIcons = (IconFrame *)v5;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
148 if ( v5 )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
149 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
150 v6 = File;
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
151 this->uNumIcons = 0;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
152 fseek(v6, 0, 0);
86a83e12d795 moving files
Ritor1
parents:
diff changeset
153 for ( i = fgets(&Buf, 490, File); i; i = fgets(&Buf, 490, File) )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
154 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
155 *strchr(&Buf, 10) = 0;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
156 memcpy(&v20, frame_table_txt_parser(&Buf, &v19), sizeof(v20));
86a83e12d795 moving files
Ritor1
parents:
diff changeset
157 if ( v20.uPropCount && *v20.pProperties[0] != 47 )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
158 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
159 strcpy(this->pIcons[this->uNumIcons].pAnimationName, v20.pProperties[0]);
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
160 strcpy(this->pIcons[this->uNumIcons].pTextureName, v20.pProperties[1]);
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
161 v8 = v20.pProperties[2];
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
162 this->pIcons[this->uNumIcons].uFlags = 0;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
163 if ( !_stricmp(v8, "new") )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
164 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
165 v9 = (int)&this->pIcons[this->uNumIcons].uFlags;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
166 *(char *)v9 |= 4u;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
167 }
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
168 this->pIcons[this->uNumIcons].uAnimTime = atoi(v20.pProperties[3]);
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
169 this->pIcons[this->uNumIcons].uAnimLength = 0;
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
170 this->pIcons[this->uNumIcons++].uTextureID = 0;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
171 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
172 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
173 fclose(File);
86a83e12d795 moving files
Ritor1
parents:
diff changeset
174 v10 = 0;
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
175 if ( (signed int)(this->uNumIcons - 1) > 0 )
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
176 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
177 v11 = 0;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
178 do
86a83e12d795 moving files
Ritor1
parents:
diff changeset
179 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
180 v12 = (int)&this->pIcons[v11];
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
181 if ( !(*(char *)(v12 + 60) & 4) )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
182 *(char *)(v12 + 28) |= 1u;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
183 ++v10;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
184 ++v11;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
185 }
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
186 while ( v10 < (signed int)(this->uNumIcons - 1) );
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
187 }
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
188 for ( j = 0; j < (signed int)this->uNumIcons; *(short *)(Argsa + 26) = v15 )
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
189 {
2273
42b6a910b5d8 FindIcon cleaned
Ritor1
parents: 2253
diff changeset
190 v14 = this->pIcons;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
191 Argsa = (int)&v14[j];
86a83e12d795 moving files
Ritor1
parents:
diff changeset
192 v15 = *(short *)(Argsa + 24);
86a83e12d795 moving files
Ritor1
parents:
diff changeset
193 if ( *(char *)(Argsa + 28) & 1 )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
194 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
195 ++j;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
196 for ( k = (int)&v14[j]; *(char *)(k + 28) & 1; k += 32 )
86a83e12d795 moving files
Ritor1
parents:
diff changeset
197 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
198 v15 += *(short *)(k + 24);
86a83e12d795 moving files
Ritor1
parents:
diff changeset
199 ++j;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
200 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
201 LOWORD(v15) = v14[j].uAnimTime + v15;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
202 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
203 ++j;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
204 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
205 result = 1;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
206 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
207 else
86a83e12d795 moving files
Ritor1
parents:
diff changeset
208 {
86a83e12d795 moving files
Ritor1
parents:
diff changeset
209 fclose(File);
86a83e12d795 moving files
Ritor1
parents:
diff changeset
210 result = 0;
86a83e12d795 moving files
Ritor1
parents:
diff changeset
211 }
86a83e12d795 moving files
Ritor1
parents:
diff changeset
212 return result;
1296
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
213 }
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
214 //----- (0042EB78) --------------------------------------------------------
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
215 int IconFrameTable::GetIconAnimLength(unsigned int uIconID)
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
216 {
c423f946dc99 moving files continue
Ritor1
parents: 1295
diff changeset
217 return 8 * this->pIcons[uIconID].uAnimLength;
1295
86a83e12d795 moving files
Ritor1
parents:
diff changeset
218 }