comparison IconFrameTable.cpp @ 1487:cb396f55671e

Слияние
author Ritor1
date Thu, 29 Aug 2013 22:02:00 +0600
parents 7ef4b64f6329
children c4ab816fcc5e
comparison
equal deleted inserted replaced
1486:47c89461be23 1487:cb396f55671e
110 fwrite(v1->pIcons, 0x20u, v1->uNumIcons, v3); 110 fwrite(v1->pIcons, 0x20u, v1->uNumIcons, v3);
111 fclose(v3); 111 fclose(v3);
112 } 112 }
113 113
114 //----- (00495056) -------------------------------------------------------- 114 //----- (00495056) --------------------------------------------------------
115 void IconFrameTable::FromFile(void *pSerialized) 115 void IconFrameTable::FromFile(void *data_mm6, void *data_mm7, void *data_mm8)
116 { 116 {
117 uNumIcons = *(int *)pSerialized; 117 uint num_mm6_frames = data_mm6 ? *(int *)data_mm6 : 0,
118 pIcons = (IconFrame *)pAllocator->AllocNamedChunk(pIcons, 32 * uNumIcons, "I Frames"); 118 num_mm7_frames = data_mm7 ? *(int *)data_mm7 : 0,
119 memcpy(pIcons, (char *)pSerialized + 4, 32 * uNumIcons); 119 num_mm8_frames = data_mm8 ? *(int *)data_mm8 : 0;
120
121 uNumIcons = num_mm6_frames + num_mm7_frames + num_mm8_frames;
122 assert(uNumIcons);
123 assert(!num_mm8_frames);
124
125 pIcons = (IconFrame *)pAllocator->AllocNamedChunk(pIcons, uNumIcons * sizeof(IconFrame), "I Frames");
126 memcpy(pIcons, (char *)data_mm7 + 4, num_mm7_frames * sizeof(IconFrame));
127 memcpy(pIcons + num_mm7_frames, (char *)data_mm6 + 4, num_mm6_frames * sizeof(IconFrame));
128 memcpy(pIcons + num_mm6_frames + num_mm7_frames, (char *)data_mm8 + 4, num_mm8_frames * sizeof(IconFrame));
120 } 129 }
121 130
122 //----- (0049509D) -------------------------------------------------------- 131 //----- (0049509D) --------------------------------------------------------
123 int IconFrameTable::FromFileTxt(const char *Args) 132 int IconFrameTable::FromFileTxt(const char *Args)
124 { 133 {