diff mm7_5.cpp @ 1477:7ef4b64f6329

* LODFile::LoadBitmaps & LODFile::LoadIconsOrEvents are merged into LODFile::Load Added support for most of mm6 resources, placeholders for mm8 resources. Fixed few C4258
author Nomad
date Wed, 28 Aug 2013 18:43:07 +0200
parents 5a29caf9b79d
children 9e9a12506d51
line wrap: on
line diff
--- a/mm7_5.cpp	Wed Aug 28 14:39:01 2013 +0600
+++ b/mm7_5.cpp	Wed Aug 28 18:43:07 2013 +0200
@@ -1667,7 +1667,7 @@
           dword_50CDC8 = 1;
           sub_42FBDD();
           //pNPCData4 = (NPCData *)GetTravelTime();
-          strcpy(pOutdoor->pLevelFilename, pCurrentMapName.data());
+          strcpy(pOutdoor->pLevelFilename, pCurrentMapName);
           if ( bUnderwater != 1 && pParty->bFlying
             || pOutdoor->GetTravelDestination(pParty->vPosition.x, pParty->vPosition.y, pOut, 20) != 1 )
           {
@@ -1725,14 +1725,14 @@
             }
             pPaletteManager->ResetNonLocked();
             pSpriteFrameTable->ResetSomeSpriteFlags();
-            strcpy(pCurrentMapName.data(), pOut);
-            strcpy(pLevelName, pCurrentMapName.data());
+            strcpy(pCurrentMapName, pOut);
+            strcpy(pLevelName, pCurrentMapName);
             v41 = strtok(pLevelName, ".");
             strcpy(pLevelName, v41);
             Level_LoadEvtAndStr(pLevelName);
             pDecalBuilder->Reset(0);
             LoadLevel_InitializeLevelEvt();
-            uLevelMapStatsID = pMapStats->GetMapInfo(pCurrentMapName.data());
+            uLevelMapStatsID = pMapStats->GetMapInfo(pCurrentMapName);
             bUnderwater = 0;
             bNoNPCHiring = 0;
             pGame->uFlags2 &= 0xFFFFFFF7u;
@@ -1741,7 +1741,7 @@
               bUnderwater = 1;
               pGame->uFlags2 |= 8u;
             }
-            if ( !_stricmp(pCurrentMapName.data(), "out15.odm") || !_stricmp(pCurrentMapName.data(), "d47.blv") )
+            if ( !_stricmp(pCurrentMapName, "out15.odm") || !_stricmp(pCurrentMapName, "d47.blv") )
               bNoNPCHiring = 1;
             PrepareToLoadODM(1u, (OutdoorCamera *)1);
             pAudioPlayer->SetMapEAX();
@@ -1911,7 +1911,7 @@
           dword_50CDC8 = 1;
           sub_42FBDD();
           SaveGame(1, 0);
-          strcpy(pCurrentMapName.data(), pMapStats->pInfos[uHouse_ExitPic].pFilename);
+          strcpy(pCurrentMapName, pMapStats->pInfos[uHouse_ExitPic].pFilename);
           dword_6BE364_game_settings_1 |= 1;
           uGameState = GAME_STATE_2;
           //v53 = p2DEvents_minus1_::30[26 * (unsigned int)ptr_507BC0->ptr_1C];
@@ -1971,7 +1971,7 @@
             GameUI_SetFooterString(pTmpBuf.data());
             continue;
           }
-          pMapNum = pMapStats->GetMapInfo(pCurrentMapName.data());
+          pMapNum = pMapStats->GetMapInfo(pCurrentMapName);
           pMapName = "Not in Map Stats";
           if ( pMapNum )
             pMapName = pMapStats->pInfos[pMapNum].pName;
@@ -2015,11 +2015,11 @@
           pAudioPlayer->PlaySound((SoundID)word_4EE088_sound_ids[dword_506338], 0, 0, -1, 0, dword_50633C, 0, 0);
           if ( bRecallingBeacon )
           {
-            if ( _stricmp(pCurrentMapName.data(), (const char *)&pGames_LOD->pSubIndices[pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID]) )
+            if ( _stricmp(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID]) )
             {
               SaveGame(1, 0);
               OnMapLeave();
-              strcpy(pCurrentMapName.data(), (const char *)&pGames_LOD->pSubIndices[pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID]);
+              strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID]);
               dword_6BE364_game_settings_1 |= 1;
               uGameState = GAME_STATE_2;
               _5B65A8_npcdata_uflags_or_other = pPlayer9->pInstalledBeacons[uMessageParam].PartyPos_X;
@@ -2059,7 +2059,7 @@
               continue;
             for ( thisg = 0; thisg < (signed int)pGames_LOD->uNumSubDirs / 2; ++thisg )
             {
-              if ( !_stricmp((const char *)pGames_LOD->pSubIndices[thisg].pFilename, pCurrentMapName.data()) )
+              if ( !_stricmp((const char *)pGames_LOD->pSubIndices[thisg].pFilename, pCurrentMapName) )
                 pPlayer9->pInstalledBeacons[uMessageParam].SaveFileID = thisg;
             }
           }
@@ -2086,7 +2086,7 @@
                 {
 LABEL_486:
                   SaveGame(1, 0);
-                  v64 = pMapStats->GetMapInfo(pCurrentMapName.data());
+                  v64 = pMapStats->GetMapInfo(pCurrentMapName);
                   v65 = uMessageParam;
                   if ( v64 == TownPortalList[uMessageParam].uMapInfoID )
                   {
@@ -2103,7 +2103,7 @@
                     OnMapLeave();
                     dword_6BE364_game_settings_1 |= 1;
                     uGameState = GAME_STATE_2;
-                    strcpy(pCurrentMapName.data(), pMapStats->pInfos[TownPortalList[uMessageParam].uMapInfoID].pFilename);
+                    strcpy(pCurrentMapName, pMapStats->pInfos[TownPortalList[uMessageParam].uMapInfoID].pFilename);
                     dword_5B65C0 = 1;
                     _5B65A8_npcdata_uflags_or_other = TownPortalList[uMessageParam].pos.x;
                     _5B65AC_npcdata_fame_or_other = TownPortalList[uMessageParam].pos.y;
@@ -2283,7 +2283,7 @@
               while ( (signed int)pNPCData3 < (signed int)pNPCData4 );
               if ( (signed int)pNPCData3 < (signed int)pNPCData4 )
               {
-                strcpy(pCurrentMapName.data(), (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]);
+                strcpy(pCurrentMapName, (const char *)&pGames_LOD->pSubIndices[(int)pNPCData3]);
                 dword_6BE364_game_settings_1 |= 1u;
                 uGameState = GAME_STATE_2;
                 OnMapLeave();
@@ -2538,7 +2538,7 @@
             pParty->pPlayers[2].pConditions[2] = pParty->uTimePlayed;
             pParty->pPlayers[1].pConditions[2] = pParty->uTimePlayed;
             pParty->pPlayers[0].pConditions[2] = pParty->uTimePlayed;
-            v90 = pMapStats->GetMapInfo(pCurrentMapName.data());
+            v90 = pMapStats->GetMapInfo(pCurrentMapName);
             if ( !v90 )
               v90 = rand() % (signed int)pMapStats->uNumMaps + 1;
             pMapInfo = &pMapStats->pInfos[v90];