mirror of
https://github.com/libretro/scummvm.git
synced 2024-12-03 15:41:41 +00:00
FREESCAPE: refactor indicator loading for castle dos
This commit is contained in:
parent
a9083ab9a1
commit
b27fd58ca7
@ -425,6 +425,33 @@ void CastleEngine::executePrint(FCLInstruction &instruction) {
|
||||
}
|
||||
|
||||
|
||||
void CastleEngine::loadAssets() {
|
||||
FreescapeEngine::loadAssets();
|
||||
if (isDOS()) {
|
||||
_menu = loadBundledImage("castle_menu");
|
||||
assert(_menu);
|
||||
_menu->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtBackgroundFrame = loadBundledImage("castle_strength_background");
|
||||
_strenghtBackgroundFrame->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtBarFrame = loadBundledImage("castle_strength_bar");
|
||||
_strenghtBarFrame->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_0"));
|
||||
_strenghtWeightsFrames[0]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_1"));
|
||||
_strenghtWeightsFrames[1]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_2"));
|
||||
_strenghtWeightsFrames[2]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_3"));
|
||||
_strenghtWeightsFrames[3]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
}
|
||||
}
|
||||
|
||||
void CastleEngine::loadRiddles(Common::SeekableReadStream *file, int offset, int number) {
|
||||
file->seek(offset);
|
||||
debugC(1, kFreescapeDebugParser, "Riddle table:");
|
||||
|
@ -34,6 +34,7 @@ public:
|
||||
void endGame() override;
|
||||
|
||||
void drawInfoMenu() override;
|
||||
void loadAssets() override;
|
||||
void loadAssetsDOSFullGame() override;
|
||||
void loadAssetsDOSDemo() override;
|
||||
void loadAssetsAmigaDemo() override;
|
||||
|
@ -148,28 +148,6 @@ void CastleEngine::loadAssetsDOSFullGame() {
|
||||
_areaMap[1]->addFloor();
|
||||
_areaMap[2]->addFloor();
|
||||
delete stream;
|
||||
|
||||
_menu = loadBundledImage("castle_menu");
|
||||
assert(_menu);
|
||||
_menu->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtBackgroundFrame = loadBundledImage("castle_strength_background");
|
||||
_strenghtBackgroundFrame->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtBarFrame = loadBundledImage("castle_strength_bar");
|
||||
_strenghtBarFrame->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_0"));
|
||||
_strenghtWeightsFrames[0]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_1"));
|
||||
_strenghtWeightsFrames[1]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_2"));
|
||||
_strenghtWeightsFrames[2]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
|
||||
_strenghtWeightsFrames.push_back(loadBundledImage("castle_strength_weight_3"));
|
||||
_strenghtWeightsFrames[3]->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
} else
|
||||
error("Not implemented yet");
|
||||
|
||||
@ -226,9 +204,6 @@ void CastleEngine::loadAssetsDOSDemo() {
|
||||
_areaMap[1]->addFloor();
|
||||
_areaMap[2]->addFloor();
|
||||
delete stream;
|
||||
_menu = loadBundledImage("castle_menu");
|
||||
assert(_menu);
|
||||
_menu->convertToInPlace(_gfx->_texturePixelFormat);
|
||||
} else
|
||||
error("Not implemented yet");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user