moved old minimap image data

refactored map data loading
This commit is contained in:
devZoGok
2024-09-22 14:46:29 +03:00
parent bcca140055
commit 0be5a7fb0a
7 changed files with 76 additions and 62 deletions
-9
View File
@@ -45,15 +45,6 @@ namespace battleship{
initDragbox();
mainPlayer = Game::getSingleton()->getPlayer(playerId);
string minimapPath = GameManager::getSingleton()->getPath() + "Models/Maps/" + Map::getSingleton()->getMapName() + "/minimap.jpg";
ImageAsset *asset = (ImageAsset*)AssetManager::getSingleton()->getAsset(minimapPath);
int imgSize = asset->width * asset->height * asset->numChannels;
oldImageData = new u8[imgSize];
for(int i = 0; i < imgSize; i++)
oldImageData[i] = asset->image[i];
}
ActiveGameState::~ActiveGameState() {