comparison Outdoor.cpp @ 519:8f70e52646eb

Merge
author Gloval
date Fri, 01 Mar 2013 22:18:22 +0400
parents cb0ad52d6a26
children 1b813023fcbd
comparison
equal deleted inserted replaced
518:9c984eef0a7d 519:8f70e52646eb
1 #include <assert.h> 1 #include <assert.h>
2 2
3 #include "Outdoor.h" 3 #include "Outdoor.h"
4 #include "Party.h" 4 #include "Party.h"
5 #include "LayingItem.h" 5 #include "SpriteObject.h"
6 #include "LOD.h" 6 #include "LOD.h"
7 #include "Render.h" 7 #include "Render.h"
8 #include "MapInfo.h" 8 #include "MapInfo.h"
9 #include "Allocator.h" 9 #include "Allocator.h"
10 #include "Weather.h" 10 #include "Weather.h"
133 133
134 PrepareActorsDrawList(); 134 PrepareActorsDrawList();
135 if (!pOutdoorCamera->bDoNotRenderDecorations) 135 if (!pOutdoorCamera->bDoNotRenderDecorations)
136 pRenderer->PrepareDecorationsRenderList_ODM(); 136 pRenderer->PrepareDecorationsRenderList_ODM();
137 137
138 pRenderer->DrawLayingItems_Shooting_Magic_ODM(); 138 pRenderer->DrawSpriteObjects_ODM();
139 pRenderer->TransformBillboardsAndSetPalettesODM(); 139 pRenderer->TransformBillboardsAndSetPalettesODM();
140 sub_485F53((Vec2_int_ *)unnamed_6BE060); 140 sub_485F53((Vec2_int_ *)unnamed_6BE060);
141 } 141 }
142 142
143 143
1207 BSPModel *v18; // eax@12 1207 BSPModel *v18; // eax@12
1208 __int16 v19; // ax@15 1208 __int16 v19; // ax@15
1209 __int16 v20; // ax@16 1209 __int16 v20; // ax@16
1210 int v21; // ecx@16 1210 int v21; // ecx@16
1211 ODMFace *v22; // ebx@26 1211 ODMFace *v22; // ebx@26
1212 LayingItem *pItems; // ecx@27 1212 SpriteObject *pItems; // ecx@27
1213 unsigned int v24; // eax@28 1213 unsigned int v24; // eax@28
1214 //unsigned __int8 v25; // zf@28 1214 //unsigned __int8 v25; // zf@28
1215 //unsigned __int8 v26; // sf@28 1215 //unsigned __int8 v26; // sf@28
1216 ODMFace *v27; // eax@28 1216 ODMFace *v27; // eax@28
1217 const char *i; // edx@29 1217 const char *i; // edx@29
1389 _47F3EA(); 1389 _47F3EA();
1390 strcpy(pGroundTileset, "grastyl"); 1390 strcpy(pGroundTileset, "grastyl");
1391 fseek((FILE *)v7, v114, 0); 1391 fseek((FILE *)v7, v114, 0);
1392 fread(&uNumBModels, 4u, 1u, (FILE *)v7); 1392 fread(&uNumBModels, 4u, 1u, (FILE *)v7);
1393 fseek((FILE *)v7, v115, 0); 1393 fseek((FILE *)v7, v115, 0);
1394 fread(&uNumLayingItems, 4u, 1u, (FILE *)v7); 1394 fread(&uNumSpriteObjects, 4u, 1u, (FILE *)v7);
1395 fseek((FILE *)v7, v116, 0); 1395 fseek((FILE *)v7, v116, 0);
1396 fread(&uNumLevelDecorations, 4u, 1u, (FILE *)v7); 1396 fread(&uNumLevelDecorations, 4u, 1u, (FILE *)v7);
1397 fseek((FILE *)v7, v117, 0); 1397 fseek((FILE *)v7, v117, 0);
1398 fread(&uNumActors, 4u, 1u, (FILE *)v7); 1398 fread(&uNumActors, 4u, 1u, (FILE *)v7);
1399 fseek((FILE *)v7, v118, 0); 1399 fseek((FILE *)v7, v118, 0);
1516 goto LABEL_19; 1516 goto LABEL_19;
1517 } 1517 }
1518 LABEL_26: 1518 LABEL_26:
1519 v22 = File; 1519 v22 = File;
1520 fseek((FILE *)File, v124, 0); 1520 fseek((FILE *)File, v124, 0);
1521 fread(pLayingItems, 0x70u, uNumLayingItems, (FILE *)v22); 1521 fread(pSpriteObjects, 0x70u, uNumSpriteObjects, (FILE *)v22);
1522 if ( (signed int)uNumLayingItems > 0 ) 1522 if ( (signed int)uNumSpriteObjects > 0 )
1523 { 1523 {
1524 pItems = pLayingItems; 1524 pItems = pSpriteObjects;
1525 pNumItems = uNumLayingItems; 1525 pNumItems = uNumSpriteObjects;
1526 do 1526 do
1527 { 1527 {
1528 v24 = pItems->stru_24.uItemID; 1528 v24 = pItems->stru_24.uItemID;
1529 thisa = 0; 1529 thisa = 0;
1530 v27 = (ODMFace *)(48 * v24); 1530 v27 = (ODMFace *)(48 * v24);
2220 memcpy(pActors, pSrc + 4, uNumActors * sizeof(Actor)); 2220 memcpy(pActors, pSrc + 4, uNumActors * sizeof(Actor));
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(&uNumSpriteObjects, pSrc, 4);
2226 assert(uNumLayingItems <= 1000 && "Too many objects"); 2226 assert(uNumSpriteObjects <= 1000 && "Too many objects");
2227 assert(sizeof(LayingItem) == 112); 2227 assert(sizeof(SpriteObject) == 112);
2228 2228
2229 pGameLoadingUI_ProgressBar->Progress(); 2229 pGameLoadingUI_ProgressBar->Progress();
2230 2230
2231 //pFilename = (char *)(112 * uNumLayingItems); 2231 //pFilename = (char *)(112 * uNumSpriteObjects);
2232 memcpy(pLayingItems, pSrc + 4, uNumLayingItems * sizeof(LayingItem)); 2232 memcpy(pSpriteObjects, pSrc + 4, uNumSpriteObjects * sizeof(SpriteObject));
2233 pSrc += 4 + uNumLayingItems * sizeof(LayingItem); 2233 pSrc += 4 + uNumSpriteObjects * sizeof(SpriteObject);
2234 2234
2235 //v94 = (char *)v93 + (int)pFilename; 2235 //v94 = (char *)v93 + (int)pFilename;
2236 pGameLoadingUI_ProgressBar->Progress(); 2236 pGameLoadingUI_ProgressBar->Progress();
2237 2237
2238 memcpy(&uNumChests, pSrc, 4); 2238 memcpy(&uNumChests, pSrc, 4);
2728 int v3; // eax@7 2728 int v3; // eax@7
2729 OutdoorLocation *v5; // [sp+0h] [bp-4h]@1 2729 OutdoorLocation *v5; // [sp+0h] [bp-4h]@1
2730 2730
2731 v5 = this; 2731 v5 = this;
2732 v1 = 0; 2732 v1 = 0;
2733 if ( (signed int)uNumLayingItems > 0 ) 2733 if ( (signed int)uNumSpriteObjects > 0 )
2734 { 2734 {
2735 v2 = (char *)&pLayingItems[0].uObjectDescID; 2735 v2 = (char *)&pSpriteObjects[0].uObjectDescID;
2736 do 2736 do
2737 { 2737 {
2738 if ( *(short *)v2 ) 2738 if ( *(short *)v2 )
2739 { 2739 {
2740 if ( !(v2[24] & 8) && !(pObjectList->pObjects[*(short *)v2].uFlags & 0x10) ) 2740 if ( !(v2[24] & 8) && !(pObjectList->pObjects[*(short *)v2].uFlags & 0x10) )
2748 } 2748 }
2749 } 2749 }
2750 ++v1; 2750 ++v1;
2751 v2 += 112; 2751 v2 += 112;
2752 } 2752 }
2753 while ( v1 < (signed int)uNumLayingItems ); 2753 while ( v1 < (signed int)uNumSpriteObjects );
2754 } 2754 }
2755 pGameLoadingUI_ProgressBar->Progress(); 2755 pGameLoadingUI_ProgressBar->Progress();
2756 return 1; 2756 return 1;
2757 } 2757 }
2758 2758