Mercurial > mm7
diff Outdoor.cpp @ 1205:8c02e6f74b29
arrays to std::arrays phase 2 - mm7_data.h converted
author | Grumpy7 |
---|---|
date | Sun, 09 Jun 2013 00:30:48 +0200 |
parents | 0dbf6c4dd029 |
children | ab6560001f5b |
line wrap: on
line diff
--- a/Outdoor.cpp Sat Jun 08 21:47:29 2013 +0200 +++ b/Outdoor.cpp Sun Jun 09 00:30:48 2013 +0200 @@ -76,8 +76,8 @@ }; //for future sky textures? -int dword_4EC268[9]={3,3,3,3,3,3,3,3,3}; // weak -int dword_4EC28C[7]={3,3,3,3,3,3,3}; // weak +std::array<int, 9> dword_4EC268={{3,3,3,3,3,3,3,3,3}}; // weak +std::array<int, 7> dword_4EC28C={{3,3,3,3,3,3,3}}; // weak int dword_4EC2A8=9; // weak int dword_4EC2AC=7; // weak @@ -184,7 +184,7 @@ pRenderer->DrawSpriteObjects_ODM(); pRenderer->TransformBillboardsAndSetPalettesODM(); - sub_485F53((Vec2_int_ *)unnamed_6BE060); + sub_485F53((Vec2_int_ *)unnamed_6BE060.data()); } @@ -651,9 +651,9 @@ //----- (00489487) -------------------------------------------------------- void OutdoorLocation::SetFog() { - strcpy(pOutdoor->pLevelFilename, pCurrentMapName); + strcpy(pOutdoor->pLevelFilename, pCurrentMapName.data()); - auto map_id = pMapStats->GetMapInfo(pCurrentMapName); + auto map_id = pMapStats->GetMapInfo(pCurrentMapName.data()); if (map_id == MAP_INVALID || map_id == MAP_CELESTIA || map_id == MAP_THE_PIT || map_id > MAP_SHOALS) return; @@ -1197,9 +1197,9 @@ v6 = pAllocator->AllocNamedChunk(0, 2u, "IDLIST"); v1->pFaceIDLIST = (unsigned __int16 *)v6; *(short *)v6 = 0; - strcpy(v1->pSkyTextureName, pDefaultSkyTexture); + strcpy(v1->pSkyTextureName, pDefaultSkyTexture.data()); v1->uSky_TextureID = pBitmaps_LOD->LoadTexture(v1->pSkyTextureName); - strcpy(v1->pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture); + strcpy(v1->pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture.data()); v7 = pBitmaps_LOD->LoadTexture(v1->pGroundTileset); v8 = v1->uSky_TextureID == -1; v1->uMainTile_BitmapID = v7; @@ -1816,10 +1816,10 @@ pGameLoadingUI_ProgressBar->Progress(); memcpy(&uNumTerrainNormals, pSrc, 4); //v43 = (char *)v43 + 4; - memcpy(pTerrainSomeOtherData, pSrc + 4, 0x20000); + memcpy(pTerrainSomeOtherData.data(), pSrc + 4, 0x20000); pSrc += 4 + 0x20000; //v43 = (char *)v43 + 131072; - memcpy(pTerrainNormalIndices, pSrc, 0x10000); + memcpy(pTerrainNormalIndices.data(), pSrc, 0x10000); pSrc += 0x10000; //v43 = (char *)v43 + 65536; @@ -2345,7 +2345,7 @@ pTileTable->InitializeTileset(pTileTypes[2].tileset); //v108 = pTileTypes[3].uTileGroup; pTileTable->InitializeTileset(pTileTypes[3].tileset); - strcpy(pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture); + strcpy(pGroundTileset, byte_6BE124_cfg_textures_DefaultGroundTexture.data()); //v97 = pTileTypes[0].uTileID; //v108 = 0; auto v98 = pTileTable->GetTileById(pTileTypes[0].uTileID); @@ -2703,7 +2703,7 @@ v1 = 0; v8 = 0; - if ( !_stricmp(pCurrentMapName, "out09.odm") ) + if ( !_stricmp(pCurrentMapName.data(), "out09.odm") ) v8 = 1; for (uint i = 0; i < uNumLevelDecorations; ++i)