annotate IconFrameTable.cpp @ 2464:104fdbea0386

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