DRAGONS: Fixed cutscene palettes in other variants. Started on FR support

This commit is contained in:
Eric Fry 2020-02-09 10:47:32 +11:00 committed by Eugene Sandulenko
parent 4790844720
commit f848b87572
4 changed files with 30 additions and 6 deletions

View File

@ -646,7 +646,7 @@ void CutScene::loadPalettes() {
if (!fd.open("dragon.exe")) {
error("Failed to open dragon.exe");
}
fd.seek(0x5336c); //TODO handle other game variants
fd.seek(_vm->getCutscenePaletteOffsetFromDragonEXE());
_palettes = (byte *)malloc(256 * 2 * 4);
fd.read(_palettes, 256 * 2 * 4);

View File

@ -71,6 +71,18 @@ static const DragonsGameDescription gameDescriptions[] = {
},
kGameIdDragons
},
{
{
"dragons",
0,
AD_ENTRY1s("bigfile.dat", "9854fed0d2b48522a62973e99b52a0be", 45107200),
Common::FR_FRA,
Common::kPlatformPSX,
ADGF_DROPPLATFORM,
GUIO0()
},
kGameIdDragons
},
{ AD_TABLE_END_MARKER, 0 }
};

View File

@ -1426,20 +1426,20 @@ void DragonsEngine::updatePaletteCycling() {
uint32 DragonsEngine::getFontOffsetFromDragonEXE() {
switch (_language) {
case Common::EN_GRB : return 0x4b4fc;
case Common::EN_USA : return 0x4a144;
case Common::EN_GRB : return 0x4b4fc;
case Common::DE_DEU : return 0x4af5c;
//TODO FR
case Common::FR_FRA : return 0x4b158;
default : error("Unable to get font offset from dragon.exe for %s", getLanguageCode(_language));
}
}
uint32 DragonsEngine::getSpeechTblOffsetFromDragonEXE() {
switch (_language) {
case Common::EN_GRB : return 0x4f4f4;
case Common::EN_USA : return 0x4e138;
case Common::EN_GRB : return 0x4f4f4;
case Common::DE_DEU : return 0x4f0a4;
//TODO FR
case Common::FR_FRA : return 0x4f2a0;
default : error("Unable to get speech table offset from dragon.exe for %s", getLanguageCode(_language));
}
}
@ -1449,7 +1449,18 @@ uint32 DragonsEngine::getBigFileInfoTblFromDragonEXE() {
case Common::EN_USA : return 0x4a238;
case Common::EN_GRB : return 0x4b5f4;
case Common::DE_DEU : return 0x4b054;
//TODO FR
case Common::FR_FRA : return 0x4b250;
default :
error("Unable to get speech table offset from dragon.exe for %s", getLanguageCode(_language));
}
}
uint32 DragonsEngine::getCutscenePaletteOffsetFromDragonEXE() {
switch (_language) {
case Common::EN_USA : return 0x5336c;
case Common::EN_GRB : return 0x54628;
case Common::DE_DEU : return 0x541d8;
case Common::FR_FRA : return 0x543d4;
default :
error("Unable to get speech table offset from dragon.exe for %s", getLanguageCode(_language));
}

View File

@ -285,6 +285,7 @@ public:
uint32 getBigFileInfoTblFromDragonEXE();
uint32 getFontOffsetFromDragonEXE();
uint32 getSpeechTblOffsetFromDragonEXE();
uint32 getCutscenePaletteOffsetFromDragonEXE();
private:
bool savegame(const char *filename, const char *description);
bool loadgame(const char *filename);