ULTIMA8: Add usecode offsets for alternate Crusader: No Remorse versions

This commit is contained in:
Matthew Duggan 2021-06-26 21:45:55 +09:00
parent d4052a1c7c
commit 2dbb1bfc7a
3 changed files with 651 additions and 1 deletions

View File

@ -44,6 +44,13 @@ struct GameInfo {
GAME_PENTAGRAM_MENU
} _type;
// Usecode coff variant
enum GameUsecodeOffsetVariant {
GAME_UC_DEFAULT, // Most versions of most games
GAME_UC_REM_ES, // Crusader: No Remorse Spanish
GAME_UC_REM_DEMO // Crusader: No Remorse Demo
} _ucOffVariant;
//! version number, encoded as 100*major + minor
//! so, 2.12 becomes 212
//! 0 = unknown

View File

@ -364,7 +364,12 @@ bool Ultima8Engine::startupGame() {
if (_gameInfo->_type == GameInfo::GAME_U8) {
_ucMachine = new UCMachine(U8Intrinsics, 256);
} else if (_gameInfo->_type == GameInfo::GAME_REMORSE) {
_ucMachine = new UCMachine(RemorseIntrinsics, 311);
if (_gameInfo->_ucOffVariant == GameInfo::GAME_UC_REM_DEMO)
_ucMachine = new UCMachine(RemorseDemoIntrinsics, 310);
else if (_gameInfo->_ucOffVariant == GameInfo::GAME_UC_REM_ES)
_ucMachine = new UCMachine(RemorseEsIntrinsics, 309);
else
_ucMachine = new UCMachine(RemorseIntrinsics, 311);
} else if (_gameInfo->_type == GameInfo::GAME_REGRET) {
_ucMachine = new UCMachine(RegretIntrinsics, 350);
} else {
@ -814,6 +819,7 @@ bool Ultima8Engine::getGameInfo(const istring &game, GameInfo *ginfo) {
ginfo->_type = GameInfo::GAME_UNKNOWN;
ginfo->version = 0;
ginfo->_language = GameInfo::GAMELANG_UNKNOWN;
ginfo->_ucOffVariant = GameInfo::GAME_UC_DEFAULT;
assert(game == "ultima8" || game == "remorse" || game == "regret");
@ -824,6 +830,14 @@ bool Ultima8Engine::getGameInfo(const istring &game, GameInfo *ginfo) {
else if (game == "regret")
ginfo->_type = GameInfo::GAME_REGRET;
if (ginfo->_type == GameInfo::GAME_REMORSE)
{
if (_gameDescription->desc.flags & ADGF_DEMO)
ginfo->_ucOffVariant = GameInfo::GAME_UC_REM_DEMO;
else if (_gameDescription->desc.language == Common::ES_ESP)
ginfo->_ucOffVariant = GameInfo::GAME_UC_REM_ES;
}
switch (_gameDescription->desc.language) {
case Common::EN_ANY:
ginfo->_language = GameInfo::GAMELANG_ENGLISH;

View File

@ -368,6 +368,635 @@ Intrinsic RemorseIntrinsics[] = {
0 // void UNUSEDInt137()
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Intrinsics for the Remorse demo.
Intrinsic RemorseDemoIntrinsics[] = {
World::I_getAlertActive,
Item::I_getFrame,
Item::I_setFrame,
Item::I_getMapArray,
Item::I_getStatus,
Item::I_orStatus,
Item::I_equip,
Item::I_isPartlyOnScreen,
Actor::I_isNPC,
Item::I_getZ,
Item::I_destroy,
Actor::I_getUnkByte,
Ultima8Engine::I_setAvatarInStasis,
Item::I_getDirToItem,
Actor::I_turnToward,
MovieGump::I_playMovieCutsceneAlt,
Item::I_getQLo,
Actor::I_getMap,
MusicProcess::I_playMusic,
Item::I_getX,
Item::I_getY,
AudioProcess::I_playSFXCru,
Item::I_getShape,
Item::I_explode,
UCMachine::I_rndRange,
Item::I_legalCreateAtCoords,
Item::I_andStatus,
World::I_getControlledNPCNum,
Actor::I_getDir,
Actor::I_getLastAnimSet,
Item::I_fireWeapon,
Item::I_create,
Item::I_popToCoords,
Actor::I_setDead,
Item::I_push,
0, // TODO: Intrinsic023 10a8:26a8,
Item::I_setShape,
Item::I_touch,
Item::I_getQHi,
Item::I_getClosestDirectionInRange,
Item::I_hurl,
World::I_gameDifficulty,
AudioProcess::I_playAmbientSFXCru,
Item::I_isCompletelyOn,
UCMachine::I_true,
Container::I_destroyContents,
Item::I_getQLo,
Item::I_inFastArea,
Item::I_setQHi,
Item::I_legalMoveToPoint,
CurrentMap::I_canExistAtPoint,
Item::I_pop,
Item::I_andStatus,
Item::I_receiveHit,
Actor::I_isBusy,
Item::I_getDirFromTo16,
Actor::I_isKneeling,
Actor::I_doAnim,
MainActor::I_addItemCru,
AudioProcess::I_stopSFXCru,
Actor::I_isDead,
AudioProcess::I_isSFXPlayingForObject,
Item::I_setQLo,
Item::I_getFamily,
Item::I_fall,
Egg::I_getEggId,
CameraProcess::I_moveTo,
CameraProcess::I_setCenterOn,
Item::I_getRangeIfVisible,
AudioProcess::I_playSFXCru,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Actor::I_getCurrentActivityNo,
Actor::I_clrInCombat,
Actor::I_setDefaultActivity0,
Actor::I_setDefaultActivity1,
Actor::I_setDefaultActivity2,
Actor::I_setActivity,
World::I_setControlledNPCNum,
Item::I_getSurfaceWeight,
Item::I_isCentreOn,
Item::I_setFrame,
Actor::I_getLastAnimSet,
Item::I_legalCreateAtPoint,
Item::I_getPoint,
CruStatusGump::I_hideStatusGump,
MovieGump::I_playMovieOverlay,
CruStatusGump::I_showStatusGump,
Actor::I_setDead,
Actor::I_createActor,
0,
Actor::I_teleport,
Item::I_getFootpadData,
Item::I_isInNpc,
Item::I_getQLo,
Item::I_getNpcNum,
Item::I_setNpcNum,
Item::I_andStatus,
Item::I_move,
UCMachine::I_true,
Kernel::I_resetRef,
Item::I_getNpcNum,
Item::I_andStatus,
Ultima8Engine::I_getUnkCrusaderFlag,
Ultima8Engine::I_setUnkCrusaderFlag,
Ultima8Engine::I_setCruStasis,
Actor::I_setDead,
Ultima8Engine::I_clrUnkCrusaderFlag,
Ultima8Engine::I_clrCruStasis,
AudioProcess::I_stopSFXCru,
PaletteFaderProcess::I_fadeToBlack,
MainActor::I_clrKeycards,
MainActor::I_teleportToEgg,
PaletteFaderProcess::I_fadeFromBlack,
Actor::I_setImmortal,
Actor::I_getHp,
Actor::I_setActivity,
Item::I_getQuality,
Item::I_setQuality,
Item::I_use,
MainActor::I_getMaxEnergy,
Actor::I_getMana,
Actor::I_setMana,
Item::I_getQLo,
Actor::I_setImmortal,
CameraProcess::I_getCameraX,
CameraProcess::I_getCameraY,
Item::I_setMapArray,
Item::I_getNpcNum,
Item::I_shoot,
Item::I_enterFastArea,
Item::I_setBroken,
Item::I_hurl,
Item::I_getNpcNum,
PaletteFaderProcess::I_jumpToAllBlack,
MusicProcess::I_stopMusic,
0,
MovieGump::I_playMovieCutsceneAlt,
0,
Game::I_playCredits,
Ultima8Engine::I_moveKeyDownRecently,
MainActor::I_teleportToEgg,
PaletteFaderProcess::I_jumpToGreyScale,
World::I_resetVargasShield,
Item::I_andStatus,
PaletteFaderProcess::I_jumpToNormalPalette,
PaletteFaderProcess::I_fadeFromBlack,
PaletteFaderProcess::I_fadeFromBlack,
PaletteFaderProcess::I_fadeToBlack,
PaletteFaderProcess::I_fadeToBlack,
PaletteFaderProcess::I_fadeToGivenColor,
Actor::I_setDead,
Item::I_getQLo,
Item::I_getUnkEggType,
Egg::I_setEggXRange,
Item::I_overlaps,
Item::I_isOn,
UCMachine::I_true,
Egg::I_getEggXRange,
Actor::I_setDead,
MovieGump::I_playMovieCutsceneAlt,
AudioProcess::I_playSFX,
Actor::I_isFalling,
Item::I_getFamilyOfType,
Item::I_getNpcNum,
Item::I_getQLo,
Item::I_getQHi,
Item::I_unequip,
Item::I_avatarStoleSomething,
Item::I_andStatus,
Ultima8Engine::I_getCurrentTimerTick,
World::I_setAlertActive,
Item::I_equip,
World::I_clrAlertActive,
Ultima8Engine::I_setAvatarInStasis,
MainActor::I_addItemCru,
Actor::I_getLastAnimSet,
Item::I_setQuality,
CurrentMap::I_canExistAt,
Item::I_isOn,
Item::I_hurl,
Item::I_getQHi,
Item::I_andStatus,
Item::I_hurl,
Item::I_andStatus,
Item::I_hurl,
Item::I_andStatus,
KeypadGump::I_showKeypad,
Item::I_isOn,
SpriteProcess::I_createSprite,
Item::I_getDirFromItem,
Item::I_hurl,
Item::I_getQHi,
Actor::I_addHp,
0, // TOOD: Intrinsic0CC 1020:049c,
Actor::I_isInCombat,
Actor::I_setActivity,
Item::I_setQAndCombine,
Item::I_use,
AudioProcess::I_stopAllSFX,
MovieGump::I_playMovieCutscene,
0,
AudioProcess::I_playSFX,
Item::I_use,
CameraProcess::I_getCameraZ,
Actor::I_getLastAnimSet,
Actor::I_setDead,
Item::I_getQLo,
PaletteFaderProcess::I_jumpToAllGrey,
Actor::I_setActivity,
Item::I_isOn,
Actor::I_getLastActivityNo,
Actor::I_setCombatTactic,
Actor::I_getEquip,
Actor::I_setEquip,
Actor::I_getDefaultActivity0,
Actor::I_getDefaultActivity1,
Actor::I_getDefaultActivity2,
Actor::I_getLastAnimSet,
Actor::I_setTarget,
Actor::I_setUnkByte,
Actor::I_setDead,
Item::I_cast,
Item::I_andStatus,
Item::I_getQLo,
MainActor::I_getNumberOfCredits,
Item::I_popToEnd,
Item::I_popToContainer,
BatteryChargerProcess::I_create,
Kernel::I_getNumProcesses,
Item::I_getQHi,
Item::I_isOn,
Actor::I_setActivity,
Item::I_getQHi,
Item::I_getQ,
Item::I_setQ,
CruHealerProcess::I_create,
Item::I_hurl,
Item::I_getNpcNum,
Item::I_hurl,
Item::I_isOn,
Item::I_getQHi,
Item::I_andStatus,
MainActor::I_hasKeycard,
ComputerGump::I_readComputer,
UCMachine::I_numToStr,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Ultima8Engine::I_moveKeyDownRecently,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Actor::I_getDir,
UCMachine::I_numToStr,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_fireDistance,
Item::I_andStatus,
Item::I_hurl,
Item::I_setBroken,
Item::I_andStatus,
Item::I_getTypeFlag,
Item::I_getNpcNum,
Item::I_hurl,
Item::I_getCY,
Item::I_getCZ,
Item::I_getCX,
Actor::I_getDir,
UCMachine::I_numToStr,
Item::I_getDirToCoords,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_isOn,
Item::I_getFootpadData,
Actor::I_isDead,
Actor::I_createActorCru,
Actor::I_setImmortal,
Item::I_andStatus,
Item::I_getQHi,
WeaselGump::I_showWeaselGump,
Actor::I_setDead,
Item::I_getQLo,
Item::I_getNpcNum,
Actor::I_getDir,
Actor::I_getLastAnimSet,
Item::I_setQuality,
0 // Unused
};
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
// Intrinsics for the Remorse Spanish version.
Intrinsic RemorseEsIntrinsics[] = {
ComputerGump::I_readComputer,
Item::I_getMapArray,
Item::I_getFrame,
Item::I_setFrame,
UCMachine::I_rndRange,
UCMachine::I_numToStr,
CruStatusGump::I_hideStatusGump,
Actor::I_getMap,
MovieGump::I_playMovieOverlay,
CruStatusGump::I_showStatusGump,
Item::I_getDirToItem,
Actor::I_turnToward,
MovieGump::I_playMovieCutsceneAlt,
AudioProcess::I_playSFXCru,
World::I_getAlertActive,
Item::I_getStatus,
Item::I_orStatus,
Item::I_equip,
Item::I_isPartlyOnScreen,
Actor::I_isNPC,
Item::I_getZ,
Item::I_destroy,
Actor::I_getUnkByte,
Ultima8Engine::I_setAvatarInStasis,
Item::I_getQLo,
MusicProcess::I_playMusic,
Item::I_getX,
Item::I_getY,
Item::I_getShape,
Item::I_explode,
Item::I_legalCreateAtCoords,
Item::I_andStatus,
World::I_getControlledNPCNum,
Actor::I_getDir,
Actor::I_getLastAnimSet,
Item::I_fireWeapon,
Item::I_create,
Item::I_popToCoords,
Actor::I_setDead,
Item::I_push,
0, // TODO: Intrinsic028 10b0:2622,
Item::I_setShape,
Item::I_touch,
Item::I_getQHi,
Item::I_getClosestDirectionInRange,
Item::I_hurl,
World::I_gameDifficulty,
AudioProcess::I_playAmbientSFXCru,
Item::I_isCompletelyOn,
UCMachine::I_true,
Container::I_destroyContents,
Item::I_getQLo,
Item::I_inFastArea,
Item::I_setQHi,
Item::I_legalMoveToPoint,
CurrentMap::I_canExistAtPoint,
Item::I_pop,
Item::I_andStatus,
Item::I_receiveHit,
Actor::I_isBusy,
Item::I_getDirFromTo16,
Actor::I_isKneeling,
Actor::I_doAnim,
MainActor::I_addItemCru,
AudioProcess::I_stopSFXCru,
Actor::I_isDead,
AudioProcess::I_isSFXPlayingForObject,
Item::I_setQLo,
Item::I_getFamily,
Item::I_fall,
Egg::I_getEggId,
CameraProcess::I_moveTo,
CameraProcess::I_setCenterOn,
Item::I_getRangeIfVisible,
AudioProcess::I_playSFXCru,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Item::I_isOn,
Item::I_getQHi,
Kernel::I_resetRef,
Actor::I_getCurrentActivityNo,
Actor::I_clrInCombat,
Actor::I_setDefaultActivity0,
Actor::I_setDefaultActivity1,
Actor::I_setDefaultActivity2,
Actor::I_setActivity,
World::I_setControlledNPCNum,
Item::I_getSurfaceWeight,
Item::I_isCentreOn,
Item::I_setFrame,
Actor::I_getLastAnimSet,
Item::I_legalCreateAtPoint,
Item::I_getPoint,
Actor::I_setDead,
Actor::I_createActor,
0,
Actor::I_teleport,
Item::I_getFootpadData,
Item::I_isInNpc,
Item::I_getQLo,
Item::I_getNpcNum,
Item::I_setNpcNum,
Item::I_andStatus,
Item::I_move,
UCMachine::I_true,
Item::I_getNpcNum,
Item::I_andStatus,
Ultima8Engine::I_getUnkCrusaderFlag,
Ultima8Engine::I_setUnkCrusaderFlag,
Ultima8Engine::I_setCruStasis,
Actor::I_setDead,
Ultima8Engine::I_clrUnkCrusaderFlag,
Ultima8Engine::I_clrCruStasis,
AudioProcess::I_stopSFXCru,
PaletteFaderProcess::I_fadeToBlack,
MainActor::I_clrKeycards,
MainActor::I_teleportToEgg,
PaletteFaderProcess::I_fadeFromBlack,
Actor::I_setImmortal,
Actor::I_getHp,
Actor::I_setActivity,
Item::I_getQuality,
Item::I_setQuality,
Item::I_use,
MainActor::I_getMaxEnergy,
Actor::I_getMana,
Actor::I_setMana,
Item::I_getQLo,
Actor::I_setImmortal,
CameraProcess::I_getCameraX,
CameraProcess::I_getCameraY,
Item::I_setMapArray,
Item::I_getNpcNum,
Item::I_shoot,
Item::I_enterFastArea,
Item::I_setBroken,
Item::I_hurl,
Item::I_getNpcNum,
PaletteFaderProcess::I_jumpToAllBlack,
MusicProcess::I_stopMusic,
0,
MovieGump::I_playMovieCutsceneAlt,
0,
Game::I_playCredits,
Ultima8Engine::I_moveKeyDownRecently,
MainActor::I_teleportToEgg,
PaletteFaderProcess::I_jumpToGreyScale,
World::I_resetVargasShield,
Item::I_andStatus,
PaletteFaderProcess::I_jumpToNormalPalette,
PaletteFaderProcess::I_fadeFromBlack,
PaletteFaderProcess::I_fadeFromBlack,
PaletteFaderProcess::I_fadeToBlack,
PaletteFaderProcess::I_fadeToBlack,
PaletteFaderProcess::I_fadeToGivenColor,
Actor::I_setDead,
Item::I_getQLo,
Item::I_getUnkEggType,
Egg::I_setEggXRange,
Item::I_overlaps,
Item::I_isOn,
UCMachine::I_true,
KeypadGump::I_showKeypad,
MovieGump::I_playMovieCutsceneAlt,
Egg::I_getEggXRange,
Actor::I_setDead,
AudioProcess::I_playSFX,
Actor::I_isFalling,
Item::I_getFamilyOfType,
Item::I_getNpcNum,
Item::I_getQLo,
Item::I_getQHi,
Item::I_unequip,
Item::I_avatarStoleSomething,
Item::I_andStatus,
Ultima8Engine::I_getCurrentTimerTick,
World::I_setAlertActive,
Item::I_equip,
World::I_clrAlertActive,
Ultima8Engine::I_setAvatarInStasis,
MainActor::I_addItemCru,
Actor::I_getLastAnimSet,
Item::I_setQuality,
CurrentMap::I_canExistAt,
Item::I_isOn,
Item::I_hurl,
Item::I_getQHi,
Item::I_andStatus,
Item::I_hurl,
Item::I_andStatus,
Item::I_hurl,
Item::I_andStatus,
Item::I_getDirToCoords,
Item::I_popToContainer,
Item::I_getNpcNum,
Item::I_setBroken,
Item::I_getCY,
Item::I_getCX,
SpriteProcess::I_createSprite,
Item::I_isOn,
Item::I_getFootpadData,
Actor::I_isDead,
Actor::I_createActorCru,
Actor::I_setActivity,
Item::I_andStatus,
Item::I_setQuality,
Actor::I_getLastAnimSet,
Item::I_getDirFromItem,
Item::I_hurl,
Item::I_getQHi,
Actor::I_addHp,
0, // TODO: Intrinsic0DB 1028:049c,
Actor::I_setActivity,
Actor::I_isInCombat,
Item::I_setQAndCombine,
Item::I_use,
AudioProcess::I_stopAllSFX,
MovieGump::I_playMovieCutscene,
0,
AudioProcess::I_playSFX,
Item::I_use,
CameraProcess::I_getCameraZ,
Actor::I_getLastAnimSet,
Actor::I_setDead,
Item::I_getQLo,
PaletteFaderProcess::I_jumpToAllGrey,
Item::I_equip,
Actor::I_setActivity,
Item::I_isOn,
Actor::I_getLastActivityNo,
Actor::I_setCombatTactic,
Actor::I_getEquip,
Actor::I_setEquip,
Actor::I_getDefaultActivity0,
Actor::I_getDefaultActivity1,
Actor::I_getDefaultActivity2,
Actor::I_getLastAnimSet,
Item::I_getQHi,
Item::I_getNpcNum,
Item::I_cast,
MainActor::I_getNumberOfCredits,
Actor::I_setTarget,
Actor::I_setUnkByte,
Item::I_hurl,
Actor::I_setDead,
Item::I_andStatus,
Item::I_getQLo,
Item::I_popToEnd,
BatteryChargerProcess::I_create,
Kernel::I_getNumProcesses,
Item::I_isOn,
Actor::I_setActivity,
Item::I_getQHi,
Item::I_getQ,
Item::I_setQ,
CruHealerProcess::I_create,
Item::I_hurl,
Item::I_getNpcNum,
Item::I_hurl,
Item::I_isOn,
Item::I_andStatus,
Item::I_getQHi,
MainActor::I_hasKeycard,
Actor::I_setDead,
Actor::I_setImmortal,
Item::I_getQLo,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Ultima8Engine::I_moveKeyDownRecently,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_andStatus,
Item::I_getNpcNum,
Item::I_fireDistance,
Item::I_andStatus,
Item::I_hurl,
Item::I_setBroken,
Item::I_andStatus,
WeaselGump::I_showWeaselGump,
Item::I_getTypeFlag,
Item::I_getNpcNum,
Item::I_hurl,
Item::I_getCY,
Item::I_getCZ,
0 //UNUSEDInt136,
};
} // End of namespace Ultima8
} // End of namespace Ultima