comparison DecorationList.cpp @ 1306:13b7be8b06a0

Слияние
author Ritor1
date Sun, 23 Jun 2013 14:27:57 +0600
parents dcc52e17b517 5450af4f57ef
children 4fff79f04dbd
comparison
equal deleted inserted replaced
1305:1ab9bff65f01 1306:13b7be8b06a0
1 #include "Sprites.h"
1 #include "DecorationList.h" 2 #include "DecorationList.h"
2 #include <string>
3 #include "Allocator.h" 3 #include "Allocator.h"
4 #include "MM7.h"
5 #include "FrameTableInc.h"
4 #include "mm7_data.h" 6 #include "mm7_data.h"
5 #include "Sprites.h" 7 #include "Indoor.h"
6 #include "FrameTableInc.h"
7
8
9 //----- (00458600) --------------------------------------------------------
10 void DecorationList::ToFile()
11 {
12 DecorationList *v1; // esi@1
13 FILE *v2; // eax@1
14 FILE *v3; // edi@1
15
16 v1 = this;
17 v2 = fopen("data\\ddeclist.bin", "wb");
18 v3 = v2;
19 if ( !v2 )
20 Abortf("Unable to save ddeclist.bin!");
21 fwrite(v1, 4u, 1u, v2);
22 fwrite(v1->pDecorations, 0x54u, v1->uNumDecorations, v3);
23 fclose(v3);
24 }
25 8
26 //----- (0045864C) -------------------------------------------------------- 9 //----- (0045864C) --------------------------------------------------------
27 void DecorationList::FromFile(void *pSerialized) 10 void DecorationList::FromFile(void *pSerialized)
28 { 11 {
29 uNumDecorations = *(int *)pSerialized; 12 uNumDecorations = *(int *)pSerialized;
233 } 216 }
234 } 217 }
235 fclose(File); 218 fclose(File);
236 return 1; 219 return 1;
237 } 220 }
238 221 //----- (00458600) --------------------------------------------------------
222 void DecorationList::ToFile()
223 {
224 DecorationList *v1; // esi@1
225 FILE *v2; // eax@1
226 FILE *v3; // edi@1
227
228 v1 = this;
229 v2 = fopen("data\\ddeclist.bin", "wb");
230 v3 = v2;
231 if ( !v2 )
232 Abortf("Unable to save ddeclist.bin!");
233 fwrite(v1, 4u, 1u, v2);
234 fwrite(v1->pDecorations, 0x54u, v1->uNumDecorations, v3);
235 fclose(v3);
236 }
237 //----- (004583B0) --------------------------------------------------------
238 LevelDecoration::LevelDecoration()
239 {
240 this->field_1A = 0;
241 this->field_18 = 0;
242 this->vPosition.z = 0;
243 this->vPosition.y = 0;
244 this->vPosition.x = 0;
245 this->uDecorationDescID = 0;
246 this->field_2 = 0;
247 this->field_16_event_id = 0;
248 this->uCog = 0;
249 }
239 //----- (004488B6) -------------------------------------------------------- 250 //----- (004488B6) --------------------------------------------------------
240 unsigned __int16 DecorationList::GetDecorIdByName(const char *pName) 251 unsigned __int16 DecorationList::GetDecorIdByName(const char *pName)
241 { 252 {
242 DecorationList *v2; // esi@1 253 DecorationList *v2; // esi@1
243 signed int uID; // edi@2 254 signed int uID; // edi@2