Mercurial > mm7
diff Outdoor.cpp @ 119:be3c07c98861
Outdoor minimap fixed (didn't test wizard eye thou)
author | Nomad |
---|---|
date | Sun, 10 Feb 2013 23:14:42 +0200 |
parents | 23b213c3f8e1 |
children | fe0e317c0de0 |
line wrap: on
line diff
--- a/Outdoor.cpp Sun Feb 10 23:06:36 2013 +0600 +++ b/Outdoor.cpp Sun Feb 10 23:14:42 2013 +0200 @@ -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");