diff Outdoor.cpp @ 124:eeb0a8222d59

Слияние
author Ritor1
date Mon, 11 Feb 2013 19:13:38 +0600
parents fe0e317c0de0
children 3471df3713e2
line wrap: on
line diff
--- a/Outdoor.cpp	Mon Feb 11 19:13:23 2013 +0600
+++ b/Outdoor.cpp	Mon Feb 11 19:13:38 2013 +0600
@@ -60,10 +60,10 @@
   pIndoorCamera->sRotationY = pParty->sRotationY;
   pIndoorCamera->pos.x = pParty->vPosition.x
                       - ((unsigned __int64)(stru_5C6E00->SinCos(pParty->sRotationY)
-                                          * (signed __int64)pParty->field_18) >> 16);
+                                          * (signed __int64)pParty->y_rotation_granularity) >> 16);
   //v3 = stru_5C6E00->SinCos(pParty->sRotationY - stru_5C6E00->uIntegerHalfPi);
   pIndoorCamera->field_4C = v1;
-  pIndoorCamera->pos.y = pParty->vPosition.y - pParty->field_18 * ((stru_5C6E00->SinCos(pParty->sRotationY)) >> 16);
+  pIndoorCamera->pos.y = pParty->vPosition.y - pParty->y_rotation_granularity * ((stru_5C6E00->SinCos(pParty->sRotationY)) >> 16);
   pIndoorCamera->pos.z = pParty->vPosition.z + pParty->sEyelevel;
   if ( v2 || pRenderer->pRenderD3D )
   {
@@ -276,7 +276,7 @@
     pIcons_LOD->ReleaseAll2();
     sub_46080D();
     TryLoadLevelFromLOD();
-    if ( !Load((char *)pFilename, (ODMFace *)File, uRespawnInterval, thisa) )
+    if ( !Load(pFilename, (ODMFace *)File, uRespawnInterval, thisa) )
     {
       MessageBoxA(0, "Error!", "Couldn't Load Map!", 0);
       CreateDebugLocation();
@@ -1192,7 +1192,7 @@
 }
 
 //----- (0047D0A6) --------------------------------------------------------
-bool OutdoorLocation::Load(char *pFilename, ODMFace *File, size_t pNumItems, int thisa)// 
+bool OutdoorLocation::Load(const char *pFilename, ODMFace *File, size_t pNumItems, int thisa)// 
 {
   //OutdoorLocation *pOutdoorLocation; // esi@1
   /*bool result; // eax@9
@@ -1644,10 +1644,15 @@
   if (!pGames_LOD->DoesContainerExist(pFilename))
     Abortf("Unable to find %s in Games.LOD", pFilename);
 
+
+  char pMinimapTextureFilename[1024];
+  strcpy(pMinimapTextureFilename, pFilename);
+  pMinimapTextureFilename[strlen(pMinimapTextureFilename) - 4] = 0;
+  viewparams->uTextureID_LocationMap = pIcons_LOD->LoadTexture(pMinimapTextureFilename, TEXTURE_16BIT_PALETTE);
+
   //strcpy(FileName, pContainer);
   strcpy(Str, pFilename);
   strcpy(Str + strlen(Str) - 4, ".odm");
-  viewparams->uTextureID_LocationMap = pIcons_LOD->LoadTexture(Str, TEXTURE_16BIT_PALETTE);
   //v141 = &v139;
   //v38 = strlen(pFilename);
   //strcpy((char *)&v139 + v38, ".odm");