comparison Outdoor.cpp @ 124:eeb0a8222d59

Слияние
author Ritor1
date Mon, 11 Feb 2013 19:13:38 +0600
parents fe0e317c0de0
children 3471df3713e2
comparison
equal deleted inserted replaced
123:4e35bb416dea 124:eeb0a8222d59
58 v1 = 2; 58 v1 = 2;
59 pIndoorCamera->sRotationX = pParty->sRotationX; 59 pIndoorCamera->sRotationX = pParty->sRotationX;
60 pIndoorCamera->sRotationY = pParty->sRotationY; 60 pIndoorCamera->sRotationY = pParty->sRotationY;
61 pIndoorCamera->pos.x = pParty->vPosition.x 61 pIndoorCamera->pos.x = pParty->vPosition.x
62 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY) 62 - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY)
63 * (signed __int64)pParty->field_18) >> 16); 63 * (signed __int64)pParty->y_rotation_granularity) >> 16);
64 //v3 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi); 64 //v3 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi);
65 pIndoorCamera->field_4C = v1; 65 pIndoorCamera->field_4C = v1;
66 pIndoorCamera->pos.y = pParty->vPosition.y - pParty->field_18 * ((stru_5C6E00->SinCos(pParty->sRotationY)) >> 16); 66 pIndoorCamera->pos.y = pParty->vPosition.y - pParty->y_rotation_granularity * ((stru_5C6E00->SinCos(pParty->sRotationY)) >> 16);
67 pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel; 67 pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;
68 if ( v2 || pRenderer->pRenderD3D ) 68 if ( v2 || pRenderer->pRenderD3D )
69 { 69 {
70 ResetStru148s(); 70 ResetStru148s();
71 pOutdoorCamera->RotationToInts(); 71 pOutdoorCamera->RotationToInts();
274 pSprites_LOD->DeleteSomeOtherSprites(); 274 pSprites_LOD->DeleteSomeOtherSprites();
275 pSpriteFrameTable->ResetSomeSpriteFlags(); 275 pSpriteFrameTable->ResetSomeSpriteFlags();
276 pIcons_LOD->ReleaseAll2(); 276 pIcons_LOD->ReleaseAll2();
277 sub_46080D(); 277 sub_46080D();
278 TryLoadLevelFromLOD(); 278 TryLoadLevelFromLOD();
279 if ( !Load((char *)pFilename, (ODMFace *)File, uRespawnInterval, thisa) ) 279 if ( !Load(pFilename, (ODMFace *)File, uRespawnInterval, thisa) )
280 { 280 {
281 MessageBoxA(0, "Error!", "Couldn't Load Map!", 0); 281 MessageBoxA(0, "Error!", "Couldn't Load Map!", 0);
282 CreateDebugLocation(); 282 CreateDebugLocation();
283 } 283 }
284 day_attrib = v5->day_attrib; 284 day_attrib = v5->day_attrib;
1190 pTerrainNormals = nullptr; 1190 pTerrainNormals = nullptr;
1191 } 1191 }
1192 } 1192 }
1193 1193
1194 //----- (0047D0A6) -------------------------------------------------------- 1194 //----- (0047D0A6) --------------------------------------------------------
1195 bool OutdoorLocation::Load(char *pFilename, ODMFace *File, size_t pNumItems, int thisa)// 1195 bool OutdoorLocation::Load(const char *pFilename, ODMFace *File, size_t pNumItems, int thisa)//
1196 { 1196 {
1197 //OutdoorLocation *pOutdoorLocation; // esi@1 1197 //OutdoorLocation *pOutdoorLocation; // esi@1
1198 /*bool result; // eax@9 1198 /*bool result; // eax@9
1199 bool v7; // ebx@9 1199 bool v7; // ebx@9
1200 size_t v8; // eax@10 1200 size_t v8; // eax@10
1642 assert(sizeof(BSPModel) == 188); 1642 assert(sizeof(BSPModel) == 188);
1643 1643
1644 if (!pGames_LOD->DoesContainerExist(pFilename)) 1644 if (!pGames_LOD->DoesContainerExist(pFilename))
1645 Abortf("Unable to find %s in Games.LOD", pFilename); 1645 Abortf("Unable to find %s in Games.LOD", pFilename);
1646 1646
1647
1648 char pMinimapTextureFilename[1024];
1649 strcpy(pMinimapTextureFilename, pFilename);
1650 pMinimapTextureFilename[strlen(pMinimapTextureFilename) - 4] = 0;
1651 viewparams->uTextureID_LocationMap = pIcons_LOD->LoadTexture(pMinimapTextureFilename, TEXTURE_16BIT_PALETTE);
1652
1647 //strcpy(FileName, pContainer); 1653 //strcpy(FileName, pContainer);
1648 strcpy(Str, pFilename); 1654 strcpy(Str, pFilename);
1649 strcpy(Str + strlen(Str) - 4, ".odm"); 1655 strcpy(Str + strlen(Str) - 4, ".odm");
1650 viewparams->uTextureID_LocationMap = pIcons_LOD->LoadTexture(Str, TEXTURE_16BIT_PALETTE);
1651 //v141 = &v139; 1656 //v141 = &v139;
1652 //v38 = strlen(pFilename); 1657 //v38 = strlen(pFilename);
1653 //strcpy((char *)&v139 + v38, ".odm"); 1658 //strcpy((char *)&v139 + v38, ".odm");
1654 v39 = pGames_LOD->FindContainer(Str, 1); 1659 v39 = pGames_LOD->FindContainer(Str, 1);
1655 //Str[strlen(Str) - 4] = 0; 1660 //Str[strlen(Str) - 4] = 0;