FREESCAPE: unified some more code for castle dos

This commit is contained in:
neuromancer 2024-08-25 08:26:48 +02:00
parent b27fd58ca7
commit d135d1aae0
2 changed files with 7 additions and 11 deletions

View File

@ -428,6 +428,12 @@ void CastleEngine::executePrint(FCLInstruction &instruction) {
void CastleEngine::loadAssets() {
FreescapeEngine::loadAssets();
if (isDOS()) {
for (auto &it : _areaMap)
it._value->addStructure(_areaMap[255]);
_areaMap[1]->addFloor();
_areaMap[2]->addFloor();
_menu = loadBundledImage("castle_menu");
assert(_menu);
_menu->convertToInPlace(_gfx->_texturePixelFormat);

View File

@ -72,7 +72,7 @@ void CastleEngine::loadDOSFonts(Common::SeekableReadStream *file, int pos) {
}
//debugN("\n");
}
debug("%" PRIx64, file->pos());
//debug("%" PRIx64, file->pos());
_fontPlane1.set_size(64 * 59);
_fontPlane1.set_bits(bufferPlane1);
@ -142,11 +142,6 @@ void CastleEngine::loadAssetsDOSFullGame() {
stream = decryptFile("CMEDF");
load8bitBinary(stream, 0, 16);
for (auto &it : _areaMap)
it._value->addStructure(_areaMap[255]);
_areaMap[1]->addFloor();
_areaMap[2]->addFloor();
delete stream;
} else
error("Not implemented yet");
@ -198,11 +193,6 @@ void CastleEngine::loadAssetsDOSDemo() {
stream = decryptFile("CDEDF");
load8bitBinary(stream, 0, 16);
for (auto &it : _areaMap)
it._value->addStructure(_areaMap[255]);
_areaMap[1]->addFloor();
_areaMap[2]->addFloor();
delete stream;
} else
error("Not implemented yet");