annotate IconFrameTable.cpp @ 1872:661ea35def76

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