Mercurial > mm7
comparison Outdoor.cpp @ 466:91e1ba340f39
Слияние
author | Ritor1 |
---|---|
date | Mon, 25 Feb 2013 09:09:08 +0600 |
parents | 870358928460 |
children | cb0ad52d6a26 |
comparison
equal
deleted
inserted
replaced
465:e65d75206263 | 466:91e1ba340f39 |
---|---|
2221 pSrc += 4 + uNumActors * sizeof(Actor); | 2221 pSrc += 4 + uNumActors * sizeof(Actor); |
2222 //v92 = (char *)v91 + (int)pFilename; | 2222 //v92 = (char *)v91 + (int)pFilename; |
2223 pGameLoadingUI_ProgressBar->Progress(); | 2223 pGameLoadingUI_ProgressBar->Progress(); |
2224 | 2224 |
2225 memcpy(&uNumLayingItems, pSrc, 4); | 2225 memcpy(&uNumLayingItems, pSrc, 4); |
2226 //v93 = (char *)v92 + 4; | 2226 assert(uNumLayingItems <= 1000 && "Too many objects"); |
2227 if (uNumLayingItems > 1000) | 2227 assert(sizeof(LayingItem) == 112); |
2228 MessageBoxW(nullptr, L"Can't load file!", | |
2229 L"E:\\WORK\\MSDEV\\MM7\\MM7\\Code\\Odmap.cpp:954", 0); | |
2230 | 2228 |
2231 pGameLoadingUI_ProgressBar->Progress(); | 2229 pGameLoadingUI_ProgressBar->Progress(); |
2232 | 2230 |
2233 assert(sizeof(LayingItem) == 112); | |
2234 //pFilename = (char *)(112 * uNumLayingItems); | 2231 //pFilename = (char *)(112 * uNumLayingItems); |
2235 memcpy(pLayingItems, pSrc + 4, uNumLayingItems * sizeof(LayingItem)); | 2232 memcpy(pLayingItems, pSrc + 4, uNumLayingItems * sizeof(LayingItem)); |
2236 pSrc += 4 + uNumLayingItems * sizeof(LayingItem); | 2233 pSrc += 4 + uNumLayingItems * sizeof(LayingItem); |
2237 | 2234 |
2238 //v94 = (char *)v93 + (int)pFilename; | 2235 //v94 = (char *)v93 + (int)pFilename; |
3109 goto LABEL_53; | 3106 goto LABEL_53; |
3110 } | 3107 } |
3111 } | 3108 } |
3112 v28->uScreenSpaceX = v27; | 3109 v28->uScreenSpaceX = v27; |
3113 v28->uScreenSpaceY = v46; | 3110 v28->uScreenSpaceY = v46; |
3114 v28->some_x = x; | 3111 v28->world_x = x; |
3115 v28->some_y = y; | 3112 v28->world_y = y; |
3116 v28->some_z = z; | 3113 v28->world_z = z; |
3117 HIWORD(v34) = HIWORD(X); | 3114 HIWORD(v34) = HIWORD(X); |
3118 LOWORD(v34) = 0; | 3115 LOWORD(v34) = 0; |
3119 v28->uPaletteSubindex = 0; | 3116 v28->uPaletteSubindex = 0; |
3120 v28->sZValue = v34 + (8 * i | OBJECT_Actor); | 3117 v28->sZValue = v34 + (8 * i | OBJECT_Actor); |
3121 v28->field_14_actor_id = i; | 3118 v28->field_14_actor_id = i; |
3141 // 5187E4: using guessed type int uNumSpritesDrawnThisFrame; | 3138 // 5187E4: using guessed type int uNumSpritesDrawnThisFrame; |
3142 | 3139 |
3143 //----- (0044C1E8) -------------------------------------------------------- | 3140 //----- (0044C1E8) -------------------------------------------------------- |
3144 bool ODMFace::HasEventHint() | 3141 bool ODMFace::HasEventHint() |
3145 { | 3142 { |
3146 signed int v1; // eax@1 | 3143 signed int event_index; // eax@1 |
3147 EventIndex *v2; // esi@2 | 3144 _evt_raw* start_evt; |
3148 bool result; // eax@5 | 3145 _evt_raw* end_evt; |
3149 signed int v4; // eax@6 | 3146 |
3150 | 3147 event_index = 0; |
3151 v1 = 0; | 3148 if ( (uLevelEVT_NumEvents - 1) <= 0 ) |
3152 if ( (signed int)(uLevelEVT_NumEvents - 1) <= 0 ) | 3149 return false; |
3153 goto LABEL_5; | 3150 while ( pLevelEVT_Index[event_index].uEventID != this->sCogTriggeredID ) |
3154 v2 = pLevelEVT_Index; | 3151 { |
3155 while ( v2->uEventID != this->sCogTriggeredID ) | 3152 ++event_index; |
3156 { | 3153 if ( event_index >= (signed int)(uLevelEVT_NumEvents - 1) ) |
3157 ++v1; | 3154 return false; |
3158 ++v2; | 3155 } |
3159 if ( v1 >= (signed int)(uLevelEVT_NumEvents - 1) ) | 3156 end_evt=(_evt_raw*)&pLevelEVT[pLevelEVT_Index[event_index+1].uEventOffsetInEVT]; |
3160 goto LABEL_5; | 3157 start_evt=(_evt_raw*)&pLevelEVT[pLevelEVT_Index[event_index].uEventOffsetInEVT]; |
3161 } | 3158 if ( (end_evt->_e_type != EVENT_Exit) || (start_evt->_e_type!= EVENT_MouseOver) ) |
3162 v4 = v1; | 3159 return false; |
3163 if ( pLevelEVT[pLevelEVT_Index[v4 + 1].uEventOffsetInEVT + 4] != 1 | |
3164 || pLevelEVT[pLevelEVT_Index[v4].uEventOffsetInEVT + 4] != 4 ) | |
3165 LABEL_5: | |
3166 result = 0; | |
3167 else | 3160 else |
3168 result = 1; | 3161 return true; |
3169 return result; | 3162 } |
3170 } |