ACCESS: Support Amazon Spanish in access.dat R/W

I assume we want to use stable language codes in access/resources.cpp
even if language.h keeps changing, so I've used language code "23" for
ES_ESP since this was the enum value in language.h the last time
access.dat was generated.

Note: we still need access.dat to be regenerated for the game to work,
but create_access should now be able to extract the needed info
from the Spanish version of AMAZON.EXE and the game should run fine
afterwards.
This commit is contained in:
Francisco Javier Diéguez Tirado 2021-04-12 19:38:35 +02:00 committed by Paul Gilbert
parent 81df6c33cf
commit d8c4ed4d9c
2 changed files with 26 additions and 1 deletions

View file

@ -231,7 +231,7 @@ bool processExecutable(int exeIdx, const char *name) {
const char *const *itemNames;
const int *comboTable;
byte gameId = 0, discType = 0, demoType = 0;
byte language = Common::EN_ANY;
byte language = 5; //old Common::EN_ANY;
// Open up the file for access
File exeFile;
@ -268,6 +268,28 @@ bool processExecutable(int exeIdx, const char *name) {
comboTable = &Amazon::COMBO_TABLE[0][0];
break;
case 12012:
// Amazon Spanish floppy
language = 23; //old Common::ES_ESP;
gameId = 1;
dataSegmentOffset = 0xC8C0;
filenamesOffset = dataSegmentOffset + 0x3628 + 0x128;
numFilenames = 100;
charsStart = dataSegmentOffset + 0x4234 + 0x128;
charsEnd = dataSegmentOffset + 0x49c6 + 0x128;
roomsStart = dataSegmentOffset + 0x35a8 + 0x128;
roomsEnd = dataSegmentOffset + 0x4234 + 0x128;
travelPosOffset = dataSegmentOffset + 0x5ff7 + 0x128 + 0x2b;
numRooms = 64;
roomDescs = &Amazon::ROOM_DESCR[0];
deathScreens = Amazon::DEATH_SCREENS_ENG;
deathText = &Amazon::DEATH_TEXT_ENG[0];
numDeaths = sizeof(Amazon::DEATH_SCREENS_ENG);
numItems = 85;
itemNames = &Amazon::INVENTORY_NAMES_ENG[0];
comboTable = &Amazon::COMBO_TABLE[0][0];
break;
case 12360:
// Amazon CD English
gameId = 1;