aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/op_cmd.cpp1
-rw-r--r--engines/cruise/cruise_main.cpp4
-rw-r--r--engines/gob/inter.h1
-rw-r--r--engines/groovie/script.cpp2
-rw-r--r--engines/kyra/gui_lol.cpp42
-rw-r--r--engines/kyra/lol.cpp18
-rw-r--r--engines/kyra/saveload_lol.cpp2
-rw-r--r--engines/kyra/scene_lol.cpp2
-rw-r--r--engines/kyra/screen.cpp3
-rw-r--r--engines/kyra/sequences_lok.cpp16
-rw-r--r--engines/kyra/sequences_lol.cpp44
-rw-r--r--engines/kyra/sprites_lol.cpp2
-rw-r--r--engines/saga/sndres.cpp59
-rw-r--r--engines/saga/sound.cpp67
-rw-r--r--engines/saga/sound.h6
-rw-r--r--engines/sci/console.cpp38
-rw-r--r--engines/sci/console.h1
-rw-r--r--engines/sci/debug.h3
-rw-r--r--engines/sci/detection.cpp778
-rw-r--r--engines/sci/engine/game.cpp60
-rw-r--r--engines/sci/engine/kernel.cpp62
-rw-r--r--engines/sci/engine/kernel.h5
-rw-r--r--engines/sci/engine/kevent.cpp2
-rw-r--r--engines/sci/engine/kgraphics.cpp12
-rw-r--r--engines/sci/engine/kmovement.cpp8
-rw-r--r--engines/sci/engine/kscripts.cpp16
-rw-r--r--engines/sci/engine/ksound.cpp4
-rw-r--r--engines/sci/engine/memobj.cpp1
-rw-r--r--engines/sci/engine/memobj.h1
-rw-r--r--engines/sci/engine/savegame.cpp38
-rw-r--r--engines/sci/engine/script.cpp13
-rw-r--r--engines/sci/engine/script.h2
-rw-r--r--engines/sci/engine/scriptdebug.cpp7
-rw-r--r--engines/sci/engine/seg_manager.cpp98
-rw-r--r--engines/sci/engine/seg_manager.h41
-rw-r--r--engines/sci/engine/state.h4
-rw-r--r--engines/sci/engine/vm.cpp222
-rw-r--r--engines/sci/engine/vm.h59
-rw-r--r--engines/sci/exereader.cpp64
-rw-r--r--engines/sci/exereader.h1
-rw-r--r--engines/sci/gfx/gfx_resmgr.cpp9
-rw-r--r--engines/sci/gfx/gfx_resmgr.h9
-rw-r--r--engines/sci/gfx/gfx_state_internal.h1
-rw-r--r--engines/sci/gfx/gfx_widgets.h1
-rw-r--r--engines/sci/resource.cpp389
-rw-r--r--engines/sci/resource.h34
-rw-r--r--engines/sci/sci.cpp48
-rw-r--r--engines/sci/sci.h4
-rw-r--r--engines/sci/sfx/softseq/adlib.cpp2
-rw-r--r--engines/sci/vocabulary.cpp2
-rw-r--r--engines/scumm/imuse/imuse.cpp8
-rw-r--r--engines/tinsel/pcode.cpp8
52 files changed, 1016 insertions, 1308 deletions
diff --git a/engines/agi/op_cmd.cpp b/engines/agi/op_cmd.cpp
index 7012174c20..1034d5d8c4 100644
--- a/engines/agi/op_cmd.cpp
+++ b/engines/agi/op_cmd.cpp
@@ -1818,7 +1818,6 @@ int AgiEngine::runLogic(int n) {
}
_game.execStack.back().curIP = ip;
- processEvents();
switch (op = *(code + ip++)) {
case 0xff: // if (open/close)
diff --git a/engines/cruise/cruise_main.cpp b/engines/cruise/cruise_main.cpp
index 94dfc95cb5..aa3283aab7 100644
--- a/engines/cruise/cruise_main.cpp
+++ b/engines/cruise/cruise_main.cpp
@@ -1738,7 +1738,7 @@ void CruiseEngine::mainLoop(void) {
// Delay for the specified amount of time, but still respond to events
bool skipEvents = false;
- while (currentTick < lastTick + _gameSpeed) {
+ do {
g_system->delayMillis(10);
currentTick = g_system->getMillis();
@@ -1749,7 +1749,7 @@ void CruiseEngine::mainLoop(void) {
if (_vm->getDebugger()->isAttached())
_vm->getDebugger()->onFrame();
- }
+ } while (currentTick < lastTick + _gameSpeed);
} else {
manageEvents();
diff --git a/engines/gob/inter.h b/engines/gob/inter.h
index c3d3a26f47..057f52b360 100644
--- a/engines/gob/inter.h
+++ b/engines/gob/inter.h
@@ -560,6 +560,7 @@ protected:
bool oPlaytoons_checkData(OpFuncParams &params);
void oPlaytoons_CD_20_23();
void oPlaytoons_CD_25();
+ void oPlaytoons_openItk();
};
} // End of namespace Gob
diff --git a/engines/groovie/script.cpp b/engines/groovie/script.cpp
index 7fdfa6c780..5ee58184f2 100644
--- a/engines/groovie/script.cpp
+++ b/engines/groovie/script.cpp
@@ -219,7 +219,7 @@ void Script::step() {
// Only output if we're not re-doing the previous instruction
if (_currentInstruction != _oldInstruction) {
- debugScript(1, false, _debugString.c_str());
+ debugScript(1, false, "%s", _debugString.c_str());
_oldInstruction = _currentInstruction;
}
diff --git a/engines/kyra/gui_lol.cpp b/engines/kyra/gui_lol.cpp
index 5e03f3d9bb..b583db04df 100644
--- a/engines/kyra/gui_lol.cpp
+++ b/engines/kyra/gui_lol.cpp
@@ -127,7 +127,7 @@ void LoLEngine::gui_drawScroll() {
if (_availableSpells[i] == -1)
continue;
uint8 col = (i == _selectedSpell) ? 132 : 1;
- _screen->fprintString(getLangString(_spellProperties[_availableSpells[i]].spellNameCode), 24, y, col, 0, 0);
+ _screen->fprintString("%s", 24, y, col, 0, 0, getLangString(_spellProperties[_availableSpells[i]].spellNameCode));
y += 9;
}
}
@@ -138,7 +138,7 @@ void LoLEngine::gui_highlightSelectedSpell(bool mode) {
if (_availableSpells[i] == -1)
continue;
uint8 col = (mode && (i == _selectedSpell)) ? 132 : 1;
- _screen->fprintString(getLangString(_spellProperties[_availableSpells[i]].spellNameCode), 24, y, col, 0, 0);
+ _screen->fprintString("%s", 24, y, col, 0, 0, getLangString(_spellProperties[_availableSpells[i]].spellNameCode));
y += 9;
}
}
@@ -165,14 +165,14 @@ void LoLEngine::gui_displayCharInventory(int charNum) {
_screen->copyRegion(80, 143, 80, 143, 232, 35, 0, 2);
gui_drawAllCharPortraitsWithStats();
- _screen->fprintString(l->name, 157, 9, 254, 0, 5);
+ _screen->fprintString("%s", 157, 9, 254, 0, 5, l->name);
gui_printCharInventoryStats(charNum);
for (int i = 0; i < 11; i++)
gui_drawCharInventoryItem(i);
- _screen->fprintString(getLangString(0x4033), 182, 103, 172, 0, 5);
+ _screen->fprintString("%s", 182, 103, 172, 0, 5, getLangString(0x4033));
static const uint16 statusFlags[] = { 0x0080, 0x0000, 0x1000, 0x0002, 0x100, 0x0001, 0x0000, 0x0000 };
@@ -232,14 +232,14 @@ void LoLEngine::gui_printCharacterStats(int index, int redraw, int value) {
y = index * 10 + 22;
col = 158;
if (redraw)
- _screen->fprintString(getLangString(0x4014 + index), offs + 108, y, col, 0, 4);
+ _screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
} else {
//skills
int s = index - 2;
y = s * 10 + 62;
col = _characters[_selectedCharacter].flags & (0x200 << s) ? 254 : 180;
if (redraw)
- _screen->fprintString(getLangString(0x4014 + index), offs + 108, y, col, 0, 4);
+ _screen->fprintString("%s", offs + 108, y, col, 0, 4, getLangString(0x4014 + index));
}
if (offs)
@@ -1215,7 +1215,7 @@ int LoLEngine::clickedPortraitEtcRight(Button *button) {
return 1;
}
- _txt->printMessage(2, getLangString((flg & 8) ? 0x4029 : ((flg & 0x10) ? 0x402a : 0x402b)));
+ _txt->printMessage(2, "%s", getLangString((flg & 8) ? 0x4029 : ((flg & 0x10) ? 0x402a : 0x402b)));
return 1;
}
@@ -1235,13 +1235,13 @@ int LoLEngine::clickedCharInventorySlot(Button *button) {
}
if (!f)
- _txt->printMessage(_itemsInPlay[_itemInHand].itemPropertyIndex == 231 ? 2 : 0, getLangString(0x418C));
+ _txt->printMessage(_itemsInPlay[_itemInHand].itemPropertyIndex == 231 ? 2 : 0, "%s", getLangString(0x418C));
return 1;
}
} else {
if (!_characters[_selectedCharacter].items[button->arg]) {
- _txt->printMessage(0, getLangString(_inventorySlotDesc[button->arg] + 8));
+ _txt->printMessage(0, "%s", getLangString(_inventorySlotDesc[button->arg] + 8));
return 1;
}
}
@@ -1506,7 +1506,7 @@ int LoLEngine::clickedSpellTargetCharacter(Button *button) {
int LoLEngine::clickedSpellTargetScene(Button *button) {
LoLCharacter *c = &_characters[_activeSpell.charNum];
- _txt->printMessage(0, getLangString(0x4041));
+ _txt->printMessage(0, "%s", getLangString(0x4041));
c->magicPointsCur += _activeSpell.p->mpRequired[_activeSpell.level];
if (c->magicPointsCur > c->magicPointsMax)
@@ -1633,7 +1633,7 @@ int LoLEngine::clickedRestParty(Button *button) {
_screen->fillRect(112, 0, 288, 120, 1);
gui_drawAllCharPortraitsWithStats();
- _txt->printMessage(0x8000, getLangString(0x4057));
+ _txt->printMessage(0x8000, "%s", getLangString(0x4057));
gui_toggleButtonDisplayMode(77, 0);
int h = 600 / tHp;
@@ -1761,7 +1761,7 @@ int LoLEngine::clickedRestParty(Button *button) {
_partyAwake = true;
updateDrawPage2();
gui_drawScene(0);
- _txt->printMessage(0x8000, getLangString(0x4059));
+ _txt->printMessage(0x8000, "%s", getLangString(0x4059));
_screen->fadeToPalette1(40);
} else {
@@ -1774,12 +1774,12 @@ int LoLEngine::clickedRestParty(Button *button) {
if (needPoisoningFlags & (1 << i))
setTemporaryFaceFrame(i, 3, 8, 0);
}
- _txt->printMessage(0x8000, getLangString(0x405a));
+ _txt->printMessage(0x8000, "%s", getLangString(0x405a));
gui_drawAllCharPortraitsWithStats();
} else {
setTemporaryFaceFrameForAllCharacters(2, 4, 1);
- _txt->printMessage(0x8000, getLangString(0x4058));
+ _txt->printMessage(0x8000, "%s", getLangString(0x4058));
}
gui_toggleButtonDisplayMode(77, 0);
}
@@ -1798,9 +1798,9 @@ int LoLEngine::clickedCompass(Button *button) {
if (_compassBroken) {
if (characterSays(0x425b, -1, true))
- _txt->printMessage(4, getLangString(0x425b));
+ _txt->printMessage(4, "%s", getLangString(0x425b));
} else {
- _txt->printMessage(0, getLangString(0x402f + _currentDirection));
+ _txt->printMessage(0, "%s", getLangString(0x402f + _currentDirection));
}
return 1;
@@ -1824,11 +1824,11 @@ int LoLEngine::clickedLamp(Button *button) {
if (_itemsInPlay[_itemInHand].itemPropertyIndex == 248) {
if (_lampOilStatus >= 100) {
- _txt->printMessage(0, getLangString(0x4061));
+ _txt->printMessage(0, "%s", getLangString(0x4061));
return 1;
}
- _txt->printMessage(0, getLangString(0x4062));
+ _txt->printMessage(0, "%s", getLangString(0x4062));
deleteItem(_itemInHand);
snd_playSoundEffect(181, -1);
@@ -1860,7 +1860,7 @@ int LoLEngine::clickedStatusIcon(Button *button) {
if (str == 0 || str > 3)
return 1;
- _txt->printMessage(0x8002, getLangString(str == 1 ? 0x424c : (str == 2 ? 0x424e : 0x424d)));
+ _txt->printMessage(0x8002, "%s", getLangString(str == 1 ? 0x424c : (str == 2 ? 0x424e : 0x424d)));
return 1;
}
@@ -2386,7 +2386,7 @@ int GUI_LoL::runMenu(Menu &menu) {
fC = _screen->getTextWidth(_saveDescription);
}
- _screen->fprintString(_saveDescription, (d->sx << 3), d->sy + 2, d->unk8, d->unkA, 0);
+ _screen->fprintString("%s", (d->sx << 3), d->sy + 2, d->unk8, d->unkA, 0, _saveDescription);
_screen->fillRect((d->sx << 3) + fC, d->sy, (d->sx << 3) + fC + wW, d->sy + d->h - 1, d->unk8, 0);
_screen->setCurPage(pg);
}
@@ -2485,7 +2485,7 @@ void GUI_LoL::setupSavegameNames(Menu &menu, int num) {
}
void GUI_LoL::printMenuText(const char *str, int x, int y, uint8 c0, uint8 c1, uint8 flags, Screen::FontId font) {
- _screen->fprintString(str, x, y, c0, c1, flags);
+ _screen->fprintString("%s", x, y, c0, c1, flags, str);
}
int GUI_LoL::getMenuCenterStringX(const char *str, int x1, int x2) {
diff --git a/engines/kyra/lol.cpp b/engines/kyra/lol.cpp
index e3d28163a8..816e244531 100644
--- a/engines/kyra/lol.cpp
+++ b/engines/kyra/lol.cpp
@@ -1900,7 +1900,7 @@ int LoLEngine::castSpell(int charNum, int spellType, int spellLevel) {
_activeSpell.level = ABS(spellLevel);
if ((_spellProperties[spellType].flags & 0x100) && testWallFlag(calcNewBlockPosition(_currentBlock, _currentDirection), _currentDirection, 1)) {
- _txt->printMessage(2, getLangString(0x4257));
+ _txt->printMessage(2, "%s", getLangString(0x4257));
return 0;
}
@@ -2062,7 +2062,7 @@ int LoLEngine::processMagicSpark(int charNum, int spellLevel) {
}
int LoLEngine::processMagicHealSelectTarget() {
- _txt->printMessage(0, getLangString(0x4040));
+ _txt->printMessage(0, "%s", getLangString(0x4040));
gui_resetButtonList();
gui_setFaceFramesControlButtons(81, 0);
gui_initButtonsFromList(_buttonList8);
@@ -2929,7 +2929,7 @@ void LoLEngine::addSpellToScroll(int spell, int charNum) {
}
if (_availableSpells[i] == spell) {
- _txt->printMessage(2, getLangString(0x42d0));
+ _txt->printMessage(2, "%s", getLangString(0x42d0));
return;
}
}
@@ -2965,7 +2965,7 @@ void LoLEngine::transferSpellToScollAnimation(int charNum, int spell, int slot)
if (_availableSpells[ii] == -1)
continue;
uint8 col = (ii == _selectedSpell) ? 132 : 1;
- _screen->fprintString(getLangString(_spellProperties[_availableSpells[ii]].spellNameCode), 24, y, col, 0, 0);
+ _screen->fprintString("%s", 24, y, col, 0, 0, getLangString(_spellProperties[_availableSpells[ii]].spellNameCode));
y += 9;
}
@@ -3459,7 +3459,7 @@ void LoLEngine::applyMonsterAttackSkill(MonsterInPlay *monster, int16 target, in
if (t) {
giveItemToMonster(monster, t);
if (characterSays(0x4019, _characters[target].id, true))
- _txt->printMessage(6, getLangString(0x4019));
+ _txt->printMessage(6, "%s", getLangString(0x4019));
}
break;
@@ -3473,7 +3473,7 @@ void LoLEngine::applyMonsterAttackSkill(MonsterInPlay *monster, int16 target, in
if (t) {
deleteItem(t);
if (characterSays(0x401b, _characters[target].id, true))
- _txt->printMessage(6, getLangString(0x401b));
+ _txt->printMessage(6, "%s", getLangString(0x401b));
}
break;
@@ -3541,12 +3541,12 @@ void LoLEngine::applyMonsterDefenseSkill(MonsterInPlay *monster, int16 attacker,
if (monster->properties->defenseSkillType == 1) {
giveItemToMonster(monster, itm);
if (characterSays(0x401c, _characters[attacker].id, true))
- _txt->printMessage(6, getLangString(0x401c));
+ _txt->printMessage(6, "%s", getLangString(0x401c));
} else {
deleteItem(itm);
if (characterSays(0x401d, _characters[attacker].id, true))
- _txt->printMessage(6, getLangString(0x401d));
+ _txt->printMessage(6, "%s", getLangString(0x401d));
}
}
break;
@@ -4315,7 +4315,7 @@ void LoLEngine::printMapText(uint16 stringId, int x, int y) {
void LoLEngine::printMapExitButtonText() {
int cp = _screen->setCurPage(2);
- _screen->fprintString(getLangString(0x4033), 295, 182, 172, 0, 5);
+ _screen->fprintString("%s", 295, 182, 172, 0, 5, getLangString(0x4033));
_screen->setCurPage(cp);
}
diff --git a/engines/kyra/saveload_lol.cpp b/engines/kyra/saveload_lol.cpp
index c72e2c46c0..30fc055a60 100644
--- a/engines/kyra/saveload_lol.cpp
+++ b/engines/kyra/saveload_lol.cpp
@@ -43,7 +43,7 @@ Common::Error LoLEngine::loadGameState(int slot) {
SaveHeader header;
Common::InSaveFile *saveFile = openSaveForReading(fileName, header);
if (!saveFile) {
- _txt->printMessage(2, getLangString(0x425d));
+ _txt->printMessage(2, "%s", getLangString(0x425d));
return Common::kNoError;
}
diff --git a/engines/kyra/scene_lol.cpp b/engines/kyra/scene_lol.cpp
index 32ee7a4d77..4a07072270 100644
--- a/engines/kyra/scene_lol.cpp
+++ b/engines/kyra/scene_lol.cpp
@@ -762,7 +762,7 @@ void LoLEngine::notifyBlockNotPassable(int scrollFlag) {
movePartySmoothScrollBlocked(2);
snd_stopSpeech(true);
- _txt->printMessage(0x8002, getLangString(0x403f));
+ _txt->printMessage(0x8002, "%s", getLangString(0x403f));
snd_playSoundEffect(19, -1);
}
diff --git a/engines/kyra/screen.cpp b/engines/kyra/screen.cpp
index 73a3e675e8..f5570acd72 100644
--- a/engines/kyra/screen.cpp
+++ b/engines/kyra/screen.cpp
@@ -1253,8 +1253,7 @@ void Screen::drawShape(uint8 pageNum, const uint8 *shapeData, int x, int y, int
}
if (flags & 0x200) {
- ++_drawShapeVar1;
- _drawShapeVar1 &= (_vm->gameFlags().gameID == GI_KYRA1) ? 0x7 : 0xF;
+ _drawShapeVar1 = (_drawShapeVar1 + 1) & 0x7;
_drawShapeVar3 = drawShapeVar2[_drawShapeVar1];
_drawShapeVar4 = 0;
_drawShapeVar5 = 256;
diff --git a/engines/kyra/sequences_lok.cpp b/engines/kyra/sequences_lok.cpp
index e6dfd9efe2..26c09bcf43 100644
--- a/engines/kyra/sequences_lok.cpp
+++ b/engines/kyra/sequences_lok.cpp
@@ -1142,6 +1142,11 @@ void KyraEngine_LoK::seq_playEnding() {
_seqPlayerFlag = false;
_screen->showMouse();
+
+ // To avoid any remaining input events, we remove the queue
+ // over here.
+ _eventList.clear();
+
if (_flags.platform == Common::kPlatformAmiga) {
_screen->_charWidth = -2;
_screen->setCurPage(2);
@@ -1362,15 +1367,12 @@ void KyraEngine_LoK::seq_playCreditsAmiga() {
}
int size = 0;
- const uint8 *bufferTmp = _staticres->loadRawData(k1CreditsStrings, size);
- char *buffer = new char[size];
- assert(buffer);
- memcpy(buffer, bufferTmp, size);
+ const char *creditsData = (const char *)_staticres->loadRawData(k1CreditsStrings, size);
char stringBuffer[81];
memset(stringBuffer, 0, sizeof(stringBuffer));
- char *cur = buffer;
+ const char *cur = creditsData;
char *specialString = stringBuffer;
bool fillRectFlag = false, subWidth = false, centerFlag = false;
x = 0;
@@ -1432,9 +1434,7 @@ void KyraEngine_LoK::seq_playCreditsAmiga() {
removeInputTop();
break;
}
- } while (++cur != buffer + size && !shouldQuit());
-
- delete[] buffer;
+ } while (++cur != (creditsData + size) && !shouldQuit());
}
bool KyraEngine_LoK::seq_skipSequence() const {
diff --git a/engines/kyra/sequences_lol.cpp b/engines/kyra/sequences_lol.cpp
index ae23d130ef..c1ceba34e9 100644
--- a/engines/kyra/sequences_lol.cpp
+++ b/engines/kyra/sequences_lol.cpp
@@ -290,7 +290,7 @@ int LoLEngine::chooseCharacter() {
_screen->_curPage = 2;
for (int i = 0; i < 4; ++i)
- _screen->fprintStringIntro(_charPreviews[i].name, _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120);
+ _screen->fprintStringIntro("%s", _charPreviews[i].x + 16, _charPreviews[i].y + 36, 0xC0, 0x00, 0x9C, 0x120, _charPreviews[i].name);
for (int i = 0; i < 4; ++i) {
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 48, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[0]);
@@ -298,9 +298,9 @@ int LoLEngine::chooseCharacter() {
_screen->fprintStringIntro("%d", _charPreviews[i].x + 21, _charPreviews[i].y + 64, 0x98, 0x00, 0x9C, 0x220, _charPreviews[i].attrib[2]);
}
- _screen->fprintStringIntro(_tim->getCTableEntry(51), 36, 173, 0x98, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(53), 36, 181, 0x98, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(55), 36, 189, 0x98, 0x00, 0x9C, 0x20);
+ _screen->fprintStringIntro("%s", 36, 173, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(51));
+ _screen->fprintStringIntro("%s", 36, 181, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(53));
+ _screen->fprintStringIntro("%s", 36, 189, 0x98, 0x00, 0x9C, 0x20, _tim->getCTableEntry(55));
_screen->copyRegion(0, 0, 0, 0, 320, 200, 2, 0, Screen::CR_NO_P_CHECK);
_screen->_curPage = 0;
@@ -363,11 +363,11 @@ void LoLEngine::kingSelectionIntro() {
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
int y = 38;
- _screen->fprintStringIntro(_tim->getCTableEntry(57), 8, y, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(58), 8, y + 10, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(59), 8, y + 20, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(60), 8, y + 30, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(61), 8, y + 40, 0x32, 0x00, 0x9C, 0x20);
+ _screen->fprintStringIntro("%s", 8, y, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(57));
+ _screen->fprintStringIntro("%s", 8, y + 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(58));
+ _screen->fprintStringIntro("%s", 8, y + 20, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(59));
+ _screen->fprintStringIntro("%s", 8, y + 30, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(60));
+ _screen->fprintStringIntro("%s", 8, y + 40, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(61));
_sound->voicePlay("KING01", &_speechHandle);
@@ -405,8 +405,8 @@ void LoLEngine::kingSelectionReminder() {
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
int y = 48;
- _screen->fprintStringIntro(_tim->getCTableEntry(62), 8, y, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(63), 8, y + 10, 0x32, 0x00, 0x9C, 0x20);
+ _screen->fprintStringIntro("%s", 8, y, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(62));
+ _screen->fprintStringIntro("%s", 8, y + 10, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(63));
_sound->voicePlay("KING02", &_speechHandle);
@@ -540,13 +540,13 @@ int LoLEngine::selectionCharInfo(int character) {
static const uint8 charSelectInfoIdx[] = { 0x1D, 0x22, 0x27, 0x2C };
const int idx = charSelectInfoIdx[character];
- _screen->fprintStringIntro(_tim->getCTableEntry(idx+0), 50, 127, 0x53, 0x00, 0xCF, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(idx+1), 50, 137, 0x53, 0x00, 0xCF, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(idx+2), 50, 147, 0x53, 0x00, 0xCF, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(idx+3), 50, 157, 0x53, 0x00, 0xCF, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(idx+4), 50, 167, 0x53, 0x00, 0xCF, 0x20);
+ _screen->fprintStringIntro("%s", 50, 127, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+0));
+ _screen->fprintStringIntro("%s", 50, 137, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+1));
+ _screen->fprintStringIntro("%s", 50, 147, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+2));
+ _screen->fprintStringIntro("%s", 50, 157, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+3));
+ _screen->fprintStringIntro("%s", 50, 167, 0x53, 0x00, 0xCF, 0x20, _tim->getCTableEntry(idx+4));
- _screen->fprintStringIntro(_tim->getCTableEntry(69), 100, 168, 0x32, 0x00, 0xCF, 0x20);
+ _screen->fprintStringIntro("%s", 100, 168, 0x32, 0x00, 0xCF, 0x20, _tim->getCTableEntry(69));
selectionCharInfoIntro(vocFilename);
if (_charSelectionInfoResult == -1) {
@@ -568,11 +568,11 @@ int LoLEngine::selectionCharInfo(int character) {
_screen->copyRegion(48, 127, 48, 160, 272, 35, 4, 0, Screen::CR_NO_P_CHECK);
_screen->copyRegion(0, 0, 0, 0, 112, 120, 4, 0, Screen::CR_NO_P_CHECK);
- _screen->fprintStringIntro(_tim->getCTableEntry(64), 3, 28, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(65), 3, 38, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(66), 3, 48, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(67), 3, 58, 0x32, 0x00, 0x9C, 0x20);
- _screen->fprintStringIntro(_tim->getCTableEntry(68), 3, 68, 0x32, 0x00, 0x9C, 0x20);
+ _screen->fprintStringIntro("%s", 3, 28, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(64));
+ _screen->fprintStringIntro("%s", 3, 38, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(65));
+ _screen->fprintStringIntro("%s", 3, 48, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(66));
+ _screen->fprintStringIntro("%s", 3, 58, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(67));
+ _screen->fprintStringIntro("%s", 3, 68, 0x32, 0x00, 0x9C, 0x20, _tim->getCTableEntry(68));
resetSkipFlag();
kingSelectionOutro();
diff --git a/engines/kyra/sprites_lol.cpp b/engines/kyra/sprites_lol.cpp
index 9877ceebc4..c88286bdc6 100644
--- a/engines/kyra/sprites_lol.cpp
+++ b/engines/kyra/sprites_lol.cpp
@@ -1307,7 +1307,7 @@ bool LoLEngine::chasePartyWithDistanceAttacks(MonsterInPlay *monster) {
if (getMonsterDistance(monster->block, _monsters[i].block) < 7)
setMonsterMode(monster, 7);
}
- _txt->printMessage(2, getLangString(0x401a));
+ _txt->printMessage(2, "%s", getLangString(0x401a));
} else if (flyingObject == 4) {
launchMagicViper();
diff --git a/engines/saga/sndres.cpp b/engines/saga/sndres.cpp
index b2744482bd..eddd35300e 100644
--- a/engines/saga/sndres.cpp
+++ b/engines/saga/sndres.cpp
@@ -192,7 +192,6 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
GameSoundTypes resourceType = kSoundPCM;
byte *data = 0;
int rate = 0, size = 0;
- byte flags = 0;
Common::File* file;
if (resourceId == (uint32)-1) {
@@ -269,21 +268,17 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
}
- // Default sound type is 16-bit PCM (used in ITE)
- buffer.isBigEndian = context->isBigEndian;
- if ((context->fileType & GAME_VOICEFILE) && (_vm->getFeatures() & GF_LE_VOICES))
- buffer.isBigEndian = false;
+ // Default sound type is 16-bit signed PCM, used in ITE by PCM and VOX files
buffer.isCompressed = context->isCompressed;
buffer.soundType = resourceType;
buffer.originalSize = 0;
- buffer.stereo = false;
- buffer.isSigned = true; // default for PCM and VOX
- buffer.frequency = 22050; // default for PCM and VOX
- buffer.sampleBits = 16; // default for PCM and VOX
+ // Set default flags and frequency for PCM, VOC and VOX files, which got no header
+ buffer.flags = Audio::Mixer::FLAG_16BITS;
+ buffer.frequency = 22050;
if (_vm->getGameId() == GID_ITE) {
if (_vm->getFeatures() & GF_8BIT_UNSIGNED_PCM) { // older ITE demos
- buffer.isSigned = false;
- buffer.sampleBits = 8;
+ buffer.flags |= Audio::Mixer::FLAG_UNSIGNED;
+ buffer.flags &= ~Audio::Mixer::FLAG_16BITS;
} else {
// Voice files in newer ITE demo versions are OKI ADPCM (VOX) encoded
if (!scumm_stricmp(context->fileName, "voicesd.rsc"))
@@ -292,6 +287,12 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
}
buffer.buffer = NULL;
+ // Check for LE sounds
+ if (!context->isBigEndian)
+ buffer.flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
+ if ((context->fileType & GAME_VOICEFILE) && (_vm->getFeatures() & GF_LE_VOICES))
+ buffer.flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
+
// Older Mac versions of ITE were Macbinary packed
int soundOffset = (context->fileType & GAME_MACBINARY) ? 36 : 0;
@@ -321,25 +322,23 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
case kSoundShorten:
case kSoundVOC:
if (resourceType == kSoundWAV) {
- result = Audio::loadWAVFromStream(readS, size, rate, flags);
+ result = Audio::loadWAVFromStream(readS, size, rate, buffer.flags);
} else if (resourceType == kSoundAIFF) {
- result = Audio::loadAIFFFromStream(readS, size, rate, flags);
+ result = Audio::loadAIFFFromStream(readS, size, rate, buffer.flags);
+#ifdef ENABLE_SAGA2
+ } else if (resourceType == kSoundShorten) {
+ result = Audio::loadShortenFromStream(readS, size, rate, buffer.flags);
+#endif
} else if (resourceType == kSoundVOC) {
data = Audio::loadVOCFromStream(readS, size, rate);
result = (data != 0);
if (onlyHeader)
free(data);
-#ifdef ENABLE_SAGA2
- } else if (resourceType == kSoundShorten) {
- result = Audio::loadShortenFromStream(readS, size, rate, flags);
-#endif
+ buffer.flags |= Audio::Mixer::FLAG_UNSIGNED;
}
if (result) {
buffer.frequency = rate;
- buffer.sampleBits = (flags & Audio::Mixer::FLAG_16BITS) ? 16 : 8;
- buffer.stereo = flags & Audio::Mixer::FLAG_STEREO;
- buffer.isSigned = (resourceType == kSoundVOC) ? false : !(flags & Audio::Mixer::FLAG_UNSIGNED);
buffer.size = size;
if (!onlyHeader && resourceType != kSoundVOC) {
@@ -360,14 +359,20 @@ bool SndRes::load(ResourceContext *context, uint32 resourceId, SoundBuffer &buff
readS.readByte(); // Skip compression identifier byte
buffer.frequency = readS.readUint16LE();
buffer.originalSize = readS.readUint32LE();
- buffer.sampleBits = readS.readByte();
- buffer.stereo = (readS.readByte() == char(0)) ? false : true;
+ if (readS.readByte() == 8) // read sample bits
+ buffer.flags &= ~Audio::Mixer::FLAG_16BITS;
+ if (readS.readByte() != 0) // read stereo flag
+ buffer.flags |= Audio::Mixer::FLAG_STEREO;
buffer.size = soundResourceLength;
buffer.soundType = resourceType;
- buffer.soundFile = context->getFile(resourceData);
buffer.fileOffset = resourceData->offset + 9; // skip compressed sfx header: byte + uint16 + uint32 + byte + byte
+ if (!onlyHeader) {
+ buffer.buffer = (byte *)malloc(buffer.size);
+ readS.read(buffer.buffer, buffer.size);
+ }
+
result = true;
break;
default:
@@ -403,12 +408,12 @@ int SndRes::getVoiceLength(uint32 resourceId) {
msDouble = (double)buffer.size;
else
msDouble = (double)buffer.originalSize;
- if (buffer.sampleBits == 16) {
+
+ if (buffer.flags & Audio::Mixer::FLAG_16BITS)
msDouble /= 2.0;
- }
- if (buffer.stereo) {
+
+ if (buffer.flags & Audio::Mixer::FLAG_STEREO)
msDouble /= 2.0;
- }
msDouble = msDouble / buffer.frequency * 1000.0;
return (int)msDouble;
diff --git a/engines/saga/sound.cpp b/engines/saga/sound.cpp
index fb7acaca8c..14e5492a48 100644
--- a/engines/saga/sound.cpp
+++ b/engines/saga/sound.cpp
@@ -65,84 +65,45 @@ SndHandle *Sound::getHandle() {
void Sound::playSoundBuffer(Audio::SoundHandle *handle, SoundBuffer &buffer, int volume,
sndHandleType handleType, bool loop) {
- byte flags;
- flags = Audio::Mixer::FLAG_AUTOFREE;
+ buffer.flags |= Audio::Mixer::FLAG_AUTOFREE;
if (loop)
- flags |= Audio::Mixer::FLAG_LOOP;
+ buffer.flags |= Audio::Mixer::FLAG_LOOP;
- if (buffer.sampleBits == 16) {
- flags |= Audio::Mixer::FLAG_16BITS;
-
- if (!buffer.isBigEndian)
- flags |= Audio::Mixer::FLAG_LITTLE_ENDIAN;
- }
- if (buffer.stereo)
- flags |= Audio::Mixer::FLAG_STEREO;
- if (!buffer.isSigned)
- flags |= Audio::Mixer::FLAG_UNSIGNED;
+ Audio::Mixer::SoundType soundType = (handleType == kVoiceHandle) ?
+ Audio::Mixer::kSpeechSoundType : Audio::Mixer::kSFXSoundType;
if (!buffer.isCompressed) {
- if (handleType == kVoiceHandle)
- _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
- else
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
+ _mixer->playRaw(soundType, handle, buffer.buffer,
+ buffer.size, buffer.frequency, buffer.flags, -1, volume);
} else {
- Audio::AudioStream *stream = NULL;
-#if defined(USE_MAD) || defined(USE_VORBIS) || defined(USE_FLAC)
- MemoryReadStream *tmp = NULL;
-#endif
+ Audio::AudioStream *stream = 0;
switch (buffer.soundType) {
#ifdef USE_MAD
case kSoundMP3:
- debug(1, "Playing MP3 compressed sound");
- buffer.soundFile->seek((long)buffer.fileOffset, SEEK_SET);
- tmp = buffer.soundFile->readStream(buffer.size);
- assert(tmp);
- stream = Audio::makeMP3Stream(tmp, true);
+ stream = Audio::makeMP3Stream(new Common::MemoryReadStream(buffer.buffer, buffer.size, true), true);
break;
#endif
#ifdef USE_VORBIS
case kSoundOGG:
- debug(1, "Playing OGG compressed sound");
- buffer.soundFile->seek((long)buffer.fileOffset, SEEK_SET);
- tmp = buffer.soundFile->readStream(buffer.size);
- assert(tmp);
- stream = Audio::makeVorbisStream(tmp, true);
+ stream = Audio::makeVorbisStream(new Common::MemoryReadStream(buffer.buffer, buffer.size, true), true);
break;
#endif
#ifdef USE_FLAC
case kSoundFLAC:
- debug(1, "Playing FLAC compressed sound");
- buffer.soundFile->seek((long)buffer.fileOffset, SEEK_SET);
- tmp = buffer.soundFile->readStream(buffer.size);
- assert(tmp);
- stream = Audio::makeFlacStream(tmp, true);
+ stream = Audio::makeFlacStream(new Common::MemoryReadStream(buffer.buffer, buffer.size, true), true);
break;
#endif
default:
- // No compression, play it as raw sound
- if (handleType == kVoiceHandle)
- _mixer->playRaw(Audio::Mixer::kSpeechSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
- else
- _mixer->playRaw(Audio::Mixer::kSFXSoundType, handle, buffer.buffer,
- buffer.size, buffer.frequency, flags, -1, volume);
+ // Unknown compression, ignore sample
+ warning("Unknown compression, ignoring sound");
break;
}
- if (stream != NULL) {
- if (handleType == kVoiceHandle)
- _mixer->playInputStream(Audio::Mixer::kSpeechSoundType, handle, stream, -1,
- volume, 0, true, false);
- else
- _mixer->playInputStream(Audio::Mixer::kSFXSoundType, handle, stream, -1,
- volume, 0, true, false);
- }
+ if (stream != NULL)
+ _mixer->playInputStream(soundType, handle, stream, -1, volume, 0, true, false);
}
}
diff --git a/engines/saga/sound.h b/engines/saga/sound.h
index b61cbbbe90..0aeb54a55f 100644
--- a/engines/saga/sound.h
+++ b/engines/saga/sound.h
@@ -44,17 +44,13 @@ enum SOUND_FLAGS {
struct SoundBuffer {
uint16 frequency;
- int sampleBits;
- bool stereo;
- bool isSigned;
bool isCompressed;
+ byte flags;
byte *buffer;
size_t size;
size_t originalSize;
- bool isBigEndian;
GameSoundTypes soundType;
- Common::File *soundFile;
size_t fileOffset;
};
diff --git a/engines/sci/console.cpp b/engines/sci/console.cpp
index 35ca688233..7b329864ce 100644
--- a/engines/sci/console.cpp
+++ b/engines/sci/console.cpp
@@ -889,10 +889,11 @@ bool Console::cmdRestartGame(int argc, const char **argv) {
bool Console::cmdClassTable(int argc, const char **argv) {
DebugPrintf("Available classes:\n");
- for (uint i = 0; i < _vm->_gamestate->_classtable.size(); i++) {
- if (_vm->_gamestate->_classtable[i].reg.segment) {
+ for (uint i = 0; i < _vm->_gamestate->seg_manager->_classtable.size(); i++) {
+ if (_vm->_gamestate->seg_manager->_classtable[i].reg.segment) {
DebugPrintf(" Class 0x%x at %04x:%04x (script 0x%x)\n", i,
- PRINT_REG(_vm->_gamestate->_classtable[i].reg), _vm->_gamestate->_classtable[i].script);
+ PRINT_REG(_vm->_gamestate->seg_manager->_classtable[i].reg),
+ _vm->_gamestate->seg_manager->_classtable[i].script);
}
}
@@ -1394,10 +1395,11 @@ bool Console::segmentInfo(int nr) {
for (uint i = 0; i < scr->_objects.size(); i++) {
DebugPrintf(" ");
// Object header
- Object *obj = obj_get(_vm->_gamestate, scr->_objects[i].pos);
+ Object *obj = obj_get(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, scr->_objects[i].pos);
if (obj)
DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(scr->_objects[i].pos),
- obj_get_name(_vm->_gamestate, scr->_objects[i].pos), obj->_variables.size(), obj->methods_nr);
+ obj_get_name(_vm->_gamestate->seg_manager, _vm->_gamestate->_version,
+ scr->_objects[i].pos), obj->_variables.size(), obj->methods_nr);
}
}
break;
@@ -1438,12 +1440,13 @@ bool Console::segmentInfo(int nr) {
reg_t objpos;
objpos.offset = i;
objpos.segment = nr;
- DebugPrintf(" [%04x] %s; copy of ", i, obj_get_name(_vm->_gamestate, objpos));
+ DebugPrintf(" [%04x] %s; copy of ", i, obj_get_name(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, objpos));
// Object header
- Object *obj = obj_get(_vm->_gamestate, ct->_table[i].pos);
+ Object *obj = obj_get(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, ct->_table[i].pos);
if (obj)
DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(ct->_table[i].pos),
- obj_get_name(_vm->_gamestate, ct->_table[i].pos), obj->_variables.size(), obj->methods_nr);
+ obj_get_name(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, ct->_table[i].pos),
+ obj->_variables.size(), obj->methods_nr);
}
}
break;
@@ -2045,7 +2048,7 @@ bool Console::cmdBacktrace(int argc, const char **argv) {
for (iter = _vm->_gamestate->_executionStack.begin();
iter != _vm->_gamestate->_executionStack.end(); ++iter, ++i) {
ExecStack &call = *iter;
- const char *objname = obj_get_name(_vm->_gamestate, call.sendp);
+ const char *objname = obj_get_name(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, call.sendp);
int paramc, totalparamc;
switch (call.type) {
@@ -2187,7 +2190,7 @@ bool Console::cmdDissassemble(int argc, const char **argv) {
return true;
}
- Object *obj = obj_get(_vm->_gamestate, objAddr);
+ Object *obj = obj_get(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, objAddr);
int selector_id = _vm->getKernel()->findSelector(argv[2]);
reg_t addr;
@@ -2295,7 +2298,7 @@ bool Console::cmdSend(int argc, const char **argv) {
return true;
}
- o = obj_get(_vm->_gamestate, object);
+ o = obj_get(_vm->_gamestate->seg_manager, _vm->_gamestate->_version, object);
if (o == NULL) {
DebugPrintf("Address \"%04x:%04x\" is not an object\n", PRINT_REG(object));
return true;
@@ -2900,7 +2903,7 @@ int parse_reg_t(EngineState *s, const char *str, reg_t *dest) { // Returns 0 on
}
if (valid) {
- const char *objname = obj_get_name(s, objpos);
+ const char *objname = obj_get_name(s->seg_manager, s->_version, objpos);
if (!strcmp(objname, str_objname)) {
// Found a match!
if ((index < 0) && (times_found > 0)) {
@@ -3042,9 +3045,10 @@ int Console::printNode(reg_t addr) {
int Console::printObject(reg_t pos) {
EngineState *s = _vm->_gamestate; // for the several defines in this function
- Object *obj = obj_get(s, pos);
+ Object *obj = obj_get(s->seg_manager, s->_version, pos);
Object *var_container = obj;
int i;
+ SciVersion version = s->_version; // for the selector defines
if (!obj) {
DebugPrintf("[%04x:%04x]: Not an object.", PRINT_REG(pos));
@@ -3052,11 +3056,11 @@ int Console::printObject(reg_t pos) {
}
// Object header
- DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(pos), obj_get_name(s, pos),
+ DebugPrintf("[%04x:%04x] %s : %3d vars, %3d methods\n", PRINT_REG(pos), obj_get_name(s->seg_manager, s->_version, pos),
obj->_variables.size(), obj->methods_nr);
if (!(obj->_variables[SCRIPT_INFO_SELECTOR].offset & SCRIPT_INFO_CLASS))
- var_container = obj_get(s, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
+ var_container = obj_get(s->seg_manager, s->_version, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
DebugPrintf(" -- member variables:\n");
for (i = 0; (uint)i < obj->_variables.size(); i++) {
printf(" ");
@@ -3068,9 +3072,9 @@ int Console::printObject(reg_t pos) {
reg_t val = obj->_variables[i];
DebugPrintf("%04x:%04x", PRINT_REG(val));
- Object *ref = obj_get(s, val);
+ Object *ref = obj_get(s->seg_manager, s->_version, val);
if (ref)
- DebugPrintf(" (%s)", obj_get_name(s, val));
+ DebugPrintf(" (%s)", obj_get_name(s->seg_manager, s->_version, val));
DebugPrintf("\n");
}
diff --git a/engines/sci/console.h b/engines/sci/console.h
index 8d1299dd1e..032a2ff865 100644
--- a/engines/sci/console.h
+++ b/engines/sci/console.h
@@ -29,6 +29,7 @@
#define SCI_CONSOLE_H
#include "gui/debugger.h"
+#include "sci/engine/vm.h"
namespace Sci {
diff --git a/engines/sci/debug.h b/engines/sci/debug.h
index a3c4fab372..e3bca1f0c1 100644
--- a/engines/sci/debug.h
+++ b/engines/sci/debug.h
@@ -26,6 +26,9 @@
#ifndef SCI_DEBUG_H
#define SCI_DEBUG_H
+#include "sci/engine/vm_types.h" // for StackPtr
+#include "sci/engine/vm.h" // for ExecStack
+
namespace Sci {
enum DebugSeeking {
diff --git a/engines/sci/detection.cpp b/engines/sci/detection.cpp
index 7f9190444d..88bd0d63c3 100644
--- a/engines/sci/detection.cpp
+++ b/engines/sci/detection.cpp
@@ -28,6 +28,7 @@
#include "sci/sci.h"
#include "sci/exereader.h"
+#include "sci/engine/seg_manager.h"
namespace Sci {
@@ -102,18 +103,15 @@ static const PlainGameDescriptor SciGameTitles[] = {
{0, 0}
};
-#define FANMADE_LV(name, resMapMd5, resMapSize, resMd5, resSize, lang, ver) \
+#define FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, lang) \
{{"sci-fanmade", name, { \
{"resource.map", 0, resMapMd5, resMapSize}, \
{"resource.001", 0, resMd5, resSize}, \
{NULL, 0, NULL, 0}}, lang, Common::kPlatformPC, 0, GUIO_NOSPEECH}, \
- 0, \
- ver \
+ 0 \
}
-#define FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, lang) FANMADE_LV(name, resMapMd5, resMapSize, resMd5, resSize, lang, SCI_VERSION_0)
-#define FANMADE_V(name, resMapMd5, resMapSize, resMd5, resSize, ver) FANMADE_LV(name, resMapMd5, resMapSize, resMd5, resSize, Common::EN_ANY, ver)
-#define FANMADE(name, resMapMd5, resMapSize, resMd5, resSize) FANMADE_LV(name, resMapMd5, resMapSize, resMd5, resSize, Common::EN_ANY, SCI_VERSION_0)
+#define FANMADE(name, resMapMd5, resMapSize, resMd5, resSize) FANMADE_L(name, resMapMd5, resMapSize, resMd5, resSize, Common::EN_ANY)
using Common::GUIO_NONE;
using Common::GUIO_NOSPEECH;
@@ -126,8 +124,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f3d1be7752d30ba60614533d531e2e98", 474},
{"resource.001", 0, "6fd05926c2199af0af6f72f90d0d7260", 126895},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Castle of Dr. Brain - English Amiga (from www.back2roots.org)
@@ -140,8 +137,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "d226d7d3b4f77c4a566913fc310487fc", 792380},
{"resource.003", 0, "d226d7d3b4f77c4a566913fc310487fc", 464348},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Castle of Dr. Brain - German Amiga (from www.back2roots.org)
@@ -154,8 +150,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "85e51acb5f9c539d66e3c8fe40e17da5", 826309},
{"resource.003", 0, "85e51acb5f9c539d66e3c8fe40e17da5", 493638},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Castle of Dr. Brain - English DOS Non-Interactive Demo
@@ -165,8 +160,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "9780f040d58182994e22d2e34fab85b0", 67367},
{"resource.001", 0, "2af49dbd8f2e1db4ab09f9310dc91259", 570553},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Castle of Dr. Brain - English DOS Floppy (from jvprat)
@@ -178,8 +172,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "d2f5a1be74ed963fa849a76892be5290", 794832},
{"resource.002", 0, "c0c29c51af66d65cb53f49e785a2d978", 1280907},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Castle of Dr. Brain - English DOS Floppy 1.1
@@ -189,8 +182,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "13e81e1839cd7b216d2bb5615c1ca160", 796776},
{"resource.002", 0, "930e416bec196b9703a331d81b3d66f2", 1283812},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Castle of Dr. Brain - Spanish DOS
@@ -200,8 +192,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "27ec5fa09cd12a7fd16e86d96a2ed245", 1197694},
{"resource.001", 0, "735be4e58957180cfc807d5e18fdffcd", 1433302},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Christmas Card 1988 - English DOS
@@ -210,8 +201,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "39485580d34a72997f3d5b3aba4d24f1", 426},
{"resource.001", 0, "11391434f41c834090d7a1e9488ce936", 129739},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Christmas Card 1990: The Seasoned Professional - English DOS (16 Colors)
@@ -220,8 +210,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8f656714a05b94423ac6eb10ee8797d0", 600},
{"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 272629},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Christmas Card 1990: The Seasoned Professional - English DOS (256 Colors)
@@ -230,8 +219,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "44b8f45b841b9b5e17e939a35e443988", 600},
{"resource.001", 0, "acde93e58fca4f7a2a5a220558a94aa8", 335362},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Christmas Card 1992 - English DOS
@@ -240,8 +228,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f1f8c8a8443f523422af70b4ec85b71c", 318},
{"resource.000", 0, "62fb9256f8e7e6e65a6875efdb7939ac", 203396},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Codename: Iceman - English Amiga (from www.back2roots.org)
@@ -256,8 +243,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 713382},
{"resource.005", 0, "605b67a9ef199a9bb015745e7c004cf4", 478384},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Codename: Iceman - English DOS Non-Interactive Demo
@@ -266,8 +252,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "782974f29d8a824782d2d4aea39964e3", 1056},
{"resource.001", 0, "d4b75e280d1c3a97cfef1b0bebff387c", 573647},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Codename: Iceman - English DOS (from jvprat)
@@ -281,8 +266,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "d97a96f1ab91b41cf46a02cc89b0a04e", 624303},
{"resource.004", 0, "8613c45fc771d658e5a505b9a4a54f31", 670883},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Codename: Iceman - English DOS (from FRG)
@@ -295,8 +279,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "dc7c5280e7acfaffe6ef2a6c963c5f94", 622118},
{"resource.004", 0, "64f342463f6f35ba71b3509ef696ae3f", 669188},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Conquests of Camelot - English Amiga (from www.back2roots.org)
@@ -312,8 +295,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "c6e551bdc24f0acc193159038d4ca767", 605882},
{"resource.006", 0, "8f880a536908ab496bbc552f7f5c3738", 585255},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Conquests of Camelot - English DOS Non-Interactive Demo
@@ -322,8 +304,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "f4cd75c15be75e04cdca3acda2c0b0ea", 468},
{"resource.001", 0, "4930708722f34bfbaa4945fb08f55f61", 232523},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Conquests of Camelot - English DOS (from jvprat)
@@ -336,8 +317,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "8e1a3a8c588007404b532b8dfacc1460", 723712},
{"resource.004", 0, "8e1a3a8c588007404b532b8dfacc1460", 729143},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Conquests of Camelot - English DOS
@@ -352,8 +332,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "8e1a3a8c588007404b532b8dfacc1460", 332446},
{"resource.007", 0, "8e1a3a8c588007404b532b8dfacc1460", 358182},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Conquests of the Longbow - English Amiga (from www.back2roots.org)
@@ -369,8 +348,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "1c3804e56b114028c5873a35c2f06d13", 653002},
{"resource.006", 0, "f9487732289a4f4966b4e34eea413325", 842817},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Conquests of the Longbow - English DOS
@@ -385,8 +363,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1154950},
{"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1042966},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Conquests of the Longbow - English DOS Floppy (from jvprat)
@@ -401,8 +378,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1261462},
{"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284720},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Conquests of the Longbow - English DOS
@@ -416,8 +392,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9cfce07e204a329e94fda8b5657621da", 1260237},
{"resource.005", 0, "21ebe6b39b57a73fc449f67f013765aa", 1284609},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Conquests of the Longbow EGA - English DOS
@@ -433,7 +408,6 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "8c767b3939add63d11274065e46aad04", 713158},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
0,
- SCI_VERSION_1
},
// Conquests of the Longbow - English DOS Non-Interactive Demo
@@ -442,8 +416,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "cbc5cb73341de1bff1b1e20a640af220", 588},
{"resource.001", 0, "f05a20cc07eee85da8e999d0ac0f596b", 869916},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Conquests of the Longbow - German DOS (suplied by markcoolio in bug report #2727681)
@@ -458,8 +431,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "d036df0872f2db19bca34601276be2d7", 1176914},
{"resource.006", 0, "b367a6a59f29ee30dde1d88a5a41152d", 1123585},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Eco Quest - English DOS Non-Interactive Demo (from FRG)
@@ -469,8 +441,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "c819e171359b7c95f4c13b846d5c034e", 873},
{"resource.001", 0, "baf9393a9bfa73098adb501e5bc5487b", 657518},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Eco Quest - English DOS CD 1.1
@@ -479,8 +450,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a4b73d5d2b55bdb6e44345e99c8fbdd0", 4804},
{"resource.000", 0, "d908dbef56816ac6c60dd145fdeafb2b", 3536046},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Eco Quest - English DOS Floppy
@@ -492,8 +462,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "28fe9b4f0567e71feb198bc9f3a2c605", 1241816},
{"resource.003", 0, "f3146df0ad4297f5ce35aa8c4753bf6c", 586832},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Eco Quest - English DOS Floppy
@@ -505,8 +474,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "323b3b12f43d53f27d259beb225f0aa7", 1129316},
{"resource.003", 0, "83ac03e4bddb2c1ac2d36d2a587d0536", 1145616},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Eco Quest - German DOS Floppy (supplied by markcoolio in bug report #2723744)
@@ -518,8 +486,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "02d7d0411f7903aacb3bc8b0f8ca8a9a", 1202581},
{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1175835},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Eco Quest - Spanish DOS Floppy (from jvprat)
@@ -532,8 +499,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "2d21a1d2dcbffa551552e3e0725d2284", 1186033},
{"resource.003", 0, "84dd11b6825255671c703aee5ceff620", 1174993},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Eco Quest - French DOS Floppy (from Strangerke)
@@ -545,8 +511,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "b836c6ee9de67d814ac5d1b05f5b9858", 1173872},
{"resource.003", 0, "f8f767f9d6351432621c6e54c1b2ba8c", 1141520},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Eco Quest 2 - English DOS Non-Interactive Demo
@@ -555,8 +520,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "607cfa0d8a03b7d348c06ee727e3d939", 1321},
{"resource.000", 0, "dd6f614c43c029f063e93cd243af90a4", 525992},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Eco Quest 2 - English DOS Floppy (supplied by markcoolio in bug report #2723761)
@@ -565,8 +529,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "28fb7b6abb9fc1cb8882d7c2e701b63f", 5658},
{"resource.000", 0, "cc1d17e5637528dbe4a812699e1cbfc6", 4208192},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Eco Quest 2 - French DOS Floppy (from Strangerke)
@@ -575,8 +538,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "c22ab8b33c339c138b6b1697b77b9e79", 5588},
{"resource.000", 0, "1c4093f7248240329121fdf8c0d59152", 4231946},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - English DOS demo (from FRG)
@@ -585,8 +547,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "97aa9fcfe84c9993a64debd28c32393a", 1909},
{"resource.000", 0, "5ea8e7a3ea10cce6efd5c106dc62fd8c", 867724},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - English CD (from FRG)
@@ -595,8 +556,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d46b282f228a67ba13bd4b4009e95f8f", 6058},
{"resource.000", 0, "ee3c64ffff0ba9fb08bea2624631c598", 5490246},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - English DOS Floppy (updated information from markcoolio in bug reports #2723773 and #2724720)
@@ -607,8 +567,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230},
{"resource.msg", 0, "554f65315d851184f6e38211489fdd8f", -1},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - German DOS Floppy (from Tobis87, updated information from markcoolio in bug reports #2723772 and #2724720)
@@ -619,8 +578,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230},
{"resource.msg", 0, "304b5a5781800affd2235152a5794fa8", -1},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - Spanish DOS (from jvprat)
@@ -634,8 +592,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "05acdc256c742e79c50b9fe7ec2cc898", 863310},
{"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - Spanish DOS (from jvprat)
@@ -646,8 +603,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "96b07e9b914dba1c8dc6c78a176326df", 5233230},
{"resource.msg", 0, "45b5bf74933ac3727e4cc844446dc052", 796156},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Freddy Pharkas - English DOS CD Demo
@@ -656,8 +612,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a62a7eae85dd1e6b07f39662b278437e", 1918},
{"resource.000", 0, "4962a3c4dd44e36e78ea4a7a374c2220", 957382},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Fun Seeker's Guide - English DOS
@@ -666,8 +621,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7ee6859ef74314f6d91938c3595348a9", 282},
{"resource.001", 0, "f1e680095424e31f7fae1255d36bacba", 40692},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Gabriel Knight - English DOS CD Demo
@@ -676,8 +630,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "39645952ae0ed8072c7e838f31b75464", 2490},
{"resource.000", 0, "eb3ed7477ca4110813fe1fcf35928561", 1718450},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -687,8 +640,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight - English DOS Floppy (supplied my markcoolio in bug report #2723777)
@@ -697,8 +649,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "65e8c14092e4c9b3b3538b7602c8c5ec", 10783},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 13022630},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight - German DOS Floppy (supplied my markcoolio in bug report #2723775)
@@ -707,8 +658,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ad6508b0296b25c07b1f58828dc33696", 10789},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13077029},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight - English DOS CD (from jvprat)
@@ -717,8 +667,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "372d059f75856afa6d73dd84cbb8913d", 10996},
{"resource.000", 0, "69b7516962510f780d38519cc15fcc7c", 12581736},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight - German DOS CD (from Tobis87)
@@ -727,8 +676,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a7d3e55114c65647310373cb390815ba", 11392},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13400497},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight - Spanish DOS CD (from jvprat)
@@ -737,8 +685,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7cb6e9bba15b544ec7a635c45bde9953", 11404},
{"resource.000", 0, "091cf08910780feabc56f8551b09cb36", 13381599},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight 2 - English Windows Non-Interactive Demo
@@ -747,8 +694,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e0effce11c4908f4b91838741716c83d", 1351},
{"resource.000", 0, "d04cfc7f04b6f74d13025378be49ec2b", 4640330},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Gabriel Knight 2 - English DOS (from jvprat)
// Executable scanning reports "2.100.002", VERSION file reports "1.1"
@@ -766,8 +712,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.006", 0, "ce9359037277b7d7976da185c2fa0aad", 2977},
{"ressci.006", 0, "8e44e03890205a7be12f45aaba9644b4", 60659424},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -779,8 +724,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 342309},
{"resource.003", 0, "e0dd44069a62a463fd124974b915f10d", 328912},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Hoyle 1 - English DOS (supplied by merkur in bug report #2719227)
@@ -789,8 +733,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1034a218943d12f1f36e753fa10c95b8", 4386},
{"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 518308},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
#if 0 // TODO: unknown if these files are corrupt
@@ -801,8 +744,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "e0dd44069a62a463fd124974b915f10d", 218755},
{"resource.002", 0, "e0dd44069a62a463fd124974b915f10d", 439502},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
#endif
@@ -813,8 +755,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 98138},
{"resource.002", 0, "8f2dd70abe01112eca464cda818b5eb6", 196631},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Hoyle 2 - English Amiga (from www.back2roots.org)
@@ -824,8 +765,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "62ed48d20c580e5a98f102f7cd93706a", 1356},
{"resource.001", 0, "8f2dd70abe01112eca464cda818b5eb6", 222704},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
#if 0 // TODO: unknown if these files are corrupt
@@ -837,8 +777,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "595b6039ea1356e7f96a52c58eedcf22", 355791},
{"resource.001", 0, "143df8aef214a2db34c2d48190742012", 632273},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
#endif
@@ -849,8 +788,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0d06cacc87dc21a08cd017e73036f905", 735},
{"resource.001", 0, "24db2bccda0a3c43ac4a7b5edb116c7e", 797678},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Hoyle 3 - English DOS Floppy (from jvprat)
@@ -861,8 +799,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "6ef28cac094dcd97fdb461662ead6f92", 541845},
{"resource.001", 0, "0a98a268ee99b92c233a0d7187c1f0fa", 845795},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Hoyle 4 - English DOS Demo
@@ -871,8 +808,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "662087cb383e52e3cc4ae7ecb10e20aa", 938},
{"resource.000", 0, "24c10844792c54d476d272213cbac300", 675252},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
#if 0
@@ -883,8 +819,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "bac3ec6cb3e3920984ab0f32becf5163", 313476},
{"resource.002", 0, "b86daa3ba2784d1502da881eedb80d9b", 719747},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
#endif
@@ -898,8 +833,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "9ae2a13708d691cd42f9129173c4b39d", 763224},
{"resource.004", 0, "9ae2a13708d691cd42f9129173c4b39d", 820443},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// King's Quest 1 SCI Remake - English DOS Non-Interactive Demo
@@ -908,8 +842,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "59b13619078bd47011421468959ee5d4", 954},
{"resource.001", 0, "4cfb9040db152868f7cb6a1e8151c910", 296555},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// King's Quest 1 SCI Remake - English DOS (from the King's Quest Collection)
@@ -921,8 +854,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "fed9e0072ffd511d248674e60dee2099", 714062},
{"resource.003", 0, "fed9e0072ffd511d248674e60dee2099", 717478},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// King's Quest 4 - English Amiga (from www.back2roots.org)
@@ -936,8 +868,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "fd16c9c223f7dc5b65f06447615224ff", 683016},
{"resource.004", 0, "3fac034c7d130e055d05bc43a1f8d5f8", 549993},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// King's Quest 4 - English DOS Non-Interactive Demo
@@ -946,8 +877,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "992ac7cc31d3717fe53818a9bb6d1dae", 594},
{"resource.001", 0, "143e1c14f15ad0fbfc714f648a65f661", 205330},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// King's Quest 4 - English DOS (from the King's Quest Collection)
@@ -960,8 +890,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "77615c595388acf3d1df8e107bfb6b52", 707591},
{"resource.004", 0, "77615c595388acf3d1df8e107bfb6b52", 479562},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// King's Quest 4 - English DOS
@@ -976,8 +905,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "851a62d00972dc4002f472cc0d84e71d", 333777},
{"resource.007", 0, "851a62d00972dc4002f472cc0d84e71d", 341038},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// King's Quest 4 - English DOS
@@ -992,8 +920,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "0c8566848a76eea19a6d6220914030a7", 337288},
{"resource.007", 0, "0c8566848a76eea19a6d6220914030a7", 343882},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// King's Quest 5 - English Amiga (from www.back2roots.org)
@@ -1010,8 +937,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "26c0c25399b6715fec03fc3e12544fe3", 823048},
{"resource.007", 0, "b914b5901e786327213e779725d30dd1", 778772},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - German Amiga
@@ -1028,8 +954,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "56546b20db11a4836f900efa6d3a3e74", 672099},
{"resource.007", 0, "56546b20db11a4836f900efa6d3a3e74", 794194},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - Italian Amiga
@@ -1046,8 +971,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "11cb750f5f816445ad0f4b9f50a4f59a", 672527},
{"resource.007", 0, "11cb750f5f816445ad0f4b9f50a4f59a", 794259},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - English DOS CD (from the King's Quest Collection)
@@ -1058,8 +982,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "449471bfd77be52f18a3773c7f7d843d", 571368},
{"resource.001", 0, "b45a581ff8751e052c7e364f58d3617f", 16800210},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - English DOS Floppy
@@ -1075,8 +998,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "672ede1136e9e401658538e51bd5dc22", 1172619},
{"resource.007", 0, "2f48faf27666b58c276dda20f91f4a93", 1240456},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - German DOS Floppy (supplied by markcoolio in bug report #2727101)
@@ -1092,8 +1014,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "d1a75fdc01840664d00366cff6919366", 1208972},
{"resource.007", 0, "c07494f0cce7c05210893938786a955b", 1337361},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - French DOS Floppy (from the King's Quest Collector's Edition 1994)
@@ -1110,8 +1031,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f7dc85307632ef657ceb1651204f6f51", 1210081},
{"resource.007", 0, "7db4d0a1d8d547c0019cb7d2a6acbdd4", 1338473},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - Italian DOS Floppy (from glorifindel)
@@ -1127,8 +1047,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "8eeabd92af71e766e323db2100879102", 1209325},
{"resource.007", 0, "dc10c107e0923b902326a040b9c166b9", 1337859},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 5 - Polish DOS Floppy (supplied by jacek909 in bug report #2725722)
@@ -1144,8 +1063,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "da82e4beb744731d0a151f1d4922fafa", 1170456},
{"resource.007", 0, "431def14ca29cdb5e6a5e84d3f38f679", 1240176},
{NULL, 0, NULL, 0}}, Common::PL_POL, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// King's Quest 6 - English DOS Non-Interactive Demo
@@ -1156,8 +1074,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "535b1b920441ec73f42eaa4ccfd47b89", 264116},
{"resource.msg", 0, "54d1fdc936f98c81f9e4c19e04fb1510", 8260},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// King's Quest 6 - English DOS Floppy
@@ -1167,8 +1084,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324},
{"resource.msg", 0, "3cf5de44de36191f109d425b8450efc8", 258590},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// King's Quest 6 - German DOS Floppy (supplied by markcoolio in bug report #2727156)
@@ -1178,8 +1094,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "f2b7f753992c56a0c7a08d6a5077c895", 7863324},
{"resource.msg", 0, "756297b2155db9e43f621c6f6fb763c3", 282822},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// King's Quest 6 - English Windows CD (from the King's Quest Collection)
@@ -1189,8 +1104,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "7a550ebfeae2575ca00d47703a6a774c", 9215},
{"resource.000", 0, "233394a5f33b475ae5975e7e9a420865", 8376352},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// King's Quest 6 - Spanish DOS CD (from jvprat)
@@ -1201,8 +1115,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4da3ad5868a775549a7cc4f72770a58e", 8537260},
{"resource.msg", 0, "41eed2d3893e1ca6c3695deba4e9d2e8", 267102},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -1212,8 +1125,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2be9ab94429c721af8e05c507e048a15", 18697},
{"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 203882535},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// King's Quest 7 - English DOS (from FRG)
@@ -1222,8 +1134,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8676b0fbbd7362989a029fe72fea14c6", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// King's Quest 7 - German Windows (supplied by markcoolio in bug report #2727402)
@@ -1232,8 +1143,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "838b9ff132bd6962026fee832e8a7ddb", 18697},
{"resource.000", 0, "eb63ea3a2c2469dc2d777d351c626404", 206626576},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// King's Quest 7 - Spanish DOS (from jvprat)
@@ -1242,8 +1152,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0b62693cbe87e3aaca3e8655a437f27f", 18709},
{"resource.000", 0, "51c1ead1163e19a2de8f121c39df7a76", 200764100},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// King's Quest 7 - English DOS Non-Interactive Demo
@@ -1252,8 +1161,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "b44f774108d63faa1d021101221c5a54", 1690},
{"resource.000", 0, "d9659d2cf0c269c6a9dc776707f5bea0", 2433827},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -1269,8 +1177,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "aa553977f7e5804081de293800d3bcce", 695067},
{"resource.005", 0, "bfd870d51dc97729f0914095f58e6957", 676881},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Laura Bow - English Atari ST (from jvprat)
@@ -1283,8 +1190,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667365},
{"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683737},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAtariST, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Laura Bow - English DOS Non-Interactive Demo
@@ -1293,8 +1199,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e625726268ff4e123ada11f31f0249f3", 768},
{"resource.001", 0, "0c8912290af0890f8d95faeb4ddb2d68", 333031},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Laura Bow - English DOS 3.5" Floppy (from "The Roberta Williams Anthology"/1996)
@@ -1306,8 +1211,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 667468},
{"resource.004", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 683807},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Laura Bow - English DOS (from FRG)
@@ -1322,8 +1226,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390},
{"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Laura Bow - German DOS (from Tobis87)
@@ -1338,8 +1241,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 328390},
{"resource.007", 0, "e45c888d9c7c04aec0a20e9f820b79ff", 317687},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Laura Bow 2 - English DOS Non-Interactive Demo (from FRG)
@@ -1349,8 +1251,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "24dffc5db1d88c7999f13e8767ed7346", 855},
{"resource.000", 0, "2b2b1b4f7584f9b38fd13f6ab95634d1", 781912},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Laura Bow 2 - English DOS Floppy
@@ -1360,8 +1261,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "610bfd9a852004222f0faaf5fc9e630a", 6489},
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5035964},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Laura Bow 2 - English DOS CD (from "The Roberta Williams Antology"/1996)
@@ -1371,8 +1271,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a70945e61ba7ac7bfea6b7bd72c6aec5", 7274},
{"resource.000", 0, "82578b8d5a7e09c4c58891ca49fae35b", 5598672},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Laura Bow 2 v1.1 - German DOS Floppy (from Tobis87, updated info from markcoolio in bug report #2723787, updated info from #2797962))
@@ -1382,8 +1281,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766},
{"resource.msg", 0, "795c928cd00dfec9fbc62ebcd12e1f65", 303185},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Laura Bow 2 - Spanish DOS CD (from jvprat)
@@ -1393,8 +1291,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "57084910bc923bff5d6d9bc1b56e9604", 5028766},
{"resource.msg", 0, "71f1f0cd9f082da2e750c793a8ed9d84", 286141},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Larry 1 EGA Remake - English DOS (from spookypeanut)
@@ -1406,8 +1303,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "24c958bc922b07f91e25e8c93aa01fcf", 491230},
{"resource.003", 0, "685cd6c1e05a695ab1e0db826337ee2a", 553279},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 1 VGA Remake - English Amiga (from www.back2roots.org)
@@ -1420,8 +1316,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "5790ac0505f7ca98d4567132b875eb1e", 681041},
{"resource.003", 0, "4a34c3367c2fe7eb380d741374da1989", 572251},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 1 VGA Remake - English DOS (from spookypeanut)
@@ -1432,8 +1327,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "ec20246209d7b19f38989261e5c8f5b8", 1111226},
{"resource.002", 0, "85d6935ef77e6b0e16bc307640a0d913", 1088312},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 1 VGA Remake - English DOS (from FRG)
@@ -1444,8 +1338,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "d34cadb11e1aefbb497cf91bc1d3baa7", 1114688},
{"resource.002", 0, "85b030bb66d5342b0a068f1208c431a8", 1078443},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 1 VGA Remake - English DOS Non-Interactive Demo
@@ -1454,8 +1347,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "434e1f6c39d71647b34f0ee57b2bbd68", 444},
{"resource.001", 0, "0c0768215c562d9dace4a5ca53696cf3", 359913},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 1 VGA Remake - Spanish DOS (from the Leisure Suit Larry Collection)
@@ -1469,8 +1361,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "3fe2a3aec0ed53c7d6db1845a67e3aa2", 1095908},
{"resource.003", 0, "ac175df0ea9a2cba57f0248651856d27", 376556},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 1 VGA Remake - Russian DOS
@@ -1482,8 +1373,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "bc8ca10c807515d959cbd91f9ba47735", 1123759},
{"resource.002", 0, "b7409ab32bc3bee2d6cce887cd33f2b6", 1092160},
{NULL, 0, NULL, 0}}, Common::RU_RUS, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 2 - English Amiga (from www.back2roots.org)
@@ -1496,8 +1386,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "a0d4a625311d307257da7fc43d00459d", 570356},
{"resource.004", 0, "a0d4a625311d307257da7fc43d00459d", 717844},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 2 - English DOS Non-Interactive Demo
@@ -1507,8 +1396,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "03dba704bb77da55a91ad27b5a3cac09", 528},
{"resource.001", 0, "9f5520f0297206928df0b0b36493cd33", 127532},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 2 - English DOS
@@ -1522,8 +1410,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "4a24443a25e2b1492462a52809605dc2", 277732},
{"resource.006", 0, "4a24443a25e2b1492462a52809605dc2", 345683},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 2 - English DOS
@@ -1537,8 +1424,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "96033f57accfca903750413fd09193c8", 274953},
{"resource.006", 0, "96033f57accfca903750413fd09193c8", 345818},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 3 - English Amiga (from www.back2roots.org)
@@ -1553,8 +1439,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "f408e59cbee1457f042e5773b8c53951", 651634},
{"resource.005", 0, "433911eb764089d493aed1f958a5615a", 524259},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Larry 3 - English DOS
@@ -1566,8 +1451,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "f18441027154292836b973c655fa3175", 506807},
{"resource.004", 0, "f18441027154292836b973c655fa3175", 513651},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 3 - English DOS
@@ -1582,8 +1466,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "f18441027154292836b973c655fa3175", 282465},
{"resource.007", 0, "f18441027154292836b973c655fa3175", 257174},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 3 - English DOS Non-Interactive Demo
@@ -1593,8 +1476,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 76525},
{"resource.002", 0, "f773d79b93dfd4052ec8c1cc64c1e6ab", 268299},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 3 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723832)
@@ -1607,8 +1489,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "3827a9b17b926e12dcc336860f50612a", 587036},
{"resource.004", 0, "3827a9b17b926e12dcc336860f50612a", 691932},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 3 - French DOS (provided by richiefs in bug report #2670691)
@@ -1621,8 +1502,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "65f1bdaa20f6d0470e9d969f22473873", 586921},
{"resource.004", 0, "65f1bdaa20f6d0470e9d969f22473873", 690826},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Larry 5 - English Amiga
@@ -1638,8 +1518,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "f8b2d1137bb767e5d232056b99dd69eb", 623621},
{"resource.006", 0, "bafc64e3144f115dc58c6aee02de98fb", 715598},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - German Amiga
@@ -1656,8 +1535,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "bafc64e3144f115dc58c6aee02de98fb", 754966},
{"resource.007", 0, "59eba83ad465b08d763b44f86afa86f6", 683135},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - English DOS Non-Interactive Demo (from FRG)
@@ -1666,8 +1544,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "efe8d3f45ce4f6bd9a6643e0ac8d2a97", 504},
{"resource.001", 0, "8bd8d9c0b5f455ee1269d63ce86c50dd", 531380},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - English DOS (from spookypeanut)
@@ -1683,8 +1560,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1024810},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 1030656},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - German DOS (from Tobis87)
@@ -1700,8 +1576,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1021774},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 993408},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - French DOS (provided by richiefs in bug report #2670691)
@@ -1718,8 +1593,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 946540},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 958842},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - Spanish DOS (from the Leisure Suit Larry Collection)
@@ -1736,8 +1610,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "dda27ce00682aa76198dac124bbbe334", 1015136},
{"resource.007", 0, "ac443fae1285fb359bf2b2bc6a7301ae", 987222},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 5 - Italian DOS Floppy (from glorifindel)
@@ -1746,8 +1619,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a99776df795127f387cb35dae872d4e4", 5919},
{"resource.000", 0, "a8989a5a89e7d4f702b26b378c7a357a", 7001981},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Larry 6 - English DOS (from spookypeanut)
@@ -1756,8 +1628,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "bb8a39d9e2a77ba449a1e591109ad9a8", 6973},
{"resource.000", 0, "4462fe48c7452d98fddcec327a3e738d", 5789138},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Larry 6 - English/German/French DOS CD - LORES
@@ -1766,8 +1637,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0b91234b7112782962cb480b7791b6e2", 7263},
{"resource.000", 0, "57d5fe8bb9e044158514476ea7678eb0", 5754790},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Larry 6 - German DOS CD - LORES (provided by richiefs in bug report #2670691)
@@ -1776,8 +1646,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "bafe85f32738854135991d4324ad147e", 7268},
{"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5773160},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Larry 6 - French DOS CD - LORES (provided by richiefs in bug report #2670691)
@@ -1786,8 +1655,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "97797ea775baaf18a1907d357d3c0ea6", 7268},
{"resource.000", 0, "f6cbc6da7b90ea135883e0759848ca2c", 5776092},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Larry 6 - Spanish DOS - LORES (from the Leisure Suit Larry Collection)
@@ -1796,8 +1664,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "633bf8f42170b6271019917c8009989b", 6943},
{"resource.000", 0, "7884a8db9253e29e6b37a2651fd90ba3", 5733116},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Leisure Suit Larry's Casino - English DOS (from the Leisure Suit Larry Collection)
@@ -1806,8 +1673,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "194f1578f2624db813c9072359ad1639", 783},
{"resource.001", 0, "3733433b517ec3d14a3331d9ab3842ae", 344830},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -1817,8 +1683,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "0c0804434ea62278dd15032b1947426c", 8872},
{"resource.000", 0, "9a9f4870504444cda863dd14d077a680", 18520872},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 6 - German DOS CD - HIRES (provided by richiefs in bug report #2670691)
@@ -1827,8 +1692,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "badfdf446ffed569a310d2c63a249421", 8896},
{"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18534274},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 6 - French DOS CD - HIRES (provided by richiefs in bug report #2670691)
@@ -1837,8 +1701,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "d184e9aa4f2d4b5670ddb3669db82cda", 8896},
{"resource.000", 0, "bd944d2b06614a5b39f1586906f0ee88", 18538987},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 7 - English DOS CD (from spookypeanut)
@@ -1847,8 +1710,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "eae93e1b1d1ccc58b4691c371281c95d", 8188},
{"ressci.000", 0, "89353723488219e25589165d73ed663e", 66965678},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 7 - German DOS (from Tobis87)
@@ -1857,8 +1719,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "c11e6bfcfc2f2d05da47e5a7df3e9b1a", 8188},
{"ressci.000", 0, "a8c6817bb94f332ff498a71c8b47f893", 66971724},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 7 - French DOS (provided by richiefs in bug report #2670691)
@@ -1867,8 +1728,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "4407849fd52fe3efb0c30fba60cd5cd4", 8206},
{"ressci.000", 0, "dc37c3055fffbefb494ff22b145d377b", 66964472},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 7 - Italian DOS CD (from glorifindel)
@@ -1877,8 +1737,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "9852a97141f789413f29bf956052acdb", 8212},
{"ressci.000", 0, "440b9fed89590abb4e4386ed6f948ee2", 67140181},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 7 - Spanish DOS (from the Leisure Suit Larry Collection)
@@ -1887,8 +1746,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "8f3d603e1acc834a5d598b30cdfc93f3", 8188},
{"ressci.000", 0, "32792f9bc1bf3633a88b382bb3f6e40d", 67071418},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Larry 7 - English DOS Demo (provided by richiefs in bug report #2670691)
@@ -1897,8 +1755,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "5cc6159688b2dc03790a67c90ccc67f9", 10195878},
{"resmap.000", 0, "6a2b2811eef82e87cde91cf1de845af8", 2695},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Lighthouse - English Windows Demo (from jvprat)
@@ -1907,8 +1764,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "543124606352bfa5e07696ddf2a669be", 64},
{"resource.000", 0, "5d7714416b612463d750fb9c5690c859", 28952},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Lighthouse - English Windows Demo
@@ -1917,8 +1773,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "3bdee7a16926975a4729f75cf6b80a92", 1525},
{"ressci.000", 0, "3c585827fa4a82f4c04a56a0bc52ccee", 11494351},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Lighthouse - English DOS (from jvprat)
@@ -1929,8 +1784,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.002", 0, "c68db5333f152fea6ca2dfc75cad8b34", 7573},
{"ressci.002", 0, "175468431a979b9f317c294ce3bc1430", 94628315},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Lighthouse - Spanish DOS (from jvprat)
@@ -1941,8 +1795,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.002", 0, "e7dc85884a2417e2eff9de0c63dd65fa", 7630},
{"ressci.002", 0, "3c8d627c555b0e3e4f1d9955bc0f0df4", 94631127},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -1952,8 +1805,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "8be56a3a88c065ee00c02c0e29199f3a", 14643},
{"resource.001", 0, "9e33566515b18bee7915db448063bba2", 871853},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Mixed-Up Fairy Tales v1.000 - English DOS (supplied by markcoolio in bug report #2723791)
@@ -1966,8 +1818,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "b1288e0821ee358d1ffe877e5900c8ec", 1047565},
{"resource.004", 0, "f79daa70390d73746742ffcfc3dc4471", 937580},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Mixed-Up Fairy Tales - English DOS Floppy (from jvprat)
@@ -1979,8 +1830,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "564f516d991032e781492592a4eaa275", 1414142},
{"resource.003", 0, "dd6cef0c592eadb7e6be9a25307c57a2", 1344719},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Mixed-Up Mother Goose - English Amiga (from www.back2roots.org)
@@ -1991,8 +1841,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "fb552ae550ca1dac19ed8f6a3767612d", 262885},
{"resource.002", 0, "fb552ae550ca1dac19ed8f6a3767612d", 817191},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Mixed-Up Mother Goose v2.000 - English DOS Floppy (supplied by markcoolio in bug report #2723795)
@@ -2001,8 +1850,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "52aae15e493cafd1da7e1c9b657a5bb9", 7026},
{"resource.000", 0, "b7ecd8ae9e254e80310b5a668b276e6e", 2948975},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Mixed-Up Mother Goose - English DOS CD (from jvprat)
@@ -2012,8 +1860,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1c7f311b0a2c927b2fbe81ae341fb2f6", 5790},
{"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 4369438},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_0
+ 0
},
// Mixed-Up Mother Goose - English Windows Interactive Demo
@@ -2022,8 +1869,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "87f9dc1cafc4d4fa835fb2f00cf3a6ef", 4560},
{"resource.001", 0, "5a0ed1d745855148364de1b3be099bac", 2070072},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
#ifdef ENABLE_SCI32
@@ -2033,8 +1879,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5159a1578c4306bfe070a3e4d8c2e1d3", 4741},
{"resource.000", 0, "1926925c95d82f0999590e93b02887c5", 15150768},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -2044,8 +1889,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5b457cbe5042f557e5b610148171f6c0", 1158},
{"resource.001", 0, "453ea81ef66a50cbe33ce06302afe47f", 229737},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -2067,8 +1911,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.007", 0, "afbd16ea77869a720afa1c5371de107d", 7972},
//{"ressci.007", 0, "3aae6559aa1df273bc542d5ac6330d75", 25859038},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Phantasmagoria 2 - English Windows (from jvprat)
@@ -2085,8 +1928,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.005", 0, "8bd5ceeedcbe16dfe55d1b90dcd4be84", 1942},
{"ressci.005", 0, "05f9fe2bee749659acb3cd2c90252fc5", 67905112},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -2096,8 +1938,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "72726dc81c1b4c1110c486be77369bc8", 5179},
{"resource.000", 0, "670d0c53622429f4b11275caf7f8d292", 5459574},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Pepper - English DOS Non-Interactive Demo
@@ -2106,8 +1947,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "379bb4fb896630b14f2d91ed21e36ba1", 984},
{"resource.000", 0, "118f6c31a93ec7fd9a231c61125229e3", 645494},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Pepper - English DOS/Windows Interactive Demo
@@ -2116,8 +1956,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "975e8df76106a5c13d12ab674f906a02", 2514},
{"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1698164},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Pepper - English DOS Interactive Demo
@@ -2126,8 +1965,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9c9b7b900651a370dd3fb38d478b1798", 2524},
{"resource.000", 0, "e6a918a2dd7a4bcecd8fb389f43287c2", 1713544},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Police Quest 1 VGA Remake - English DOS (from the Police Quest Collection)
@@ -2136,8 +1974,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "35efa814fb994b1cbdac9611e401da67", 5013},
{"resource.000", 0, "e0d5ddf34eda903a38f0837e2aa7145b", 6401433},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Police Quest 2 - English Amiga (from www.back2roots.org)
@@ -2149,8 +1986,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "499737c21a28ac026e11ab817100d610", 511099},
{"resource.003", 0, "e008f5d6e2a7c4d4a0da0173e4fa8f8b", 553970},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Police Quest 2 - English DOS Non-Interactive Demo
@@ -2159,8 +1995,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8b77d0d4650c2052b356cece28294b58", 576},
{"resource.001", 0, "376ef6d6eaaeed66e1424bd219c4b9ab", 215398},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Police Quest 2 - English DOS (provided by richiefs in bug report #2670691)
@@ -2174,8 +2009,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "77f02def3094af804fd2371db25b7100", 349899},
{"resource.006", 0, "77f02def3094af804fd2371db25b7100", 354991},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Police Quest 2 - English DOS (from the Police Quest Collection)
@@ -2186,8 +2020,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 546000},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 591851},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Police Quest 2 - English DOS (from FRG)
@@ -2198,8 +2031,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "77f02def3094af804fd2371db25b7100", 542897},
{"resource.003", 0, "77f02def3094af804fd2371db25b7100", 586857},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Police Quest 3 - English Amiga
@@ -2213,8 +2045,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "630bfa65beb05f743552704ac2899dae", 759891},
{"resource.004", 0, "7b229fbdf30d670d0728cede3e984a7e", 838663},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Police Quest 3 - German Amiga
@@ -2229,8 +2060,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "6258d5dd85898d8e218eb8113ebc9059", 722738},
{"resource.005", 0, "6258d5dd85898d8e218eb8113ebc9059", 704485},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Police Quest 3 - English DOS (from the Police Quest Collection)
@@ -2244,8 +2074,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "8791b9eef53edf77c2dac950142221d3", 1159791},
{"resource.004", 0, "1b91e891a3c60a941dac0eecdf83375b", 1143606},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Police Quest 3 - English DOS Non-Interactive Demo
@@ -2256,8 +2085,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "277f97771f7a6d89677141f02da313d6", 65150},
{"resource.001", 0, "5c5a551b6c86cce2ee75becb90e0b586", 624411},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Police Quest 3 - German DOS (supplied by markcoolio in bug report #2723837)
@@ -2271,8 +2099,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "4836f460f4cfc8de61e2df4c45775504", 1180956},
{"resource.004", 0, "0c3eb84b9755852d9e795e0d5c9373c7", 1171760},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Police Quest 4 - English DOS Non-Interactive Demo (from FRG)
@@ -2281,8 +2108,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "be56f87a1c4a13062a30a362df860c2f", 1472},
{"resource.000", 0, "527d5684016e6816157cd15d9071b11b", 1121310},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -2292,8 +2118,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "379dfe80ed6bd16c47e4b950c4722eac", 11374},
{"resource.000", 0, "fd316a09b628b7032248139003369022", 18841068},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Police Quest 4 - English DOS
@@ -2302,8 +2127,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "aed9643158ccf01b71f359db33137f82", 9895},
{"resource.000", 0, "da383857b3be1e4514daeba2524359e0", 15141432},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Police Quest 4 - German DOS (supplied by markcoolio in bug report #2723840)
@@ -2312,8 +2136,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2393ee728ab930b2762cb5889f9b5aff", 9256},
{"resource.000", 0, "6ba98bd2e436739d87ecd2a9b99cabb4", 14730155},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Police Quest: SWAT - English DOS/Windows Demo (from jvprat)
@@ -2322,8 +2145,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8c96733ef94c21526792f7ca4e3f2120", 1648},
{"resource.000", 0, "d8892f1b8c56c8f7704325460f49b300", 3676175},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Police Quest: SWAT - English Windows (from the Police Quest Collection)
@@ -2338,8 +2160,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.004", 0, "4228038906f041623e65789500b22285", 6835},
{"ressci.004", 0, "b7e619e6ecf62fe65d5116a3a422e5f0", 46223872},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -2353,8 +2174,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 642203},
{"resource.004", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 641688},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Quest for Glory 1 / Hero's Quest - English DOS 5.25" Floppy (supplied by markcoolio in bug report #2723843)
@@ -2370,8 +2190,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "69366c2a2f99917199fe1b60a4fee19d", 267852},
{"resource.007", 0, "7ab2bf8e224b57f75e0cd6e4ba790761", 272747},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Quest for Glory 1 - Japanese PC-98 5.25" Floppy
@@ -2382,8 +2201,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "a21451ef6fa8179bd4b22c4950004c44", 1136968},
{"resource.003", 0, "a21451ef6fa8179bd4b22c4950004c44", 769897},
{NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Quest for Glory 1 - Japanese PC-98 5.25" Floppy
@@ -2394,8 +2212,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "a21451ef6fa8179bd4b22c4950004c44", 1147121},
{"resource.003", 0, "a21451ef6fa8179bd4b22c4950004c44", 777575},
{NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Quest for Glory 1 - English Amiga
@@ -2410,8 +2227,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "16cd4414c37ae3bb6d6da33dce8e25e8", 689124},
{"resource.005", 0, "5f3386ef2f2b1254e4a066f5d9027324", 609529},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Quest for Glory 1 - English DOS
@@ -2424,8 +2240,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "951299a82a8134ed12c5c18118d45c2f", 640483},
{"resource.004", 0, "951299a82a8134ed12c5c18118d45c2f", 644443},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Quest for Glory 1 VGA Remake - English DOS
@@ -2434,8 +2249,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a731fb6c9c0b282443f7027bc8694d4c", 8469},
{"resource.000", 0, "ecace1a2771846b1a8aa1afdd44111a0", 6570147},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Quest for Glory 1 VGA Remake - English DOS Non-Interactive Demo (from FRG)
@@ -2444,8 +2258,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ac0257051c95a59c0cdc0be24d9b11fa", 729},
{"resource.000", 0, "ec6f5cf369054dd3e5392995e9975b9e", 768218},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Quest for Glory 2 - English Amiga
@@ -2462,8 +2275,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "ccf5dba33e5cab6d5872838c0f8db44c", 500039},
{"resource.007", 0, "4c9fc1587545879295cb9627f56a2cb8", 575056},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Quest for Glory 2 - English (from FRG)
@@ -2476,8 +2288,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "b192607c42f6960ecdf2ad2e4f90e9bc", 972804},
{"resource.004", 0, "cd2de58e27665d5853530de93fae7cd6", 983617},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Quest for Glory 2 - English DOS
@@ -2493,8 +2304,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "b1944bd664ddbd2859cdaa0c4a0d6281", 507489},
{"resource.007", 0, "cd2de58e27665d5853530de93fae7cd6", 490794},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_01
+ 0
},
// Quest for Glory 3 - English DOS Non-Interactive Demo (from FRG)
@@ -2503,8 +2313,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "fd71de9b588a45f085317caacf050e91", 687},
{"resource.000", 0, "b6c69bf6c18bf177492249fe81fc6a6d", 648702},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Quest for Glory 3 - English DOS
@@ -2513,8 +2322,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958},
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868000},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Quest for Glory 3 - German DOS (supplied by markcoolio in bug report #2723846)
@@ -2523,8 +2331,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "19e2bf9b693932b5e2bb59b9f9ab86c9", 5958},
{"resource.000", 0, "6178ad2e83e58e4671ca03315f7a6498", 5868042},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Quest for Glory 3 - Spanish DOS CD (from jvprat)
@@ -2534,8 +2341,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "ba7ac86155e4c531e46cd73c86daa80a", 5884098},
{"resource.msg", 0, "a63974730d294dec0bea10057c36e506", 256014},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Quest for Glory 4 - English DOS Non-Interactive Demo (from FRG)
@@ -2544,8 +2350,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "1ba7c7ae1efb315326d45cb931569b1b", 922},
{"resource.000", 0, "41ba03f0b188b029132daa3ece0d3e14", 623154},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -2555,8 +2360,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "685bdb1ed47bbbb0e5e25db392da83ce", 9301},
{"resource.000", 0, "f64fd6aa3977939a86ff30783dd677e1", 11004993},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Quest for Glory 4 1.1 Floppy - German DOS (supplied by markcool in bug report #2723850)
@@ -2565,8 +2369,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301},
{"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Quest for Glory 4 - English DOS/Windows (from jvprat)
@@ -2575,8 +2378,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246},
{"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#if 0
@@ -2588,8 +2390,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "aba367f2102e81782d961b14fbe3d630", 10246},
{"resource.000", 0, "263dce4aa34c49d3ad29bec889007b1c", 11571394},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif
@@ -2599,8 +2400,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "9e0abba8746f40565bc7eb5720522ecd", 9301},
{"resource.000", 0, "57f22cdc54eeb35fce1f26b31b5c3ee1", 11076197},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// RAMA - English DOS/Windows Demo
@@ -2609,8 +2409,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.001", 0, "775304e9b2a545156be4d94209550094", 1393},
{"ressci.001", 0, "259437fd75fdf51e8207fda8c01fa4fd", 2334384},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// RAMA - English Windows (from jvprat)
@@ -2623,8 +2422,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.003", 0, "31ef4c0621711585d031f0ae81707251", 1636},
{"ressci.003", 0, "2a68edd064e5e4937b5e9c74b38f2082", 6860492},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// RAMA - Italian Windows CD (from glorifindel)
@@ -2633,8 +2431,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"ressci.001", 0, "2a68edd064e5e4937b5e9c74b38f2082", 70611091},
{"resmap.001", 0, "70ba2ff04a2b7fb2c52420ba7fbd47c2", 8338},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Shivers - English Windows (from jvprat)
@@ -2643,8 +2440,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "f2ead37749ed8f6535a2445a7d05a0cc", 46525},
{"ressci.000", 0, "4294c6d7510935f2e0a52e302073c951", 262654836},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Shivers - German Windows (from Tobis87)
@@ -2652,8 +2448,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "f483d0a1f78334c18052e92785c3086e", 46537},
{"ressci.000", 0, "6751b144671e2deed919eb9d284b07eb", 262390692},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Shivers - English Windows Demo
@@ -2662,8 +2457,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "d9e0bc5eddefcbe47f528760085d8927", 1186},
{"ressci.000", 0, "3a93c6340b54e07e65d0e5583354d186", 10505469},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Shivers2 - English Windows Demo
@@ -2672,8 +2466,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "d8659188b84beaef076bd869837cd530", 634},
{"ressci.000", 0, "7fbac0807a044c9543e8ac376d200e59", 4925003},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -2684,8 +2477,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.msg", 0, "1aeafe2b495de288d002109650b66614", 1364},
{"resource.000", 0, "8e10d4f05c1fd9f883384fa38a898489", 377394},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Space Quest 1 VGA Remake - English Amiga (from www.back2roots.org)
@@ -2699,8 +2491,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "b25a1539c71701f7715f738c5037e9a6", 775515},
{"resource.005", 0, "640ffe1a9acde392cc33cc1b1a528328", 806324},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 1 VGA Remake - English DOS (from the Space Quest Collection)
@@ -2714,8 +2505,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "c47600e50c6fc591957ae0c5020ee7b8", 1213262},
{"resource.004", 0, "e19ea4ad131472f9238590f2e1d40289", 1203051},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 1 VGA Remake - English Non-Interactive Demo (from FRG)
@@ -2724,8 +2514,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "5af709ac5e0e923e0b8174f49978c30e", 636},
{"resource.001", 0, "fd99ea43f57576ded7c86036996346cf", 507642},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 1 VGA Remake - Spanish DOS Floppy (from jvprat)
@@ -2740,8 +2529,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "9b78228ad4f9f335fedf74f1812dcfca", 513325},
{"resource.005", 0, "7d4ebcb745c0bf8fc42e4013f52ecd49", 1101812},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 3 - English Amiga (from www.back2roots.org)
@@ -2753,8 +2541,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 746496},
{"resource.004", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 761984},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Space Quest 3 - German Amiga
@@ -2768,8 +2555,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 545053},
{"resource.005", 0, "6d8f34090503ce937e7dbef6cb6cdb6a", 687507},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Space Quest 3 - English DOS Non-Interactive Demo
@@ -2778,8 +2564,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ec66ac2b1ce58b2575ba00b65058de1a", 612},
{"resource.001", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 180245},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Space Quest 3 - English DOS (provided by richiefs in bug report #2670691)
@@ -2790,8 +2575,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 720244},
{"resource.003", 0, "ceeda7202b96e5c85ecaa88a40a540fc", 688367},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Space Quest 3 - English DOS (from the Space Quest Collection)
@@ -2802,8 +2586,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 715777},
{"resource.003", 0, "8b55c4875298f45ea5696a5ee8f6a7fe", 703370},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Space Quest 3 - German DOS (from Tobis87)
@@ -2818,8 +2601,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.006", 0, "9107c2aa5398e28b5c5406df13491f85", 320643},
{"resource.007", 0, "9107c2aa5398e28b5c5406df13491f85", 344287},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- GF_FOR_SCI0_BEFORE_629,
- SCI_VERSION_0
+ GF_FOR_SCI0_BEFORE_629
},
// Space Quest 3 v1.052 - German DOS (supplied by markcoolio in bug report #2723860)
@@ -2830,8 +2612,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "9107c2aa5398e28b5c5406df13491f85", 596768},
{"resource.003", 0, "9107c2aa5398e28b5c5406df13491f85", 693573},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_0
+ 0
},
// Space Quest 4 - English Amiga
@@ -2847,8 +2628,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "3540d1cc84d674cf4b2c898b88a3b563", 790296},
{"resource.006", 0, "ade814bc4d56244c156d9e9bcfebbc11", 664085},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - German Amiga (from www.back2roots.org)
@@ -2863,8 +2643,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "10ee1709e6559c724676d058199b75b5", 818745},
{"resource.006", 0, "67fb188b191d88efe8414af6ea297b93", 672675},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformAmiga, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - English DOS
@@ -2874,8 +2653,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a18088c8aceb06025dbc945f29e02935", 5124},
{"resource.000", 0, "e1f46832cd2458796028e054a0466031", 5502009},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - English DOS
@@ -2885,8 +2663,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "71ccf4f82ac4efb588731acfb7bf2603", 5646},
{"resource.000", 0, "e1f46832cd2458796028e054a0466031", 933928},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 1.052 - English DOS Floppy (supplied by markcoolio in bug report #2723865)
@@ -2901,8 +2678,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "ff9c87da3bc53473fdee8b9d3edbc93c", 1200631},
{"resource.005", 0, "e33019ac19f755ae33fbf49b4fc9066c", 1053294},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - German DOS (from Tobis87)
@@ -2917,8 +2693,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.005", 0, "47ee647b5b12232d27e63cc627c25899", 1156765},
{"resource.006", 0, "dfb023e4e2a1e7a00fa18f9ede72a91b", 924059},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - Italian DOS Floppy (from glorifindel)
@@ -2932,8 +2707,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "4277c61bed40a50dadc4b5a344520af2", 1251000},
{"resource.005", 0, "5f885abd335978e2fd4e5f886d7676c8", 1102880},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - Japanese PC-98 5.25" Floppy
@@ -2944,8 +2718,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "454684e3a7a68cbca073945e50778447", 1187088},
{"resource.002", 0, "6dc668326cc22cb9e8bd8ca9e68d2a66", 1181249},
{NULL, 0, NULL, 0}}, Common::JA_JPN, Common::kPlatformPC98, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - Japanese PC-98 5.25" Floppy
@@ -2956,8 +2729,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.001", 0, "454684e3a7a68cbca073945e50778447", 1187088},
{"resource.002", 0, "6dc668326cc22cb9e8bd8ca9e68d2a66", 1181249},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC98, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - English DOS CD (from the Space Quest Collection)
@@ -2966,8 +2738,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "ed90a8e3ccc53af6633ff6ab58392bae", 7054},
{"resource.000", 0, "63247e3901ab8963d4eece73747832e0", 5157378},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Space Quest 4 - Spanish DOS CD (from jvprat)
@@ -2982,8 +2753,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "776fba81c110d1908776232cbe190e20", 1253752},
{"resource.005", 0, "55fae26c2a92f16ef72c1e216e827c0f", 1098328},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 - Spanish DOS Floppy (from jvprat)
@@ -2996,8 +2766,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.002", 0, "74c62fa2146ff3b3b2ea2b3fb95b9af9", 1140801},
{"resource.003", 0, "42a307941edeb1a3be31daeb2e4be90b", 1088408},
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 4 1.000 - German DOS Floppy (supplied by markcoolio in bug report #2723862)
@@ -3012,8 +2781,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.004", 0, "c06350184a490c10eb4585fff0aa3192", 1254368},
{"resource.005", 0, "b8d6efbd3235329bfe844c794097b2c9", 1098717},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1
+ 0
},
// Space Quest 5 - English DOS (from the Space Quest Collection)
@@ -3023,8 +2791,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486},
{"resource.msg", 0, "bb8ad78793c26bdb3f77498b1d6515a9", 125988},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Space Quest 5 - English DOS
@@ -3033,8 +2800,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "8bde0a9adb9a3e9aaa861826874c9834", 6473},
{"resource.000", 0, "f4a48705764544d7cc64a7bb22a610df", 6025184},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Space Quest 5 v1.04 - German DOS (from Tobis87, updated information by markcool from bug reports #2723935 and #2724762)
@@ -3044,8 +2810,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "4147edc5045e6d62998018b5614c58ec", 5496486},
{"resource.msg", 0, "7c71cfc36153cfe07b450423a51f7e68", 146282},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// Space Quest 5 - Italian DOS Floppy (from glorifindel)
@@ -3054,8 +2819,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.000", 0, "5040026519f37199f3616fb1d4704dff", 6047170},
{"resource.map", 0, "5b09168baa2f6e2e22787429b2d72f54", 6492},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -3065,8 +2829,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "6dddfa3a8f3a3a513ec9dfdfae955005", 10528},
{"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Space Quest 6 - English DOS/Win3.11 CD ver 1.11 (from FRG)
@@ -3075,8 +2838,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "e0615d6e4e10e37ae42e6a2a95aaf145", 10528},
{"resource.000", 0, "c4259ab7355aead07773397b1052827d", 41150806},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
// Space Quest 6 - English DOS/Win3.11 Interactive Demo (from FRG)
@@ -3085,8 +2847,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "368f07b07433db3f819fa3fa0e5efee5", 2572},
{"resource.000", 0, "ab12724e078dea34b624e0d2a38dcd7c", 2272050},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Space Quest 6 - German DOS (from Tobis87, updated info from markcoolio in bug report #2723884)
@@ -3095,8 +2856,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "664d797415484f85c90b1b45aedc7686", 10534},
{"resource.000", 0, "ba87ba91e5bdabb4169dd0df75777722", 40933685},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -3106,8 +2866,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "2388efef8430b041b0f3b00b9050e4a2", 3281},
{"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 2103560},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NONE},
- 0,
- SCI_VERSION_1_1
+ 0
},
// The Island of Dr. Brain - English DOS (from Quietust)
@@ -3116,8 +2875,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "3c07da06bdd1689f9d07af78fb94d0ec", 3101},
{"resource.000", 0, "ecc686e0034fb4d41de077ac7167b3cf", 1947866},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
// The Island of Dr. Brain - English DOS Non-Interactive Demo
@@ -3126,8 +2884,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resource.map", 0, "a8e5ca8ed1996974afa59f4c45e06195", 986},
{"resource.000", 0, "b3acd9b9dd7fe53c4ee133ac9a1acfab", 586560},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformPC, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_1_1
+ 0
},
#ifdef ENABLE_SCI32
@@ -3137,8 +2894,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "9a3e172cde9963d0a969f26469318cec", 3403},
{"ressci.000", 0, "db3e290481c35c3224e9602e71e4a1f1", 5073868},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, ADGF_DEMO, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Torin's Passage - English Windows
@@ -3147,8 +2903,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
{NULL, 0, NULL, 0}}, Common::EN_ANY, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Torin's Passage - Spanish Windows (from jvprat)
@@ -3158,8 +2913,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
// TODO: depend on one of the patches?
{NULL, 0, NULL, 0}}, Common::ES_ESP, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Torin's Passage - French Windows
@@ -3168,8 +2922,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
{NULL, 0, NULL, 0}}, Common::FR_FRA, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Torin's Passage - German Windows
@@ -3178,8 +2931,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
{NULL, 0, NULL, 0}}, Common::DE_DEU, Common::kPlatformWindows, 0, GUIO_NOSPEECH},
- 0,
- SCI_VERSION_32
+ 0
},
// Torin's Passage - Italian Windows CD (from glorifindel)
@@ -3188,8 +2940,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
{"resmap.000", 0, "bb3b0b22ff08df54fbe2d06263409be6", 9799},
{"ressci.000", 0, "693a259d346c9360f4a0c11fdaae430a", 55973887},
{NULL, 0, NULL, 0}}, Common::IT_ITA, Common::kPlatformWindows, 0, GUIO_NONE},
- 0,
- SCI_VERSION_32
+ 0
},
#endif // ENABLE_SCI32
@@ -3199,9 +2950,9 @@ static const struct SciGameDescription SciGameDescriptions[] = {
FANMADE("Another DG Game: I Want My C64 Back", "4a8ca7ca2abd18899ef856f47665e2e9", 588, "12ff558d20c72e42cc6adb408f34d6d8", 150513),
FANMADE_L("Another DG Game: I Want My C64 Back", "13dc1d9ebc57daf8895412eee5e39fea", 576, "e2ad60b3a280171429db5c85f158f84a", 141697, Common::FR_FRA),
FANMADE("Bluntman and Chronic (Politically Correct Version)", "c3ef9fa6c7c5fb840078bf28d87c7f8b", 1362, "441636a9f6f86710844868fded868ee7", 596688),
- FANMADE_V("Cascade Quest", "c94efc10d18c040b6e22a1dc6d3adfe1", 3468, "8ada33dfa945f81531e5508240b573de", 1432195, SCI_VERSION_0),
- FANMADE_V("Curt Quest 1.0", "b0e555370380d218968a40a68eaaaffc", 1146, "c851182cdf6fc6a81b840f4d4875f1a0", 307165, SCI_VERSION_0),
- FANMADE_V("Curt Quest 1.1", "54084c29346683296e45ef32d7ae74f3", 1128, "c851182cdf6fc6a81b840f4d4875f1a0", 302000, SCI_VERSION_0),
+ FANMADE("Cascade Quest", "c94efc10d18c040b6e22a1dc6d3adfe1", 3468, "8ada33dfa945f81531e5508240b573de", 1432195),
+ FANMADE("Curt Quest 1.0", "b0e555370380d218968a40a68eaaaffc", 1146, "c851182cdf6fc6a81b840f4d4875f1a0", 307165),
+ FANMADE("Curt Quest 1.1", "54084c29346683296e45ef32d7ae74f3", 1128, "c851182cdf6fc6a81b840f4d4875f1a0", 302000),
FANMADE("Demo Quest", "c89a0c9e0a4e4af0ecedb300a3b31dbf", 384, "a32f3495ba24764cba091119cc3f1e13", 160098),
FANMADE("Dr. Jummybummy's Space Adventure 2", "6ae6cb7de423f51736d9487b4ca0c6da", 810, "26e5b563f578e104d79689f36568b7cf", 394670),
FANMADE_L("Grostesteing: Plus Mechant que Jamais", "ec9a97ccb134f69249f6ea8b16c13d8e", 1500, "b869f5f11bfe2ab5f67f4f0c618f2ce1", 464657, Common::FR_FRA), // FIXME: Accent
@@ -3209,9 +2960,9 @@ static const struct SciGameDescription SciGameDescriptions[] = {
FANMADE("Knight's Quest Demo 1.0", "5e816edf993956752ed06fccfeeae6d9", 1260, "959321f88a22905fa1f8c6d897874744", 703836),
FANMADE("LockerGnome Quest", "3eeff9130206cad0c4e1551e2b9dd2c5", 420, "ae05ca90806fd90cc43f147c82d3547c", 158906),
FANMADE("New Year's Mystery", "efd1beb5120293725065c95959144f81", 714, "b3bd3c2372ed6efa28adb12403c4c31a", 305027),
- FANMADE_V("Osama", "db8f1710453cfbecf4214b2946970043", 390, "7afd75d4620dedf97a84ae8f0a7523cf", 123827, SCI_VERSION_0),
+ FANMADE("Osama", "db8f1710453cfbecf4214b2946970043", 390, "7afd75d4620dedf97a84ae8f0a7523cf", 123827),
FANMADE("Quest for the Cheat", "a359d4cf27f98264b42b55c017671214", 882, "8a943029f73c4bc85d454b7f473455ba", 455209),
- FANMADE_V("SCI Companion Template", "ad54d4f504086cd597aa2348d0aa3b09", 354, "6798b7b601ce8154c1d1bc0f0edcdd18", 113061, SCI_VERSION_0),
+ FANMADE("SCI Companion Template", "ad54d4f504086cd597aa2348d0aa3b09", 354, "6798b7b601ce8154c1d1bc0f0edcdd18", 113061),
FANMADE("SCI Studio Template 3.0", "ca0dc8d586e0a8670b7621cde090b532", 354, "58a48ee692a86c0575e6bd0b00a92b9a", 113097),
FANMADE("SCI Quest", "9067e1f1e54436d2dbfce855524bc84a", 552, "ffa7d355cd9223f245289108a696bcd2", 149634),
FANMADE("The Legend of the Lost Jewel", "ba1bca315e3818c5626eda51bcfbcccf", 636, "9b0736d69924af0cff32a0f78db96855", 300398),
@@ -3219,7 +2970,7 @@ static const struct SciGameDescription SciGameDescriptions[] = {
// FIXME: The vga demo does not have a resource.000/001 file.
//FANMADE_V("SCI VGA Demo", "00b1abd87bad356b90fcdfcb6132c26f", 8, "", 0, 0),
- {AD_TABLE_END_MARKER, 0, SCI_VERSION_0}
+ {AD_TABLE_END_MARKER, 0}
};
/**
@@ -3236,8 +2987,7 @@ static SciGameDescription s_fallbackDesc = {
ADGF_NO_FLAGS,
GUIO_NONE
},
- 0,
- SCI_VERSION_0
+ 0
};
@@ -3336,7 +3086,19 @@ const ADGameDescription *SciMetaEngine::fallbackDetect(const Common::FSList &fsl
s_fallbackDesc.desc.language = Common::UNK_LANG;
s_fallbackDesc.desc.platform = exePlatform;
s_fallbackDesc.desc.flags = ADGF_NO_FLAGS;
- getSciVersionFromString(exeVersionString, &s_fallbackDesc.version, s_fallbackDesc.desc.platform);
+
+#if 0
+ // Determine the game id
+ // TODO
+ ResourceManager *resMgr = new ResourceManager(256 * 1024);
+ SciVersion version = resMgr->sciVersion();
+ SegManager *segManager = new SegManager(resMgr, version);
+ reg_t game_obj = script_lookup_export(segManager, 0, 0);
+ Common::String gameName = obj_get_name(segManager,version, game_obj);
+ debug(2, " \"%s\" at %04x:%04x", gameName.c_str(), PRINT_REG(game_obj));
+ delete segManager;
+ delete resMgr;
+#endif
printf("If this is *NOT* a fan-modified version (in particular, not a fan-made\n");
printf("translation), please, report the data above, including the following\n");
diff --git a/engines/sci/engine/game.cpp b/engines/sci/engine/game.cpp
index 2d9cf6a42b..6872039c89 100644
--- a/engines/sci/engine/game.cpp
+++ b/engines/sci/engine/game.cpp
@@ -179,7 +179,7 @@ static void _free_graphics_input(EngineState *s) {
}
int game_init_sound(EngineState *s, int sound_flags) {
- if (s->resmgr->sciVersion() >= SCI_VERSION_01)
+ if (s->resmgr->sciVersion() > SCI_VERSION_0_LATE)
sound_flags |= SFX_STATE_FLAG_MULTIPLAY;
s->sfx_init_flags = sound_flags;
@@ -197,9 +197,9 @@ int create_class_table_sci11(EngineState *s) {
Resource *vocab996 = s->resmgr->findResource(ResourceId(kResourceTypeVocab, 996), 1);
if (!vocab996)
- s->_classtable.resize(20);
+ s->seg_manager->_classtable.resize(20);
else
- s->_classtable.resize(vocab996->size >> 2);
+ s->seg_manager->_classtable.resize(vocab996->size >> 2);
for (scriptnr = 0; scriptnr < 1000; scriptnr++) {
Resource *heap = s->resmgr->findResource(ResourceId(kResourceTypeHeap, scriptnr), 0);
@@ -213,19 +213,19 @@ int create_class_table_sci11(EngineState *s) {
while (READ_LE_UINT16((byte*)seeker_ptr) == SCRIPT_OBJECT_MAGIC_NUMBER) {
if (READ_LE_UINT16((byte*)seeker_ptr + 14) & SCRIPT_INFO_CLASS) {
classnr = READ_LE_UINT16((byte*)seeker_ptr + 10);
- if (classnr >= (int)s->_classtable.size()) {
+ if (classnr >= (int)s->seg_manager->_classtable.size()) {
if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) {
warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x",
classnr, scriptnr, scriptnr, seeker_offset);
return 1;
}
- s->_classtable.resize(classnr + 1); // Adjust maximum number of entries
+ s->seg_manager->_classtable.resize(classnr + 1); // Adjust maximum number of entries
}
- s->_classtable[classnr].reg.offset = seeker_offset;
- s->_classtable[classnr].reg.segment = 0;
- s->_classtable[classnr].script = scriptnr;
+ s->seg_manager->_classtable[classnr].reg.offset = seeker_offset;
+ s->seg_manager->_classtable[classnr].reg.segment = 0;
+ s->seg_manager->_classtable[classnr].script = scriptnr;
}
seeker_ptr += READ_LE_UINT16((byte*)seeker_ptr + 2) * 2;
@@ -246,11 +246,12 @@ static int create_class_table_sci0(EngineState *s) {
int magic_offset; // For strange scripts in older SCI versions
Resource *vocab996 = s->resmgr->findResource(ResourceId(kResourceTypeVocab, 996), 1);
+ SciVersion version = s->_version; // for the offset defines
if (!vocab996)
- s->_classtable.resize(20);
+ s->seg_manager->_classtable.resize(20);
else
- s->_classtable.resize(vocab996->size >> 2);
+ s->seg_manager->_classtable.resize(vocab996->size >> 2);
for (scriptnr = 0; scriptnr < 1000; scriptnr++) {
int objtype = 0;
@@ -270,7 +271,7 @@ static int create_class_table_sci0(EngineState *s) {
break;
seeker += (int16)READ_LE_UINT16(script->data + seeker + 2);
if (seeker <= lastseeker) {
- s->_classtable.clear();
+ s->seg_manager->_classtable.clear();
error("Script version is invalid");
}
}
@@ -281,7 +282,7 @@ static int create_class_table_sci0(EngineState *s) {
seeker -= SCRIPT_OBJECT_MAGIC_OFFSET; // Adjust position; script home is base +8 bytes
classnr = (int16)READ_LE_UINT16(script->data + seeker + 4 + SCRIPT_SPECIES_OFFSET);
- if (classnr >= (int)s->_classtable.size()) {
+ if (classnr >= (int)s->seg_manager->_classtable.size()) {
if (classnr >= SCRIPT_MAX_CLASSTABLE_SIZE) {
warning("Invalid class number 0x%x in script.%d(0x%x), offset %04x",
@@ -289,7 +290,7 @@ static int create_class_table_sci0(EngineState *s) {
return 1;
}
- s->_classtable.resize(classnr + 1); // Adjust maximum number of entries
+ s->seg_manager->_classtable.resize(classnr + 1); // Adjust maximum number of entries
}
// Map the class ID to the script the corresponding class is contained in
@@ -303,9 +304,9 @@ static int create_class_table_sci0(EngineState *s) {
if (sugg_script == -1 || scriptnr == sugg_script /*|| !s->_classtable[classnr].reg.segment*/) {
// Now set the home script of the class
- s->_classtable[classnr].reg.offset = seeker + 4 - magic_offset;
- s->_classtable[classnr].reg.segment = 0;
- s->_classtable[classnr].script = scriptnr;
+ s->seg_manager->_classtable[classnr].reg.offset = seeker + 4 - magic_offset;
+ s->seg_manager->_classtable[classnr].reg.segment = 0;
+ s->seg_manager->_classtable[classnr].script = scriptnr;
}
seeker += SCRIPT_OBJECT_MAGIC_OFFSET; // Re-adjust position
@@ -326,6 +327,7 @@ int script_init_engine(EngineState *s) {
int result;
s->kernel_opt_flags = 0;
+ s->seg_manager = new SegManager(s->resmgr, s->_version);
if (s->_version >= SCI_VERSION_1_1)
result = create_class_table_sci11(s);
@@ -337,10 +339,9 @@ int script_init_engine(EngineState *s) {
return 1;
}
- s->seg_manager = new SegManager(s->_version >= SCI_VERSION_1_1);
s->gc_countdown = GC_INTERVAL - 1;
- SegmentId script_000_segment = script_get_segment(s, 0, SCRIPT_GET_LOCK);
+ SegmentId script_000_segment = s->seg_manager->getSegment(0, SCRIPT_GET_LOCK);
if (script_000_segment <= 0) {
debug(2, "Failed to instantiate script.000");
@@ -398,7 +399,8 @@ void internal_stringfrag_strncpy(EngineState *s, reg_t *dest, reg_t *src, int le
void script_free_vm_memory(EngineState *s) {
debug(2, "Freeing VM memory");
- s->_classtable.clear();
+ if (s->seg_manager)
+ s->seg_manager->_classtable.clear();
// Close all opened file handles
s->_fileHandles.clear();
@@ -433,14 +435,13 @@ void script_free_breakpoints(EngineState *s) {
int game_init(EngineState *s) {
// FIXME Use new VM instantiation code all over the place"
- reg_t game_obj; // Address of the game object
DataStack *stack;
stack = s->seg_manager->allocateStack(VM_STACK_SIZE, &s->stack_segment);
s->stack_base = stack->entries;
s->stack_top = s->stack_base + VM_STACK_SIZE;
- if (!script_instantiate(s, 0)) {
+ if (!script_instantiate(s->resmgr, s->seg_manager, s->_version, 0)) {
warning("game_init(): Could not instantiate script 0");
return 1;
}
@@ -473,20 +474,11 @@ int game_init(EngineState *s) {
srand(g_system->getMillis()); // Initialize random number generator
// script_dissect(0, s->_selectorNames);
- game_obj = script_lookup_export(s, 0, 0);
// The first entry in the export table of script 0 points to the game object
+ s->game_obj = script_lookup_export(s->seg_manager, 0, 0);
+ s->_gameName = obj_get_name(s->seg_manager, s->_version, s->game_obj);
- const char *tmp = obj_get_name(s, game_obj);
-
- if (!tmp) {
- warning("Error: script.000, export 0 (%04x:%04x) does not yield an object with a name -> sanity check failed", PRINT_REG(game_obj));
- return 1;
- }
- s->_gameName = tmp;
-
- debug(2, " \"%s\" at %04x:%04x", s->_gameName.c_str(), PRINT_REG(game_obj));
-
- s->game_obj = game_obj;
+ debug(2, " \"%s\" at %04x:%04x", s->_gameName.c_str(), PRINT_REG(s->game_obj));
// Mark parse tree as unused
s->parser_nodes[0].type = kParseTreeLeafNode;
@@ -512,7 +504,9 @@ int game_exit(EngineState *s) {
game_init_sound(s, SFX_STATE_FLAG_NOSOUND);
}
+ s->seg_manager->_classtable.clear();
delete s->seg_manager;
+ s->seg_manager = 0;
s->_synonyms.clear();
diff --git a/engines/sci/engine/kernel.cpp b/engines/sci/engine/kernel.cpp
index 362e41a357..6d027d5788 100644
--- a/engines/sci/engine/kernel.cpp
+++ b/engines/sci/engine/kernel.cpp
@@ -382,6 +382,8 @@ Kernel::~Kernel() {
}
void Kernel::detectSciFeatures() {
+ // FIXME Much of this is unreliable
+
Resource *r = _resmgr->findResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SNAMES), 0);
Common::StringList staticSelectorTable;
@@ -396,9 +398,15 @@ void Kernel::detectSciFeatures() {
features = 0;
// Initialize features based on SCI version
- if (_resmgr->sciVersion() == SCI_VERSION_0) {
+ switch (_resmgr->sciVersion()) {
+ case SCI_VERSION_0_EARLY:
features |= kFeatureOldScriptHeader;
+ /* Fallthrough */
+ case SCI_VERSION_0_LATE:
features |= kFeatureOldGfxFunctions;
+ break;
+ default:
+ break;
}
for (int i = 0; i < count; i++) {
@@ -413,18 +421,12 @@ void Kernel::detectSciFeatures() {
tmp = staticSelectorTable[i];
}
- if (tmp == "setTarget") // "motionInited" can also be used
- features &= ~kFeatureOldScriptHeader;
-
if (tmp == "motionCue")
features &= ~kFeatureOldGfxFunctions;
if (tmp == "egoMoveSpeed" && _resmgr->sciVersion() < SCI_VERSION_1_1)
features |= kFeatureLofsAbsolute;
- if (tmp == "sightAngle" && _resmgr->sciVersion() == SCI_VERSION_0)
- features |= kFeatureSci0Sci1Table;
-
if (tmp == "setVol")
features |= kFeatureSci1Sound;
@@ -437,12 +439,6 @@ void Kernel::detectSciFeatures() {
printf("Kernel auto-detected features:\n");
- printf("Script block headers: ");
- if (features & kFeatureOldScriptHeader)
- printf("old\n");
- else
- printf("new\n");
-
printf("Graphics functions: ");
if (features & kFeatureOldGfxFunctions)
printf("old\n");
@@ -462,9 +458,6 @@ void Kernel::detectSciFeatures() {
printf("SCI01\n");
else
printf("SCI0\n");
-
- if (features & kFeatureSci0Sci1Table)
- printf("Found SCI0 game using a SCI1 kernel table\n");
}
void Kernel::loadSelectorNames() {
@@ -642,15 +635,6 @@ void Kernel::mapFunctions() {
int mapped = 0;
int ignored = 0;
uint functions_nr = getKernelNamesSize();
- uint max_functions_nr = (_resmgr->sciVersion() == SCI_VERSION_0) ? 0x72 : 0x7b;
-
- if (functions_nr < max_functions_nr) {
- warning("SCI version believed to have %d kernel"
- " functions, but only %d reported-- filling up remaining %d",
- max_functions_nr, functions_nr, max_functions_nr - functions_nr);
-
- functions_nr = max_functions_nr;
- }
_kernelFuncs.resize(functions_nr);
@@ -722,6 +706,8 @@ int determine_reg_type(EngineState *s, reg_t reg, bool allow_invalid) {
mobj = s->seg_manager->_heap[reg.segment];
+ SciVersion version = s->_version; // for the offset defines
+
switch (mobj->getType()) {
case MEM_OBJ_SCRIPT:
if (reg.offset <= (*(Script *)mobj).buf_size && reg.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET
@@ -833,15 +819,9 @@ reg_t *kernel_dereference_reg_pointer(EngineState *s, reg_t pointer, int entries
}
void Kernel::setDefaultKernelNames() {
- bool isSci0 = (_resmgr->sciVersion() == SCI_VERSION_0);
+ bool isSci0 = (_resmgr->sciVersion() <= SCI_VERSION_0_LATE);
int offset = 0;
- // Check if we have a SCI01 game which uses a SCI1 kernel table (e.g. the KQ1 demo
- // and full version). We do this by checking if the sightAngle selector exists, as no
- // SCI0 game seems to have it
- if (features & kFeatureSci0Sci1Table)
- isSci0 = false;
-
_kernelNames.resize(SCI_KNAMES_DEFAULT_ENTRIES_NR + (isSci0 ? 4 : 0));
for (int i = 0; i < SCI_KNAMES_DEFAULT_ENTRIES_NR; i++) {
// In SCI0, Platform was DoAvoider
@@ -897,23 +877,7 @@ static void vocab_get_knames11(ResourceManager *resmgr, Common::StringList &name
bool Kernel::loadKernelNames() {
_kernelNames.clear();
-
- switch (_resmgr->sciVersion()) {
- case SCI_VERSION_0:
- case SCI_VERSION_01:
- case SCI_VERSION_1:
- case SCI_VERSION_1_1:
- setDefaultKernelNames();
- break;
-#ifdef ENABLE_SCI32
- case SCI_VERSION_32:
- vocab_get_knames11(_resmgr, _kernelNames);
-#endif
- break;
- default:
- break;
- }
-
+ setDefaultKernelNames();
return true;
}
diff --git a/engines/sci/engine/kernel.h b/engines/sci/engine/kernel.h
index 6a275a9adb..bb5563a876 100644
--- a/engines/sci/engine/kernel.h
+++ b/engines/sci/engine/kernel.h
@@ -32,6 +32,8 @@
#include "sci/uinput.h"
#include "sci/vocabulary.h"
+#include "sci/engine/vm_types.h" // for reg_t
+#include "sci/engine/vm.h"
namespace Sci {
@@ -60,8 +62,7 @@ enum AutoDetectedFeatures {
kFeatureOldGfxFunctions = 1 << 1,
kFeatureLofsAbsolute = 1 << 2,
kFeatureSci01Sound = 1 << 3,
- kFeatureSci1Sound = 1 << 4,
- kFeatureSci0Sci1Table = 1 << 5
+ kFeatureSci1Sound = 1 << 4
};
class Kernel {
diff --git a/engines/sci/engine/kevent.cpp b/engines/sci/engine/kevent.cpp
index 5ac09e6c76..b3b8d3d53b 100644
--- a/engines/sci/engine/kevent.cpp
+++ b/engines/sci/engine/kevent.cpp
@@ -40,7 +40,7 @@ reg_t kGetEvent(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t obj = argv[1];
sci_event_t e;
int oldx, oldy;
- int modifier_mask = s->_version <= SCI_VERSION_0 ? SCI_EVM_ALL : SCI_EVM_NO_FOOLOCK;
+ int modifier_mask = s->_version <= SCI_VERSION_01 ? SCI_EVM_ALL : SCI_EVM_NO_FOOLOCK;
// If there's a simkey pending, and the game wants a keyboard event, use the
// simkey instead of a normal event
diff --git a/engines/sci/engine/kgraphics.cpp b/engines/sci/engine/kgraphics.cpp
index 915b07e8a3..da1a2ec413 100644
--- a/engines/sci/engine/kgraphics.cpp
+++ b/engines/sci/engine/kgraphics.cpp
@@ -304,9 +304,9 @@ static gfx_color_t graph_map_color(EngineState *s, int color, int priority, int
reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) {
switch (argc) {
case 1 :
- if (s->_version < SCI_VERSION_1) {
+ if (s->_version < SCI_VERSION_1_LATE) {
GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state, argv[0].toSint16()));
- } else if (s->_version == SCI_VERSION_1) {
+ } else if (s->_version < SCI_VERSION_1_1) {
if (argv[0].toSint16() <= 1) {
// Newer (SCI1.1) semantics: show/hide cursor
CursorMan.showMouse(argv[0].toSint16() != 0);
@@ -314,16 +314,16 @@ reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) {
// Pre-SCI1.1: set cursor according to the first parameter
GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state, argv[0].toSint16()));
}
- } else if (s->_version >= SCI_VERSION_1_1) {
+ } else {
// SCI1.1: Show/hide cursor
CursorMan.showMouse(argv[0].toSint16() != 0);
}
break;
case 2 :
- if (s->_version < SCI_VERSION_1) {
+ if (s->_version < SCI_VERSION_1_LATE) {
GFX_ASSERT(gfxop_set_pointer_cursor(s->gfx_state,
argv[1].toSint16() == 0 ? GFXOP_NO_POINTER : argv[0].toSint16()));
- } else if (s->_version == SCI_VERSION_1) {
+ } else if (s->_version < SCI_VERSION_1_1) {
// Pre-SCI1.1: set cursor according to the first parameter, and toggle its
// visibility based on the second parameter
// Some late SCI1 games actually use the SCI1.1 version of this call (EcoQuest 1
@@ -342,7 +342,7 @@ reg_t kSetCursor(EngineState *s, int funct_nr, int argc, reg_t *argv) {
GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state,
Common::Point(argv[0].toUint16(), argv[1].toUint16())));
}
- } else if (s->_version >= SCI_VERSION_1_1) {
+ } else {
// SCI1.1 and newer: set pointer position
GFX_ASSERT(gfxop_set_pointer_position(s->gfx_state,
Common::Point(argv[0].toUint16(), argv[1].toUint16())));
diff --git a/engines/sci/engine/kmovement.cpp b/engines/sci/engine/kmovement.cpp
index 8774224f60..58dc3b73f1 100644
--- a/engines/sci/engine/kmovement.cpp
+++ b/engines/sci/engine/kmovement.cpp
@@ -257,7 +257,7 @@ static void bresenham_autodetect(EngineState *s) {
reg_t motion_class;
if (!parse_reg_t(s, "?Motion", &motion_class)) {
- Object *obj = obj_get(s, motion_class);
+ Object *obj = obj_get(s->seg_manager, s->_version, motion_class);
reg_t fptr;
byte *buf;
@@ -274,7 +274,7 @@ static void bresenham_autodetect(EngineState *s) {
}
buf = s->seg_manager->getScript(fptr.segment)->buf + fptr.offset;
- handle_movecnt = (s->_version <= SCI_VERSION_0 || checksum_bytes(buf, 8) == 0x216) ? INCREMENT_MOVECNT : IGNORE_MOVECNT;
+ handle_movecnt = (s->_version <= SCI_VERSION_01 || checksum_bytes(buf, 8) == 0x216) ? INCREMENT_MOVECNT : IGNORE_MOVECNT;
printf("b-moveCnt action based on checksum: %s\n", handle_movecnt == IGNORE_MOVECNT ? "ignore" : "increment");
} else {
warning("bresenham_autodetect failed");
@@ -293,7 +293,7 @@ reg_t kDoBresen(EngineState *s, int funct_nr, int argc, reg_t *argv) {
int completed = 0;
int max_movcnt = GET_SEL32V(client, moveSpeed);
- if (s->_version > SCI_VERSION_0)
+ if (s->_version > SCI_VERSION_01)
signal &= ~_K_VIEW_SIG_FLAG_HIT_OBSTACLE;
if (handle_movecnt == UNINITIALIZED)
@@ -380,7 +380,7 @@ reg_t kDoBresen(EngineState *s, int funct_nr, int argc, reg_t *argv) {
completed = 1;
}
- if (s->_version > SCI_VERSION_0)
+ if (s->_version > SCI_VERSION_01)
if (completed)
invoke_selector(INV_SEL(mover, moveDone, kStopOnInvalidSelector), 0);
diff --git a/engines/sci/engine/kscripts.cpp b/engines/sci/engine/kscripts.cpp
index df25e11729..4d90dd68ac 100644
--- a/engines/sci/engine/kscripts.cpp
+++ b/engines/sci/engine/kscripts.cpp
@@ -108,7 +108,7 @@ int invoke_selector(EngineState *s, reg_t object, int selector_id, SelectorInvoc
}
bool is_object(EngineState *s, reg_t object) {
- return obj_get(s, object) != NULL;
+ return obj_get(s->seg_manager, s->_version, object) != NULL;
}
// Loads arbitrary resources of type 'restype' with resource numbers 'resnrs'
@@ -184,7 +184,7 @@ reg_t kResCheck(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t kClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t parent_addr = argv[0];
- Object *parent_obj = obj_get(s, parent_addr);
+ Object *parent_obj = obj_get(s->seg_manager, s->_version, parent_addr);
reg_t clone_addr;
Clone *clone_obj; // same as Object*
@@ -205,6 +205,8 @@ reg_t kClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
*clone_obj = *parent_obj;
clone_obj->flags = 0;
+ SciVersion version = s->_version; // for the selector defines
+
// Mark as clone
clone_obj->_variables[SCRIPT_INFO_SELECTOR].offset = SCRIPT_INFO_CLONE;
clone_obj->_variables[SCRIPT_SPECIES_SELECTOR] = clone_obj->pos;
@@ -220,7 +222,7 @@ extern void _k_view_list_mark_free(EngineState *s, reg_t off);
reg_t kDisposeClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
reg_t victim_addr = argv[0];
- Clone *victim_obj = obj_get(s, victim_addr);
+ Clone *victim_obj = obj_get(s->seg_manager, s->_version, victim_addr);
uint16 underBits;
if (!victim_obj) {
@@ -229,6 +231,8 @@ reg_t kDisposeClone(EngineState *s, int funct_nr, int argc, reg_t *argv) {
return s->r_acc;
}
+ SciVersion version = s->_version; // for the selector defines
+
if (victim_obj->_variables[SCRIPT_INFO_SELECTOR].offset != SCRIPT_INFO_CLONE) {
//warning("Attempt to dispose something other than a clone at %04x", offset);
// SCI silently ignores this behaviour; some games actually depend on it
@@ -260,7 +264,7 @@ reg_t kScriptID(EngineState *s, int funct_nr, int argc, reg_t *argv) {
int script = argv[0].toUint16();
int index = (argc > 1) ? argv[1].toUint16() : 0;
- SegmentId scriptid = script_get_segment(s, script, SCRIPT_GET_LOAD);
+ SegmentId scriptid = s->seg_manager->getSegment(script, SCRIPT_GET_LOAD);
Script *scr;
if (argv[0].segment)
@@ -299,13 +303,13 @@ reg_t kDisposeScript(EngineState *s, int funct_nr, int argc, reg_t *argv) {
scr->setLockers(1);
}
- script_uninstantiate(s, script);
+ script_uninstantiate(s->seg_manager, s->_version, script);
s->_executionStackPosChanged = true;
return s->r_acc;
}
int is_heap_object(EngineState *s, reg_t pos) {
- Object *obj = obj_get(s, pos);
+ Object *obj = obj_get(s->seg_manager, s->_version, pos);
return (obj != NULL && (!(obj->flags & OBJECT_FLAG_FREED)) && (!s->seg_manager->scriptIsMarkedAsDeleted(pos.segment)));
}
diff --git a/engines/sci/engine/ksound.cpp b/engines/sci/engine/ksound.cpp
index 8c113d35a3..38baeafad8 100644
--- a/engines/sci/engine/ksound.cpp
+++ b/engines/sci/engine/ksound.cpp
@@ -157,9 +157,9 @@ void process_sound_events(EngineState *s) { /* Get all sound events, apply their
SongHandle handle;
int cue;
- if (s->_version >= SCI_VERSION_01)
+ if (s->_version > SCI_VERSION_01)
return;
- /* SCI01 and later explicitly poll for everything */
+ /* SCI1 and later explicitly poll for everything */
while ((result = s->_sound.sfx_poll(&handle, &cue))) {
reg_t obj = DEFROBNICATE_HANDLE(handle);
diff --git a/engines/sci/engine/memobj.cpp b/engines/sci/engine/memobj.cpp
index ab8e14efc7..34432521a0 100644
--- a/engines/sci/engine/memobj.cpp
+++ b/engines/sci/engine/memobj.cpp
@@ -246,6 +246,7 @@ void Script::listAllDeallocatable(SegmentId segId, void *param, NoteCallback not
void Script::listAllOutgoingReferences(EngineState *s, reg_t addr, void *param, NoteCallback note) {
Script *script = this;
+ SciVersion version = s->_version; // for the offset defines
if (addr.offset <= script->buf_size && addr.offset >= -SCRIPT_OBJECT_MAGIC_OFFSET && RAW_IS_OBJECT(script->buf + addr.offset)) {
int idx = RAW_GET_CLASS_INDEX(script, addr);
diff --git a/engines/sci/engine/memobj.h b/engines/sci/engine/memobj.h
index 50c43a0e88..efe7f26f1c 100644
--- a/engines/sci/engine/memobj.h
+++ b/engines/sci/engine/memobj.h
@@ -27,6 +27,7 @@
#define SCI_ENGINE_MEMOBJ_H
#include "common/serializer.h"
+#include "sci/engine/vm.h"
#include "sci/engine/vm_types.h" // for reg_t
//#include "common/util.h"
diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp
index 6b481dfc25..1768695244 100644
--- a/engines/sci/engine/savegame.cpp
+++ b/engines/sci/engine/savegame.cpp
@@ -205,19 +205,21 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) {
}
static void sync_SegManagerPtr(Common::Serializer &s, SegManager *&obj) {
- bool sci11 = false;
+ SciVersion version = SCI_VERSION_AUTODETECT;
+ ResourceManager *resMgr = 0;
if (s.isSaving()) {
assert(obj);
- sci11 = obj->isSci1_1;
+ version = obj->_version;
+ resMgr = obj->_resMgr;
}
- s.syncAsByte(sci11);
+ s.skip(1); // obsolete: used to be a flag indicating if we got sci11 or not
if (s.isLoading()) {
// FIXME: Do in-place loading at some point, instead of creating a new EngineState instance from scratch.
delete obj;
- obj = new SegManager(sci11);
+ obj = new SegManager(resMgr, version);
}
obj->saveLoadWithSerializer(s);
@@ -266,7 +268,7 @@ void EngineState::saveLoadWithSerializer(Common::Serializer &s) {
sync_SegManagerPtr(s, seg_manager);
- syncArray<Class>(s, _classtable);
+ syncArray<Class>(s, seg_manager->_classtable);
sync_sfx_state_t(s, _sound);
}
@@ -549,7 +551,7 @@ static void load_script(EngineState *s, SegmentId seg) {
heap = s->resmgr->findResource(ResourceId(kResourceTypeHeap, scr->nr), 0);
memcpy(scr->buf, script->data, script->size);
- if (s->seg_manager->isSci1_1)
+ if (s->seg_manager->_version == SCI_VERSION_1_1)
memcpy(scr->buf + scr->script_size, heap->data, heap->size);
}
@@ -557,6 +559,8 @@ static void load_script(EngineState *s, SegmentId seg) {
static void reconstruct_scripts(EngineState *s, SegManager *self) {
uint i, j;
MemObject *mobj;
+ SciVersion version = s->_version; // for the selector defines
+
for (i = 0; i < self->_heap.size(); i++) {
if (self->_heap[i]) {
mobj = self->_heap[i];
@@ -567,7 +571,7 @@ static void reconstruct_scripts(EngineState *s, SegManager *self) {
// FIXME: Unify this code with script_instantiate_*
load_script(s, i);
scr->locals_block = (scr->locals_segment == 0) ? NULL : (LocalVariables *)(s->seg_manager->_heap[scr->locals_segment]);
- if (s->seg_manager->isSci1_1) {
+ if (s->seg_manager->_version == SCI_VERSION_1_1) {
scr->export_table = 0;
scr->synonyms = 0;
if (READ_LE_UINT16(scr->buf + 6) > 0) {
@@ -603,7 +607,7 @@ static void reconstruct_scripts(EngineState *s, SegManager *self) {
for (j = 0; j < scr->_objects.size(); j++) {
byte *data = scr->buf + scr->_objects[j].pos.offset;
- if (self->isSci1_1) {
+ if (self->_version == SCI_VERSION_1_1) {
uint16 *funct_area = (uint16 *) (scr->buf + READ_LE_UINT16( data + 6 ));
uint16 *prop_area = (uint16 *) (scr->buf + READ_LE_UINT16( data + 4 ));
@@ -613,7 +617,7 @@ static void reconstruct_scripts(EngineState *s, SegManager *self) {
int funct_area = READ_LE_UINT16( data + SCRIPT_FUNCTAREAPTR_OFFSET );
Object *base_obj;
- base_obj = obj_get(s, scr->_objects[j]._variables[SCRIPT_SPECIES_SELECTOR]);
+ base_obj = obj_get(s->seg_manager, s->_version, scr->_objects[j]._variables[SCRIPT_SPECIES_SELECTOR]);
if (!base_obj) {
warning("Object without a base class: Script %d, index %d (reg address %04x:%04x",
@@ -638,6 +642,8 @@ static void reconstruct_scripts(EngineState *s, SegManager *self) {
// FIXME: The following should likely become a SegManager method
static void reconstruct_clones(EngineState *s, SegManager *self) {
+ SciVersion version = s->_version; // for the selector defines
+
for (uint i = 0; i < self->_heap.size(); i++) {
if (self->_heap[i]) {
MemObject *mobj = self->_heap[i];
@@ -667,7 +673,7 @@ static void reconstruct_clones(EngineState *s, SegManager *self) {
continue;
}
CloneTable::Entry &seeker = ct->_table[j];
- base_obj = obj_get(s, seeker._variables[SCRIPT_SPECIES_SELECTOR]);
+ base_obj = obj_get(s->seg_manager, s->_version, seeker._variables[SCRIPT_SPECIES_SELECTOR]);
if (!base_obj) {
printf("Clone entry without a base class: %d\n", j);
seeker.base = seeker.base_obj = NULL;
@@ -693,7 +699,13 @@ int _reset_graphics_input(EngineState *s);
static void reconstruct_sounds(EngineState *s) {
Song *seeker;
- SongIteratorType it_type = s->resmgr->sciVersion() >= SCI_VERSION_01 ? SCI_SONG_ITERATOR_TYPE_SCI1 : SCI_SONG_ITERATOR_TYPE_SCI0;
+ SongIteratorType it_type;
+
+ if (((SciEngine *)g_engine)->getKernel()->usesSci01SoundFunctions()
+ || ((SciEngine *)g_engine)->getKernel()->usesSci1SoundFunctions())
+ it_type = SCI_SONG_ITERATOR_TYPE_SCI1;
+ else
+ it_type = SCI_SONG_ITERATOR_TYPE_SCI0;
seeker = s->_sound._songlib._lib;
@@ -785,7 +797,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
reconstruct_scripts(retval, retval->seg_manager);
reconstruct_clones(retval, retval->seg_manager);
retval->game_obj = s->game_obj;
- retval->script_000 = retval->seg_manager->getScript(script_get_segment(s, 0, SCRIPT_GET_DONT_LOAD));
+ retval->script_000 = retval->seg_manager->getScript(retval->seg_manager->getSegment(0, SCRIPT_GET_DONT_LOAD));
retval->gc_countdown = GC_INTERVAL - 1;
retval->sys_strings_segment = find_unique_seg_by_type(retval->seg_manager, MEM_OBJ_SYS_STRINGS);
retval->sys_strings = (SystemStrings *)GET_SEGMENT(*retval->seg_manager, retval->sys_strings_segment, MEM_OBJ_SYS_STRINGS);
@@ -825,7 +837,7 @@ EngineState *gamestate_restore(EngineState *s, Common::SeekableReadStream *fh) {
retval->successor = NULL;
retval->pic_priority_table = (int *)gfxop_get_pic_metainfo(retval->gfx_state);
- retval->_gameName = obj_get_name(retval, retval->game_obj);
+ retval->_gameName = obj_get_name(retval->seg_manager, retval->_version, retval->game_obj);
retval->_sound._it = NULL;
retval->_sound._flags = s->_sound._flags;
diff --git a/engines/sci/engine/script.cpp b/engines/sci/engine/script.cpp
index 667c429821..6e47a73b18 100644
--- a/engines/sci/engine/script.cpp
+++ b/engines/sci/engine/script.cpp
@@ -88,18 +88,11 @@ opcode_format g_opcode_formats[128][4] = {
};
#undef END
-void script_adjust_opcode_formats(int res_version) {
- switch (res_version) {
- case SCI_VERSION_0:
- break;
- case SCI_VERSION_01:
- case SCI_VERSION_1:
- case SCI_VERSION_1_1:
+void script_adjust_opcode_formats(SciVersion version) {
+ // TODO: Check that this is correct
+ if ((version >= SCI_VERSION_1_1) || ((SciEngine*)g_engine)->getKernel()->hasLofsAbsolute()) {
g_opcode_formats[op_lofsa][0] = Script_Offset;
g_opcode_formats[op_lofss][0] = Script_Offset;
- break;
- default:
- error("script_adjust_opcode_formats(): Unknown script version %d\n", res_version);
}
}
diff --git a/engines/sci/engine/script.h b/engines/sci/engine/script.h
index 98e5b08bb9..dd5980eafe 100644
--- a/engines/sci/engine/script.h
+++ b/engines/sci/engine/script.h
@@ -202,7 +202,7 @@ enum sci_opcodes { /* FIXME */
extern opcode_format g_opcode_formats[128][4];
-void script_adjust_opcode_formats(int res_version);
+void script_adjust_opcode_formats(SciVersion version);
void script_free_breakpoints(EngineState *s);
diff --git a/engines/sci/engine/scriptdebug.cpp b/engines/sci/engine/scriptdebug.cpp
index 0341ecb73d..fd7219bc85 100644
--- a/engines/sci/engine/scriptdebug.cpp
+++ b/engines/sci/engine/scriptdebug.cpp
@@ -37,9 +37,10 @@ extern const char *selector_name(EngineState *s, int selector);
ScriptState scriptState;
int propertyOffsetToId(EngineState *s, int prop_ofs, reg_t objp) {
- Object *obj = obj_get(s, objp);
+ Object *obj = obj_get(s->seg_manager, s->_version, objp);
byte *selectoroffset;
int selectors;
+ SciVersion version = s->_version; // for the selector defines
if (!obj) {
warning("Applied propertyOffsetToId on non-object at %04x:%04x", PRINT_REG(objp));
@@ -52,7 +53,7 @@ int propertyOffsetToId(EngineState *s, int prop_ofs, reg_t objp) {
selectoroffset = ((byte *)(obj->base_obj)) + SCRIPT_SELECTOR_OFFSET + selectors * 2;
else {
if (!(obj->_variables[SCRIPT_INFO_SELECTOR].offset & SCRIPT_INFO_CLASS)) {
- obj = obj_get(s, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
+ obj = obj_get(s->seg_manager, s->_version, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
selectoroffset = (byte *)obj->base_vars;
} else
selectoroffset = (byte *)obj->base_vars;
@@ -268,7 +269,7 @@ reg_t disassemble(EngineState *s, reg_t pos, int print_bw_tag, int print_bytecod
selector = sb[- stackframe].offset;
- name = obj_get_name(s, called_obj_addr);
+ name = obj_get_name(s->seg_manager, s->_version, called_obj_addr);
if (!name)
name = "<invalid>";
diff --git a/engines/sci/engine/seg_manager.cpp b/engines/sci/engine/seg_manager.cpp
index 905cba9d94..f47a874528 100644
--- a/engines/sci/engine/seg_manager.cpp
+++ b/engines/sci/engine/seg_manager.cpp
@@ -52,7 +52,7 @@ namespace Sci {
#define INVALID_SCRIPT_ID -1
-SegManager::SegManager(bool sci1_1) {
+SegManager::SegManager(ResourceManager *resMgr, SciVersion version) {
id_seg_map = new IntMapper();
reserved_id = INVALID_SCRIPT_ID;
id_seg_map->checkKey(reserved_id, true); // reserve entry 0 for INVALID_SCRIPT_ID
@@ -66,7 +66,8 @@ SegManager::SegManager(bool sci1_1) {
Hunks_seg_id = 0;
exports_wide = 0;
- isSci1_1 = sci1_1;
+ _version = version;
+ _resMgr = resMgr;
}
// Destroy the object, free the memorys if allocated before
@@ -109,7 +110,7 @@ MemObject *SegManager::allocNonscriptSegment(MemObjectType type, SegmentId *segi
// Returns : 0 - allocation failure
// 1 - allocated successfully
// seg_id - allocated segment id
-Script *SegManager::allocateScript(EngineState *s, int script_nr, SegmentId *seg_id) {
+Script *SegManager::allocateScript(int script_nr, SegmentId *seg_id) {
bool was_added;
MemObject *mem;
@@ -128,20 +129,20 @@ Script *SegManager::allocateScript(EngineState *s, int script_nr, SegmentId *seg
return (Script *)mem;
}
-void SegManager::setScriptSize(Script &scr, EngineState *s, int script_nr) {
- Resource *script = s->resmgr->findResource(ResourceId(kResourceTypeScript, script_nr), 0);
- Resource *heap = s->resmgr->findResource(ResourceId(kResourceTypeHeap, script_nr), 0);
+void SegManager::setScriptSize(Script &scr, int script_nr) {
+ Resource *script = _resMgr->findResource(ResourceId(kResourceTypeScript, script_nr), 0);
+ Resource *heap = _resMgr->findResource(ResourceId(kResourceTypeHeap, script_nr), 0);
scr.script_size = script->size;
scr.heap_size = 0; // Set later
- if (!script || (s->_version >= SCI_VERSION_1_1 && !heap)) {
+ if (!script || (_version >= SCI_VERSION_1_1 && !heap)) {
error("SegManager::setScriptSize: failed to load %s", !script ? "script" : "heap");
}
if (((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()) {
scr.buf_size = script->size + READ_LE_UINT16(script->data) * 2;
//locals_size = READ_LE_UINT16(script->data) * 2;
- } else if (s->_version < SCI_VERSION_1_1) {
+ } else if (_version < SCI_VERSION_1_1) {
scr.buf_size = script->size;
} else {
scr.buf_size = script->size + heap->size;
@@ -163,10 +164,10 @@ void SegManager::setScriptSize(Script &scr, EngineState *s, int script_nr) {
}
}
-int SegManager::initialiseScript(Script &scr, EngineState *s, int script_nr) {
+int SegManager::initialiseScript(Script &scr, int script_nr) {
// allocate the script.buf
- setScriptSize(scr, s, script_nr);
+ setScriptSize(scr, script_nr);
scr.buf = (byte *)malloc(scr.buf_size);
#ifdef DEBUG_SEG_MANAGER
@@ -191,7 +192,7 @@ int SegManager::initialiseScript(Script &scr, EngineState *s, int script_nr) {
scr.obj_indices = new IntMapper();
- if (s->_version >= SCI_VERSION_1_1)
+ if (_version >= SCI_VERSION_1_1)
scr.heap_start = scr.buf + scr.script_size;
else
scr.heap_start = scr.buf;
@@ -319,7 +320,7 @@ int SegManager::relocateBlock(Common::Array<reg_t> &block, int block_location, S
return 0;
}
block[idx].segment = segment; // Perform relocation
- if (isSci1_1)
+ if (_version == SCI_VERSION_1_1)
block[idx].offset += getScript(segment)->script_size;
return 1;
@@ -429,13 +430,51 @@ void SegManager::heapRelocate(reg_t block) {
}
}
-#define INST_LOOKUP_CLASS(id) ((id == 0xffff) ? NULL_REG : get_class_address(s, id, SCRIPT_GET_LOCK, NULL_REG))
+SegmentId SegManager::getSegment(int script_nr, SCRIPT_GET load) {
+ SegmentId segment;
-reg_t get_class_address(EngineState *s, int classnr, SCRIPT_GET lock, reg_t caller);
+ if ((load & SCRIPT_GET_LOAD) == SCRIPT_GET_LOAD)
+ script_instantiate(_resMgr, this, _version, script_nr);
-Object *SegManager::scriptObjInit0(EngineState *s, reg_t obj_pos) {
+ segment = segGet(script_nr);
+
+ if (segment > 0) {
+ if ((load & SCRIPT_GET_LOCK) == SCRIPT_GET_LOCK)
+ getScript(segment)->incrementLockers();
+
+ return segment;
+ } else
+ return 0;
+}
+
+#define INST_LOOKUP_CLASS(id) ((id == 0xffff) ? NULL_REG : get_class_address(id, SCRIPT_GET_LOCK, NULL_REG))
+
+reg_t SegManager::get_class_address(int classnr, SCRIPT_GET lock, reg_t caller) {
+ if (classnr < 0 || (int)_classtable.size() <= classnr || _classtable[classnr].script < 0) {
+ error("[VM] Attempt to dereference class %x, which doesn't exist (max %x)", classnr, _classtable.size());
+ return NULL_REG;
+ } else {
+ Class *the_class = &_classtable[classnr];
+ if (!the_class->reg.segment) {
+ getSegment(the_class->script, lock);
+
+ if (!the_class->reg.segment) {
+ error("[VM] Trying to instantiate class %x by instantiating script 0x%x (%03d) failed;"
+ " Entering debugger.", classnr, the_class->script, the_class->script);
+ return NULL_REG;
+ }
+ } else
+ if (caller.segment != the_class->reg.segment)
+ getScript(the_class->reg.segment)->incrementLockers();
+
+ return the_class->reg;
+ }
+}
+
+Object *SegManager::scriptObjInit0(reg_t obj_pos) {
Object *obj;
int id;
+ SciVersion version = _version; // for the offset defines
unsigned int base = obj_pos.offset - SCRIPT_OBJECT_MAGIC_OFFSET;
reg_t temp;
@@ -489,7 +528,7 @@ Object *SegManager::scriptObjInit0(EngineState *s, reg_t obj_pos) {
return obj;
}
-Object *SegManager::scriptObjInit11(EngineState *s, reg_t obj_pos) {
+Object *SegManager::scriptObjInit11(reg_t obj_pos) {
Object *obj;
int id;
int base = obj_pos.offset;
@@ -543,11 +582,11 @@ Object *SegManager::scriptObjInit11(EngineState *s, reg_t obj_pos) {
return obj;
}
-Object *SegManager::scriptObjInit(EngineState *s, reg_t obj_pos) {
- if (!isSci1_1)
- return scriptObjInit0(s, obj_pos);
+Object *SegManager::scriptObjInit(reg_t obj_pos) {
+ if (_version != SCI_VERSION_1_1)
+ return scriptObjInit0(obj_pos);
else
- return scriptObjInit11(s, obj_pos);
+ return scriptObjInit11(obj_pos);
}
LocalVariables *SegManager::allocLocalsSegment(Script *scr, int count) {
@@ -588,7 +627,7 @@ void SegManager::scriptInitialiseLocals(reg_t location) {
VERIFY(location.offset + 1 < (uint16)scr->buf_size, "Locals beyond end of script\n");
- if (isSci1_1)
+ if (_version == SCI_VERSION_1_1)
count = READ_LE_UINT16(scr->buf + location.offset - 2);
else
count = (READ_LE_UINT16(scr->buf + location.offset - 2) - 4) >> 1;
@@ -627,24 +666,25 @@ void SegManager::scriptRelocateExportsSci11(SegmentId seg) {
}
}
-void SegManager::scriptInitialiseObjectsSci11(EngineState *s, SegmentId seg) {
+void SegManager::scriptInitialiseObjectsSci11(SegmentId seg) {
Script *scr = getScript(seg);
byte *seeker = scr->heap_start + 4 + READ_LE_UINT16(scr->heap_start + 2) * 2;
+ SciVersion version = _version; // for the selector defines
while (READ_LE_UINT16(seeker) == SCRIPT_OBJECT_MAGIC_NUMBER) {
if (READ_LE_UINT16(seeker + 14) & SCRIPT_INFO_CLASS) {
int classpos = seeker - scr->buf;
int species = READ_LE_UINT16(seeker + 10);
- if (species < 0 || species >= (int)s->_classtable.size()) {
+ if (species < 0 || species >= (int)_classtable.size()) {
error("Invalid species %d(0x%x) not in interval [0,%d) while instantiating script %d\n",
- species, species, s->_classtable.size(), scr->nr);
+ species, species, _classtable.size(), scr->nr);
return;
}
- s->_classtable[species].script = scr->nr;
- s->_classtable[species].reg.segment = seg;
- s->_classtable[species].reg.offset = classpos;
+ _classtable[species].script = scr->nr;
+ _classtable[species].reg.segment = seg;
+ _classtable[species].reg.offset = classpos;
}
seeker += READ_LE_UINT16(seeker + 2) * 2;
}
@@ -656,12 +696,12 @@ void SegManager::scriptInitialiseObjectsSci11(EngineState *s, SegmentId seg) {
reg.segment = seg;
reg.offset = seeker - scr->buf;
- obj = scriptObjInit(s, reg);
+ obj = scriptObjInit(reg);
#if 0
if (obj->_variables[5].offset != 0xffff) {
obj->_variables[5] = INST_LOOKUP_CLASS(obj->_variables[5].offset);
- base_obj = obj_get(s, obj->_variables[5]);
+ base_obj = obj_get(s->seg_manager, s->_version, obj->_variables[5]);
obj->variable_names_nr = base_obj->variables_nr;
obj->base_obj = base_obj->base_obj;
}
diff --git a/engines/sci/engine/seg_manager.h b/engines/sci/engine/seg_manager.h
index 9d406f559f..f73c788b37 100644
--- a/engines/sci/engine/seg_manager.h
+++ b/engines/sci/engine/seg_manager.h
@@ -43,12 +43,22 @@ namespace Sci {
(((mgr)._heap[index] && ((mgr)._heap[index]->getType() == MEM_OBJ_SCRIPT || (mgr)._heap[index]->getType() == MEM_OBJ_CLONES))? (mgr)._heap[index] \
: NULL): NULL)
+/**
+ * Parameters for getSegment()
+ */
+typedef enum {
+ SCRIPT_GET_DONT_LOAD = 0, /**< Fail if not loaded */
+ SCRIPT_GET_LOAD = 1, /**< Load, if neccessary */
+ SCRIPT_GET_LOCK = 3 /**< Load, if neccessary, and lock */
+} SCRIPT_GET;
+
+
class SegManager : public Common::Serializable {
public:
/**
* Initialize the segment manager
*/
- SegManager(bool sci1_1);
+ SegManager(ResourceManager *resMgr, SciVersion version);
/**
* Deallocate all memory associated with the segment manager
@@ -61,14 +71,12 @@ public:
/**
* Allocate a script into the segment manager
- * @param s The state containing resource manager
- * handlers to load the script data
* @param script_nr The number of the script to load
* @param seg_id The segment ID of the newly allocated segment,
* on success
* @return 0 on failure, 1 on success
*/
- Script *allocateScript(EngineState *s, int script_nr, SegmentId *seg_id);
+ Script *allocateScript(int script_nr, SegmentId *seg_id);
// The script must then be initialised; see section (1b.), below.
@@ -154,7 +162,7 @@ public:
* @returns A newly created Object describing the object,
* stored within the relevant script
*/
- Object *scriptObjInit(EngineState *s, reg_t obj_pos);
+ Object *scriptObjInit(reg_t obj_pos);
/**
* Informs the segment manager that a code block must be relocated
@@ -317,13 +325,20 @@ public:
*/
byte *dereference(reg_t reg, int *size);
-
+ /**
+ * Determines the segment occupied by a certain script
+ * @param[in] script_id The script in question
+ * @param[in] load One of SCRIPT_GET_*
+ * @return The script's segment, or 0 on failure
+ */
+ SegmentId getSegment(int script_nr, SCRIPT_GET load);
+ reg_t get_class_address(int classnr, SCRIPT_GET lock, reg_t caller);
void heapRelocate(reg_t block);
void scriptRelocateExportsSci11(SegmentId seg);
- void scriptInitialiseObjectsSci11(EngineState *s, SegmentId seg);
- int initialiseScript(Script &scr, EngineState *s, int script_nr);
+ void scriptInitialiseObjectsSci11(SegmentId seg);
+ int initialiseScript(Script &scr, int script_nr);
private:
IntMapper *id_seg_map; ///< id - script id; seg - index of heap
@@ -331,7 +346,9 @@ public: // TODO: make private
Common::Array<MemObject *> _heap;
int reserved_id;
int exports_wide;
- bool isSci1_1;
+ SciVersion _version;
+ ResourceManager *_resMgr;
+ Common::Array<Class> _classtable; /**< Table of all classes */
SegmentId Clones_seg_id; ///< ID of the (a) clones segment
SegmentId Lists_seg_id; ///< ID of the (a) list segment
@@ -351,9 +368,9 @@ private:
int relocateObject(Object *obj, SegmentId segment, int location);
int findFreeId(int *id);
- static void setScriptSize(Script &scr, EngineState *s, int script_nr);
- Object *scriptObjInit0(EngineState *s, reg_t obj_pos);
- Object *scriptObjInit11(EngineState *s, reg_t obj_pos);
+ void setScriptSize(Script &scr, int script_nr);
+ Object *scriptObjInit0(reg_t obj_pos);
+ Object *scriptObjInit11(reg_t obj_pos);
/**
* Check segment validity
diff --git a/engines/sci/engine/state.h b/engines/sci/engine/state.h
index 2fa1bd82a6..c8e9139f27 100644
--- a/engines/sci/engine/state.h
+++ b/engines/sci/engine/state.h
@@ -129,7 +129,7 @@ public:
SpeedThrottler(SciVersion version) {
if (version >= SCI_VERSION_1_1)
_maxInstructions = 3300;
- else if (version >= SCI_VERSION_1)
+ else if (version >= SCI_VERSION_1_EARLY)
_maxInstructions = 2200;
else
_maxInstructions = 1100;
@@ -291,8 +291,6 @@ public:
reg_t game_obj; /**< Pointer to the game object */
- Common::Array<Class> _classtable; /**< Table of all classes */
-
SegManager *seg_manager;
int gc_countdown; /**< Number of kernel calls until next gc */
diff --git a/engines/sci/engine/vm.cpp b/engines/sci/engine/vm.cpp
index ae07c314d4..fbd3bc3baf 100644
--- a/engines/sci/engine/vm.cpp
+++ b/engines/sci/engine/vm.cpp
@@ -187,34 +187,6 @@ static void validate_write_var(reg_t *r, reg_t *stack_base, int type, int max, i
#define OBJ_PROPERTY(o, p) (validate_property(o, p))
-reg_t get_class_address(EngineState *s, int classnr, SCRIPT_GET lock, reg_t caller) {
-
- if (NULL == s) {
- warning("vm.c: get_class_address(): NULL passed for \"s\"");
- return NULL_REG;
- }
-
- if (classnr < 0 || (int)s->_classtable.size() <= classnr || s->_classtable[classnr].script < 0) {
- error("[VM] Attempt to dereference class %x, which doesn't exist (max %x)", classnr, s->_classtable.size());
- return NULL_REG;
- } else {
- Class *the_class = &s->_classtable[classnr];
- if (!the_class->reg.segment) {
- script_get_segment(s, the_class->script, lock);
-
- if (!the_class->reg.segment) {
- error("[VM] Trying to instantiate class %x by instantiating script 0x%x (%03d) failed;"
- " Entering debugger.", classnr, the_class->script, the_class->script);
- return NULL_REG;
- }
- } else
- if (caller.segment != the_class->reg.segment)
- s->seg_manager->getScript(the_class->reg.segment)->incrementLockers();
-
- return the_class->reg;
- }
-}
-
// Operating on the stack
// 16 bit:
#define PUSH(v) PUSH32(make_reg(0, v))
@@ -236,7 +208,7 @@ ExecStack *execute_method(EngineState *s, uint16 script, uint16 pubfunct, StackP
Script *scr = s->seg_manager->getScriptIfLoaded(seg);
if (!scr) // Script not present yet?
- seg = script_instantiate(s, script);
+ seg = script_instantiate(s->resmgr, s->seg_manager, s->_version, script);
else
scr->unmarkDeleted();
@@ -313,7 +285,7 @@ ExecStack *send_selector(EngineState *s, reg_t send_obj, reg_t work_obj, StackPt
Breakpoint *bp;
char method_name [256];
- sprintf(method_name, "%s::%s", obj_get_name(s, send_obj), ((SciEngine*)g_engine)->getKernel()->getSelectorName(selector).c_str());
+ sprintf(method_name, "%s::%s", obj_get_name(s->seg_manager, s->_version, send_obj), ((SciEngine*)g_engine)->getKernel()->getSelectorName(selector).c_str());
bp = s->bp_list;
while (bp) {
@@ -501,10 +473,6 @@ void vm_handle_fatal_error(EngineState *s, int line, const char *file) {
error("Fatal VM error in %s, L%d; aborting...", file, line);
}
-static Script *script_locate_by_segment(EngineState *s, SegmentId seg) {
- return s->seg_manager->getScriptIfLoaded(seg);
-}
-
static reg_t pointer_add(EngineState *s, reg_t base, int offset) {
MemObject *mobj = GET_SEGMENT_ANY(*s->seg_manager, base.segment);
@@ -559,8 +527,8 @@ void run_vm(EngineState *s, int restoring) {
// Current execution data:
scriptState.xs = &(s->_executionStack.back());
ExecStack *xs_new = NULL;
- Object *obj = obj_get(s, scriptState.xs->objp);
- Script *local_script = script_locate_by_segment(s, scriptState.xs->local_segment);
+ Object *obj = obj_get(s->seg_manager, s->_version, scriptState.xs->objp);
+ Script *local_script = s->seg_manager->getScriptIfLoaded(scriptState.xs->local_segment);
int old_execution_stack_base = s->execution_stack_base;
// Used to detect the stack bottom, for "physical" returns
const byte *code_buf = NULL; // (Avoid spurious warning)
@@ -606,7 +574,7 @@ void run_vm(EngineState *s, int restoring) {
scriptState.xs = &(s->_executionStack.back());
s->_executionStackPosChanged = false;
- scr = script_locate_by_segment(s, scriptState.xs->addr.pc.segment);
+ scr = s->seg_manager->getScriptIfLoaded(scriptState.xs->addr.pc.segment);
if (!scr) {
// No script? Implicit return via fake instruction buffer
warning("Running on non-existant script in segment %x", scriptState.xs->addr.pc.segment);
@@ -619,12 +587,12 @@ void run_vm(EngineState *s, int restoring) {
scr = NULL;
obj = NULL;
} else {
- obj = obj_get(s, scriptState.xs->objp);
+ obj = obj_get(s->seg_manager, s->_version, scriptState.xs->objp);
code_buf = scr->buf;
#ifndef DISABLE_VALIDATIONS
code_buf_size = scr->buf_size;
#endif
- local_script = script_locate_by_segment(s, scriptState.xs->local_segment);
+ local_script = s->seg_manager->getScriptIfLoaded(scriptState.xs->local_segment);
if (!local_script) {
warning("Could not find local script from segment %x", scriptState.xs->local_segment);
local_script = NULL;
@@ -1077,7 +1045,7 @@ void run_vm(EngineState *s, int restoring) {
break;
case 0x28: // class
- s->r_acc = get_class_address(s, (unsigned)opparams[0], SCRIPT_GET_LOCK,
+ s->r_acc = s->seg_manager->get_class_address((unsigned)opparams[0], SCRIPT_GET_LOCK,
scriptState.xs->addr.pc);
break;
@@ -1097,7 +1065,7 @@ void run_vm(EngineState *s, int restoring) {
break;
case 0x2b: // super
- r_temp = get_class_address(s, opparams[0], SCRIPT_GET_LOAD, scriptState.xs->addr.pc);
+ r_temp = s->seg_manager->get_class_address(opparams[0], SCRIPT_GET_LOAD, scriptState.xs->addr.pc);
if (!r_temp.segment)
error("[VM]: Invalid superclass in object");
@@ -1432,6 +1400,7 @@ void run_vm(EngineState *s, int restoring) {
static int _obj_locate_varselector(EngineState *s, Object *obj, Selector slc) {
// Determines if obj explicitly defines slc as a varselector
// Returns -1 if not found
+ SciVersion version = s->_version; // for the selector defines
if (s->_version < SCI_VERSION_1_1) {
int varnum = obj->variable_names_nr;
@@ -1452,7 +1421,7 @@ static int _obj_locate_varselector(EngineState *s, Object *obj, Selector slc) {
int varnum = obj->_variables[1].offset;
if (!(obj->_variables[SCRIPT_INFO_SELECTOR].offset & SCRIPT_INFO_CLASS))
- buf = ((byte *) obj_get(s, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR])->base_vars);
+ buf = ((byte *) obj_get(s->seg_manager, s->_version, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR])->base_vars);
for (i = 0; i < varnum; i++)
if (READ_LE_UINT16(buf + (i << 1)) == slc) // Found it?
@@ -1478,6 +1447,7 @@ static int _class_locate_funcselector(EngineState *s, Object *obj, Selector slc)
static SelectorType _lookup_selector_function(EngineState *s, int seg_id, Object *obj, Selector selector_id, reg_t *fptr) {
int index;
+ SciVersion version = s->_version; // for the selector defines
// "recursive" lookup
@@ -1492,7 +1462,7 @@ static SelectorType _lookup_selector_function(EngineState *s, int seg_id, Object
return kSelectorMethod;
} else {
seg_id = obj->_variables[SCRIPT_SUPERCLASS_SELECTOR].segment;
- obj = obj_get(s, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
+ obj = obj_get(s->seg_manager, s->_version, obj->_variables[SCRIPT_SUPERCLASS_SELECTOR]);
}
}
@@ -1500,9 +1470,10 @@ static SelectorType _lookup_selector_function(EngineState *s, int seg_id, Object
}
SelectorType lookup_selector(EngineState *s, reg_t obj_location, Selector selector_id, ObjVarRef *varp, reg_t *fptr) {
- Object *obj = obj_get(s, obj_location);
+ Object *obj = obj_get(s->seg_manager, s->_version, obj_location);
Object *species;
int index;
+ SciVersion version = s->_version; // for the selector defines
// Early SCI versions used the LSB in the selector ID as a read/write
// toggle, meaning that we must remove it for selector lookup.
@@ -1517,7 +1488,7 @@ SelectorType lookup_selector(EngineState *s, reg_t obj_location, Selector select
if (IS_CLASS(obj))
species = obj;
else
- species = obj_get(s, obj->_variables[SCRIPT_SPECIES_SELECTOR]);
+ species = obj_get(s->seg_manager, s->_version, obj->_variables[SCRIPT_SPECIES_SELECTOR]);
if (!obj) {
@@ -1540,65 +1511,27 @@ SelectorType lookup_selector(EngineState *s, reg_t obj_location, Selector select
return _lookup_selector_function(s, obj_location.segment, obj, selector_id, fptr);
}
-SegmentId script_get_segment(EngineState *s, int script_nr, SCRIPT_GET load) {
- SegmentId segment;
-
- if ((load & SCRIPT_GET_LOAD) == SCRIPT_GET_LOAD)
- script_instantiate(s, script_nr);
-
- segment = s->seg_manager->segGet(script_nr);
-
- if (segment > 0) {
- if ((load & SCRIPT_GET_LOCK) == SCRIPT_GET_LOCK)
- s->seg_manager->getScript(segment)->incrementLockers();
-
- return segment;
- } else
- return 0;
+reg_t script_lookup_export(SegManager *segManager, int script_nr, int export_index) {
+ SegmentId seg = segManager->getSegment(script_nr, SCRIPT_GET_DONT_LOAD);
+ Script *script = segManager->getScriptIfLoaded(seg);
+ return make_reg(seg, READ_LE_UINT16((byte *)(script->export_table + export_index)));
}
-reg_t script_lookup_export(EngineState *s, int script_nr, int export_index) {
- SegmentId seg = script_get_segment(s, script_nr, SCRIPT_GET_DONT_LOAD);
- Script *script = NULL;
+#define INST_LOOKUP_CLASS(id) ((id == 0xffff)? NULL_REG : segManager->get_class_address(id, SCRIPT_GET_LOCK, reg))
-#ifndef DISABLE_VALIDATIONS
- if (!seg)
- error("script_lookup_export(): script.%03d (0x%x) is invalid or not loaded",
- script_nr, script_nr);
-#endif
-
- script = script_locate_by_segment(s, seg);
-
-#ifndef DISABLE_VALIDATIONS
- if (script && export_index < script->exports_nr && export_index >= 0)
-#endif
- return make_reg(seg, READ_LE_UINT16((byte *)(script->export_table + export_index)));
-#ifndef DISABLE_VALIDATIONS
- else {
- if (!script)
- error("script_lookup_export(): script.%03d missing", script_nr);
- else
- error("script_lookup_export(): script.%03d: Sought invalid export %d/%d",
- script_nr, export_index, script->exports_nr);
- }
-#endif
-}
-
-#define INST_LOOKUP_CLASS(id) ((id == 0xffff)? NULL_REG : get_class_address(s, id, SCRIPT_GET_LOCK, reg))
-
-int script_instantiate_common(EngineState *s, int script_nr, Resource **script, Resource **heap, int *was_new) {
+int script_instantiate_common(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr, Resource **script, Resource **heap, int *was_new) {
int seg_id;
reg_t reg;
*was_new = 1;
- *script = s->resmgr->findResource(ResourceId(kResourceTypeScript, script_nr), 0);
- if (s->_version >= SCI_VERSION_1_1)
- *heap = s->resmgr->findResource(ResourceId(kResourceTypeHeap, script_nr), 0);
+ *script = resMgr->findResource(ResourceId(kResourceTypeScript, script_nr), 0);
+ if (version >= SCI_VERSION_1_1)
+ *heap = resMgr->findResource(ResourceId(kResourceTypeHeap, script_nr), 0);
- if (!*script || (s->_version >= SCI_VERSION_1_1 && !heap)) {
+ if (!*script || (version >= SCI_VERSION_1_1 && !heap)) {
warning("Script 0x%x requested but not found", script_nr);
- if (s->_version >= SCI_VERSION_1_1) {
+ if (version >= SCI_VERSION_1_1) {
if (*heap)
warning("Inconsistency: heap resource WAS found");
else if (*script)
@@ -1607,13 +1540,8 @@ int script_instantiate_common(EngineState *s, int script_nr, Resource **script,
return 0;
}
- if (NULL == s) {
- warning("script_instantiate_common(): script_instantiate(): NULL passed for \"s\"");
- return 0;
- }
-
- seg_id = s->seg_manager->segGet(script_nr);
- Script *scr = script_locate_by_segment(s, seg_id);
+ seg_id = segManager->segGet(script_nr);
+ Script *scr = segManager->getScriptIfLoaded(seg_id);
if (scr) {
if (!scr->isMarkedAsDeleted()) {
scr->incrementLockers();
@@ -1622,14 +1550,14 @@ int script_instantiate_common(EngineState *s, int script_nr, Resource **script,
scr->freeScript();
}
} else {
- scr = s->seg_manager->allocateScript(s, script_nr, &seg_id);
+ scr = segManager->allocateScript(script_nr, &seg_id);
if (!scr) { // ALL YOUR SCRIPT BASE ARE BELONG TO US
error("Not enough heap space for script size 0x%x of script 0x%x (Should this happen?)", (*script)->size, script_nr);
return 0;
}
}
- s->seg_manager->initialiseScript(*scr, s, script_nr);
+ segManager->initialiseScript(*scr, script_nr);
reg.segment = seg_id;
reg.offset = 0;
@@ -1645,7 +1573,7 @@ int script_instantiate_common(EngineState *s, int script_nr, Resource **script,
return seg_id;
}
-int script_instantiate_sci0(EngineState *s, int script_nr) {
+int script_instantiate_sci0(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr) {
int objtype;
unsigned int objlength;
reg_t reg;
@@ -1655,7 +1583,7 @@ int script_instantiate_sci0(EngineState *s, int script_nr) {
Resource *script;
int was_new;
- seg_id = script_instantiate_common(s, script_nr, &script, NULL, &was_new);
+ seg_id = script_instantiate_common(resMgr, segManager, version, script_nr, &script, NULL, &was_new);
if (was_new)
return seg_id;
@@ -1663,7 +1591,7 @@ int script_instantiate_sci0(EngineState *s, int script_nr) {
reg.segment = seg_id;
reg.offset = 0;
- Script *scr = s->seg_manager->getScript(seg_id);
+ Script *scr = segManager->getScript(seg_id);
if (((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader()) {
//
@@ -1678,7 +1606,7 @@ int script_instantiate_sci0(EngineState *s, int script_nr) {
magic_pos_adder = 2; // Step over the funny prefix
if (locals_nr)
- s->seg_manager->scriptInitialiseLocalsZero(reg.segment, locals_nr);
+ segManager->scriptInitialiseLocalsZero(reg.segment, locals_nr);
} else {
scr->mcpyInOut(0, script->data, script->size);
@@ -1717,24 +1645,24 @@ int script_instantiate_sci0(EngineState *s, int script_nr) {
break;
case SCI_OBJ_LOCALVARS:
- s->seg_manager->scriptInitialiseLocals(data_base);
+ segManager->scriptInitialiseLocals(data_base);
break;
case SCI_OBJ_CLASS: {
int classpos = addr.offset - SCRIPT_OBJECT_MAGIC_OFFSET;
int species;
species = scr->getHeap(addr.offset - SCRIPT_OBJECT_MAGIC_OFFSET + SCRIPT_SPECIES_OFFSET);
- if (species < 0 || species >= (int)s->_classtable.size()) {
+ if (species < 0 || species >= (int)segManager->_classtable.size()) {
error("Invalid species %d(0x%x) not in interval "
"[0,%d) while instantiating script %d\n",
- species, species, s->_classtable.size(),
+ species, species, segManager->_classtable.size(),
script_nr);
return 1;
}
- s->_classtable[species].script = script_nr;
- s->_classtable[species].reg = addr;
- s->_classtable[species].reg.offset = classpos;
+ segManager->_classtable[species].script = script_nr;
+ segManager->_classtable[species].reg = addr;
+ segManager->_classtable[species].reg.offset = classpos;
// Set technical class position-- into the block allocated for it
}
break;
@@ -1760,17 +1688,17 @@ int script_instantiate_sci0(EngineState *s, int script_nr) {
switch (objtype) {
case SCI_OBJ_CODE:
- s->seg_manager->scriptAddCodeBlock(addr);
+ segManager->scriptAddCodeBlock(addr);
break;
case SCI_OBJ_OBJECT:
case SCI_OBJ_CLASS: { // object or class?
- Object *obj = s->seg_manager->scriptObjInit(s, addr);
+ Object *obj = segManager->scriptObjInit(addr);
Object *base_obj;
// Instantiate the superclass, if neccessary
obj->_variables[SCRIPT_SPECIES_SELECTOR] = INST_LOOKUP_CLASS(obj->_variables[SCRIPT_SPECIES_SELECTOR].offset);
- base_obj = obj_get(s, obj->_variables[SCRIPT_SPECIES_SELECTOR]);
+ base_obj = obj_get(segManager, version, obj->_variables[SCRIPT_SPECIES_SELECTOR]);
obj->variable_names_nr = base_obj->_variables.size();
obj->base_obj = base_obj->base_obj;
// Copy base from species class, as we need its selector IDs
@@ -1791,24 +1719,24 @@ int script_instantiate_sci0(EngineState *s, int script_nr) {
} while ((objtype != 0) && (((unsigned)reg.offset) < script->size - 2));
if (relocation >= 0)
- s->seg_manager->scriptRelocate(make_reg(reg.segment, relocation));
+ segManager->scriptRelocate(make_reg(reg.segment, relocation));
return reg.segment; // instantiation successful
}
-int script_instantiate_sci11(EngineState *s, int script_nr) {
+int script_instantiate_sci11(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr) {
Resource *script, *heap;
int seg_id;
int heap_start;
reg_t reg;
int was_new;
- seg_id = script_instantiate_common(s, script_nr, &script, &heap, &was_new);
+ seg_id = script_instantiate_common(resMgr, segManager, version, script_nr, &script, &heap, &was_new);
if (was_new)
return seg_id;
- Script *scr = s->seg_manager->getScript(seg_id);
+ Script *scr = segManager->getScript(seg_id);
heap_start = script->size;
if (script->size & 2)
@@ -1822,28 +1750,28 @@ int script_instantiate_sci11(EngineState *s, int script_nr) {
reg.segment = seg_id;
reg.offset = heap_start + 4;
- s->seg_manager->scriptInitialiseLocals(reg);
+ segManager->scriptInitialiseLocals(reg);
- s->seg_manager->scriptRelocateExportsSci11(seg_id);
- s->seg_manager->scriptInitialiseObjectsSci11(s, seg_id);
+ segManager->scriptRelocateExportsSci11(seg_id);
+ segManager->scriptInitialiseObjectsSci11(seg_id);
reg.offset = READ_LE_UINT16(heap->data);
- s->seg_manager->heapRelocate(reg);
+ segManager->heapRelocate(reg);
return seg_id;
}
-int script_instantiate(EngineState *s, int script_nr) {
- if (s->_version >= SCI_VERSION_1_1)
- return script_instantiate_sci11(s, script_nr);
+int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr) {
+ if (version >= SCI_VERSION_1_1)
+ return script_instantiate_sci11(resMgr, segManager, version, script_nr);
else
- return script_instantiate_sci0(s, script_nr);
+ return script_instantiate_sci0(resMgr, segManager, version, script_nr);
}
-void script_uninstantiate_sci0(EngineState *s, int script_nr, SegmentId seg) {
+void script_uninstantiate_sci0(SegManager *segManager, SciVersion version, int script_nr, SegmentId seg) {
reg_t reg = make_reg(seg, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader() ? 2 : 0);
int objtype, objlength;
- Script *scr = s->seg_manager->getScript(seg);
+ Script *scr = segManager->getScript(seg);
// Make a pass over the object in order uninstantiate all superclasses
objlength = 0;
@@ -1866,13 +1794,13 @@ void script_uninstantiate_sci0(EngineState *s, int script_nr, SegmentId seg) {
superclass = scr->getHeap(reg.offset + SCRIPT_SUPERCLASS_OFFSET); // Get superclass...
if (superclass >= 0) {
- int superclass_script = s->_classtable[superclass].script;
+ int superclass_script = segManager->_classtable[superclass].script;
if (superclass_script == script_nr) {
if (scr->getLockers())
scr->decrementLockers(); // Decrease lockers if this is us ourselves
} else
- script_uninstantiate(s, superclass_script);
+ script_uninstantiate(segManager, version, superclass_script);
// Recurse to assure that the superclass lockers number gets decreased
}
@@ -1884,11 +1812,9 @@ void script_uninstantiate_sci0(EngineState *s, int script_nr, SegmentId seg) {
} while (objtype != 0);
}
-void script_uninstantiate(EngineState *s, int script_nr) {
- reg_t reg = make_reg(0, ((SciEngine*)g_engine)->getKernel()->hasOldScriptHeader() ? 2 : 0);
-
- reg.segment = s->seg_manager->segGet(script_nr);
- Script *scr = script_locate_by_segment(s, reg.segment);
+void script_uninstantiate(SegManager *segManager, SciVersion version, int script_nr) {
+ SegmentId segment = segManager->segGet(script_nr);
+ Script *scr = segManager->getScriptIfLoaded(segment);
if (!scr) { // Is it already loaded?
//warning("unloading script 0x%x requested although not loaded", script_nr);
@@ -1902,12 +1828,12 @@ void script_uninstantiate(EngineState *s, int script_nr) {
return;
// Free all classtable references to this script
- for (uint i = 0; i < s->_classtable.size(); i++)
- if (s->_classtable[i].reg.segment == reg.segment)
- s->_classtable[i].reg = NULL_REG;
+ for (uint i = 0; i < segManager->_classtable.size(); i++)
+ if (segManager->_classtable[i].reg.segment == segment)
+ segManager->_classtable[i].reg = NULL_REG;
- if (s->_version < SCI_VERSION_1_1)
- script_uninstantiate_sci0(s, script_nr, reg.segment);
+ if (version < SCI_VERSION_1_1)
+ script_uninstantiate_sci0(segManager, version, script_nr, segment);
else
warning("FIXME: Add proper script uninstantiation for SCI 1.1");
@@ -1999,8 +1925,8 @@ int game_run(EngineState **_s) {
return 0;
}
-Object *obj_get(EngineState *s, reg_t offset) {
- MemObject *mobj = GET_OBJECT_SEGMENT(*s->seg_manager, offset.segment);
+Object *obj_get(SegManager *segManager, SciVersion version, reg_t offset) {
+ MemObject *mobj = GET_OBJECT_SEGMENT(*segManager, offset.segment);
Object *obj = NULL;
int idx;
@@ -2023,8 +1949,8 @@ Object *obj_get(EngineState *s, reg_t offset) {
return obj;
}
-const char *obj_get_name(EngineState *s, reg_t pos) {
- Object *obj = obj_get(s, pos);
+const char *obj_get_name(SegManager *segManager, SciVersion version, reg_t pos) {
+ Object *obj = obj_get(segManager, version, pos);
if (!obj)
return "<no such object>";
@@ -2032,7 +1958,7 @@ const char *obj_get_name(EngineState *s, reg_t pos) {
if (nameReg.isNull())
return "<no name>";
- const char *name = (const char*)s->seg_manager->dereference(obj->_variables[SCRIPT_NAME_SELECTOR], NULL);
+ const char *name = (const char*)segManager->dereference(obj->_variables[SCRIPT_NAME_SELECTOR], NULL);
if (!name)
return "<invalid name>";
@@ -2056,7 +1982,7 @@ void shrink_execution_stack(EngineState *s, uint size) {
}
reg_t* ObjVarRef::getPointer(EngineState *s) const {
- Object *o = obj_get(s, obj);
+ Object *o = obj_get(s->seg_manager, s->_version, obj);
if (!o) return 0;
return &(o->_variables[varindex]);
}
diff --git a/engines/sci/engine/vm.h b/engines/sci/engine/vm.h
index ba225a9c00..c8f94d5446 100644
--- a/engines/sci/engine/vm.h
+++ b/engines/sci/engine/vm.h
@@ -29,6 +29,7 @@
/* VM and kernel declarations */
#include "sci/engine/vm_types.h" // for reg_t
+#include "sci/resource.h" // for SciVersion
#include "common/util.h"
@@ -39,6 +40,7 @@ struct EngineState;
typedef int sci_version_t;
struct IntMapper;
struct Object;
+class ResourceManager;
/** Number of bytes to be allocated for the stack */
#define VM_STACK_SIZE 0x1000
@@ -67,12 +69,12 @@ struct Object;
#define SCRIPT_FUNCTAREAPTR_MAGIC 8 -8
/** Offset of the name pointer */
-#define SCRIPT_NAME_OFFSET (s->_version < SCI_VERSION_1_1 ? 14 -8 : 16)
-#define SCRIPT_NAME_SELECTOR (s->_version < SCI_VERSION_1_1 ? 3 : 8)
+#define SCRIPT_NAME_OFFSET (version < SCI_VERSION_1_1 ? 14 -8 : 16)
+#define SCRIPT_NAME_SELECTOR (version < SCI_VERSION_1_1 ? 3 : 8)
/** Object-relative offset of the -info- selector */
-#define SCRIPT_INFO_OFFSET (s->_version < SCI_VERSION_1_1 ? 12 -8 : 14)
-#define SCRIPT_INFO_SELECTOR (s->_version < SCI_VERSION_1_1 ? 2 : 7)
+#define SCRIPT_INFO_OFFSET (version < SCI_VERSION_1_1 ? 12 -8 : 14)
+#define SCRIPT_INFO_SELECTOR (version < SCI_VERSION_1_1 ? 2 : 7)
/** Flag fo the -info- selector */
#define SCRIPT_INFO_CLONE 0x0001
@@ -84,18 +86,18 @@ struct Object;
/** Magical object identifier */
#define SCRIPT_OBJECT_MAGIC_NUMBER 0x1234
/** Offset of this identifier */
-#define SCRIPT_OBJECT_MAGIC_OFFSET (s->_version < SCI_VERSION_1_1 ? -8 : 0)
+#define SCRIPT_OBJECT_MAGIC_OFFSET (version < SCI_VERSION_1_1 ? -8 : 0)
/** Script-relative offset of the species ID */
#define SCRIPT_SPECIES_OFFSET 8 -8
-#define SCRIPT_SUPERCLASS_OFFSET (s->_version < SCI_VERSION_1_1 ? 10 -8 : 12)
+#define SCRIPT_SUPERCLASS_OFFSET (version < SCI_VERSION_1_1 ? 10 -8 : 12)
/*---------------------------------*/
/* Script selector index variables */
/*---------------------------------*/
-#define SCRIPT_SPECIES_SELECTOR (s->_version < SCI_VERSION_1_1 ? 0 : 5)
-#define SCRIPT_SUPERCLASS_SELECTOR (s->_version < SCI_VERSION_1_1 ? 1 : 6)
+#define SCRIPT_SPECIES_SELECTOR (version < SCI_VERSION_1_1 ? 0 : 5)
+#define SCRIPT_SUPERCLASS_SELECTOR (version < SCI_VERSION_1_1 ? 1 : 6)
#define SCRIPT_CLASSSCRIPT_SELECTOR 4
/** Magic adjustment value for lofsa and lofss */
@@ -467,31 +469,13 @@ SelectorType lookup_selector(EngineState *s, reg_t obj, Selector selectorid,
ObjVarRef *varp, reg_t *fptr);
/**
- * Parameters for script_get_segment()
- */
-typedef enum {
- SCRIPT_GET_DONT_LOAD = 0, /**< Fail if not loaded */
- SCRIPT_GET_LOAD = 1, /**< Load, if neccessary */
- SCRIPT_GET_LOCK = 3 /**< Load, if neccessary, and lock */
-} SCRIPT_GET;
-
-/**
- * Determines the segment occupied by a certain script
- * @param[in] s The state to operate on
- * @param[in] script_id The script in question
- * @param[in] load One of SCRIPT_GET_*
- * @return The script's segment, or 0 on failure
- */
-SegmentId script_get_segment(EngineState *s, int script_id, SCRIPT_GET load);
-
-/**
* Looks up an entry of the exports table of a script
- * @param[in] s The state to operate on
+ * @param[in] segManager The segment manager
* @param[in] script_nr The script to look up in
* @param[out] export_index The index of the export entry to look up
* @return The handle
*/
-reg_t script_lookup_export(EngineState *s, int script_nr, int export_index);
+reg_t script_lookup_export(SegManager *segManager, int script_nr, int export_index);
/**
* Makes sure that a script and its superclasses get loaded to the heap.
@@ -499,21 +483,24 @@ reg_t script_lookup_export(EngineState *s, int script_nr, int export_index);
* increased. All scripts containing superclasses of this script are loaded
* recursively as well, unless 'recursive' is set to zero. The
* complementary function is "script_uninstantiate()" below.
- * @param[in] s The state to operate on
- * @param[in] script_nr The script number to load
- * @return The script's segment ID or 0 if out of heap
+ * @param[in] resMgr The resource manager
+ * @param[in] segManager The segment manager
+ * @param[in] version The SCI version to use
+ * @param[in] script_nr The script number to load
+ * @return The script's segment ID or 0 if out of heap
*/
-int script_instantiate(EngineState *s, int script_nr);
+int script_instantiate(ResourceManager *resMgr, SegManager *segManager, SciVersion version, int script_nr);
/**
* Decreases the numer of lockers of a script and unloads it if that number
* reaches zero.
* This function will recursively unload scripts containing its
* superclasses, if those aren't locked by other scripts as well.
- * @param[in] s The state to operate on
+ * @param[in] segManager The segment manager
+ * @param[in] version The SCI version to use
* @param[in] script_nr The script number that is requestet to be unloaded
*/
-void script_uninstantiate(EngineState *s, int script_nr);
+void script_uninstantiate(SegManager *segManager, SciVersion version, int script_nr);
/**
* Initializes an SCI game
@@ -613,7 +600,7 @@ int kfree(EngineState *s, reg_t handle);
* in a static buffer and need not be freed (neither may
* it be modified).
*/
-const char *obj_get_name(EngineState *s, reg_t pos);
+const char *obj_get_name(SegManager *segManager, SciVersion version, reg_t pos);
/**
* Retrieves an object from the specified location
@@ -621,7 +608,7 @@ const char *obj_get_name(EngineState *s, reg_t pos);
* @param[in] offset The object's offset
* @return The object in question, or NULL if there is none
*/
-Object *obj_get(EngineState *s, reg_t offset);
+Object *obj_get(SegManager *segManager, SciVersion version, reg_t offset);
/**
* Shrink execution stack to size.
diff --git a/engines/sci/exereader.cpp b/engines/sci/exereader.cpp
index 8ac5ed098e..ce6bf184fb 100644
--- a/engines/sci/exereader.cpp
+++ b/engines/sci/exereader.cpp
@@ -260,7 +260,6 @@ Common::String readSciVersionFromExe(Common::SeekableReadStream *exeStream, Comm
// String-encoded result, copied from buffer
char currentString[10];
- Common::String resultString;
for (int i = 0; i < len; i++) {
unsigned char ch = *buf++;
@@ -275,15 +274,8 @@ Common::String readSciVersionFromExe(Common::SeekableReadStream *exeStream, Comm
// Terminate string
currentString[9] = 0;
- // Return the current string if it's parseable
- SciVersion version;
- if (getSciVersionFromString(currentString, &version, platform)) {
- delete[] buffer;
- return currentString;
- }
-
- // Save the found string and continue searching
- resultString = currentString;
+ // Return the current string
+ return currentString;
}
if (accept)
@@ -293,57 +285,7 @@ Common::String readSciVersionFromExe(Common::SeekableReadStream *exeStream, Comm
}
delete[] buffer;
- return resultString;
-}
-
-bool getSciVersionFromString(Common::String versionString, SciVersion *version, Common::Platform platform) {
- *version = SCI_VERSION_AUTODETECT;
-
- if (platform == Common::kPlatformAmiga) {
- if (versionString.hasPrefix("1.002.")) {
- *version = SCI_VERSION_0;
- } else if (versionString.hasPrefix("1.003.")) {
- *version = SCI_VERSION_01;
- } else if (versionString.hasPrefix("1.004.")) {
- *version = SCI_VERSION_01;
- } else if (versionString.hasPrefix("1.005.")) {
- *version = SCI_VERSION_1;
- } else if (versionString == "x.yyy.zzz") {
- // How to map it?
- } else {
- return false;
- }
- } else if (versionString.hasPrefix("0.000.")) {
- *version = SCI_VERSION_0;
- } else if (versionString.hasPrefix("S.old.")) {
- *version = SCI_VERSION_01;
- } else if (versionString.hasPrefix("1.000.")) {
- *version = SCI_VERSION_1;
- } else if (versionString.hasPrefix("1.001.")) {
- *version = SCI_VERSION_1_1;
- } else if (versionString.hasPrefix("2.000.")
- || versionString.hasPrefix("2.100.")
- || versionString.hasPrefix("3.000.")) {
- *version = SCI_VERSION_32;
- } else if (versionString.hasPrefix("1.ECO.")
- || versionString.hasPrefix("1.SQ1.")
- || versionString.hasPrefix("1.SQ4.")
- || versionString.hasPrefix("1.LS5.")
- || versionString.hasPrefix("1.pq3.")
- || versionString.hasPrefix("FAIRY.")
- || versionString.hasPrefix("T.A00.")) {
- *version = SCI_VERSION_1;
- } else if (versionString.hasPrefix("L.rry.")
- || versionString.hasPrefix("l.cfs.")) {
- *version = SCI_VERSION_1_1;
- } else if (versionString == "x.yyy.zzz") {
- // How to map it?
- } else {
- // Unknown or not a version number
- return false;
- }
-
- return true;
+ return "unknown";
}
} // End of namespace Sci
diff --git a/engines/sci/exereader.h b/engines/sci/exereader.h
index c614c4c0da..e30d3d90c4 100644
--- a/engines/sci/exereader.h
+++ b/engines/sci/exereader.h
@@ -33,7 +33,6 @@ namespace Sci {
Common::Platform getGameExePlatform(Common::SeekableReadStream *exeStream);
Common::String readSciVersionFromExe(Common::SeekableReadStream *exeStream, Common::Platform platform);
-bool getSciVersionFromString(Common::String versionString, SciVersion *version, Common::Platform platform);
} // End of namespace Sci
diff --git a/engines/sci/gfx/gfx_resmgr.cpp b/engines/sci/gfx/gfx_resmgr.cpp
index fbae7105c9..5619a896cf 100644
--- a/engines/sci/gfx/gfx_resmgr.cpp
+++ b/engines/sci/gfx/gfx_resmgr.cpp
@@ -57,11 +57,6 @@ GfxResManager::GfxResManager(gfx_options_t *options, GfxDriver *driver, Resource
_portBounds = Common::Rect(0, 10, 320, 200); // default value, with a titlebar of 10px
_version = resManager->sciVersion();
- // Workaround for QFG1 VGA (has SCI 1.1 view data with SCI 1 compression)
- if (_version == SCI_VERSION_1 && !strcmp(((SciEngine*)g_engine)->getGameID(), "qfg1")) {
- _version = SCI_VERSION_1_1;
- }
-
if (!_resManager->isVGA()) {
_staticPalette = gfx_sci0_pic_colors->getref();
} else if (_version == SCI_VERSION_1_1) {
@@ -537,7 +532,7 @@ gfxr_view_t *GfxResManager::getView(int nr, int *loop, int *cel, int palette) {
int resid = GFXR_RES_ID(GFX_RESOURCE_TYPE_VIEW, nr);
if (!_resManager->isVGA()) {
- int pal = (_version == SCI_VERSION_0) ? -1 : palette;
+ int pal = (_version <= SCI_VERSION_01) ? -1 : palette;
view = getEGAView(resid, viewRes->data, viewRes->size, pal);
} else {
if (_version < SCI_VERSION_1_1)
@@ -679,7 +674,7 @@ gfx_pixmap_t *GfxResManager::getCursor(int num) {
}
gfx_pixmap_t *cursor = gfxr_draw_cursor(GFXR_RES_ID(GFX_RESOURCE_TYPE_CURSOR, num),
- cursorRes->data, cursorRes->size, _version != SCI_VERSION_0);
+ cursorRes->data, cursorRes->size, _version > SCI_VERSION_01);
if (!cursor)
return NULL;
diff --git a/engines/sci/gfx/gfx_resmgr.h b/engines/sci/gfx/gfx_resmgr.h
index 5cd5d018cc..75072f5ede 100644
--- a/engines/sci/gfx/gfx_resmgr.h
+++ b/engines/sci/gfx/gfx_resmgr.h
@@ -231,15 +231,6 @@ public:
int calculatePic(gfxr_pic_t *scaled_pic, gfxr_pic_t *unscaled_pic,
int flags, int default_palette, int nr);
- /**
- * Determines whether support for pointers with more than two colors
- * is required.
- *
- * @return false if no support for multi-colored pointers is required,
- * true otherwise
- */
- bool multicoloredPointers() { return _version > SCI_VERSION_1; }
-
/**
* Frees all resources currently allocated.
diff --git a/engines/sci/gfx/gfx_state_internal.h b/engines/sci/gfx/gfx_state_internal.h
index 3beb0ea067..1bff83e713 100644
--- a/engines/sci/gfx/gfx_state_internal.h
+++ b/engines/sci/gfx/gfx_state_internal.h
@@ -26,6 +26,7 @@
#ifndef SCI_GFX_GFX_STATE_INTERNAL_H
#define SCI_GFX_GFX_STATE_INTERNAL_H
+#include "sci/engine/vm.h"
#include "sci/gfx/gfx_tools.h"
#include "sci/gfx/gfx_options.h"
#include "sci/gfx/operations.h"
diff --git a/engines/sci/gfx/gfx_widgets.h b/engines/sci/gfx/gfx_widgets.h
index 80129152cb..ace13ff1b9 100644
--- a/engines/sci/gfx/gfx_widgets.h
+++ b/engines/sci/gfx/gfx_widgets.h
@@ -29,6 +29,7 @@
#include "common/rect.h"
+#include "sci/engine/vm.h"
#include "sci/gfx/gfx_system.h"
#include "sci/gfx/operations.h"
diff --git a/engines/sci/resource.cpp b/engines/sci/resource.cpp
index b42f36bd63..ef31fcdd7d 100644
--- a/engines/sci/resource.cpp
+++ b/engines/sci/resource.cpp
@@ -319,63 +319,6 @@ int sci0_get_compression_method(Common::ReadStream &stream) {
return compressionMethod;
}
-SciVersion ResourceManager::guessSciVersion() {
- Common::File file;
- char filename[MAXPATHLEN];
- int compression;
- Resource *res;
- int i;
-
- for (i = 0; i < 1000; i++) {
- res = testResource(ResourceId(kResourceTypeView, i));
-
- if (!res)
- continue;
-
- if (res->source->source_type == kSourceDirectory)
- continue;
-
- strcpy(filename, res->source->location_name.c_str());
-
- if (!file.open(filename))
- continue;
- file.seek(res->file_offset, SEEK_SET);
-
- compression = sci0_get_compression_method(file);
- file.close();
-
- if (compression == 3) {
- return SCI_VERSION_01;
- }
- }
-
- // Try the same thing with pics
- for (i = 0; i < 1000; i++) {
- res = testResource(ResourceId(kResourceTypePic, i));
-
- if (!res)
- continue;
-
- if (res->source->source_type == kSourceDirectory)
- continue;
-
- strcpy(filename, res->source->location_name.c_str());
-
- if (!file.open(filename))
- continue;
- file.seek(res->file_offset, SEEK_SET);
-
- compression = sci0_get_compression_method(file);
- file.close();
-
- if (compression == 3) {
- return SCI_VERSION_01;
- }
- }
-
- return SCI_VERSION_AUTODETECT;
-}
-
int ResourceManager::addAppropriateSources() {
ResourceSource *map;
@@ -484,91 +427,23 @@ ResourceManager::ResourceManager(int maxMemory) {
addInternalSources();
scanNewSources();
- switch (_mapVersion) {
- case kResVersionSci0Sci1Early:
- if (testResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SCI0_MAIN_VOCAB))) {
- _sciVersion = guessSciVersion() ? SCI_VERSION_01 : SCI_VERSION_0;
- } else if (testResource(ResourceId(kResourceTypeVocab, VOCAB_RESOURCE_SCI1_MAIN_VOCAB))) {
- _sciVersion = guessSciVersion();
- if (_sciVersion != SCI_VERSION_01) {
- _sciVersion = testResource(ResourceId(kResourceTypeVocab, 912)) ? SCI_VERSION_0 : SCI_VERSION_01;
- }
- } else {
- _sciVersion = guessSciVersion() ? SCI_VERSION_01 : SCI_VERSION_0;
- }
- break;
- case kResVersionSci1Middle:
- _sciVersion = SCI_VERSION_01;
- break;
- case kResVersionSci1Late:
- _sciVersion = SCI_VERSION_1;
- break;
- case kResVersionSci11:
- _sciVersion = SCI_VERSION_1_1;
- break;
- case kResVersionSci32:
- _sciVersion = SCI_VERSION_32;
- break;
- default:
- _sciVersion = SCI_VERSION_AUTODETECT;
- }
-
- _isVGA = false;
-
- // Determine if the game is using EGA graphics or not
- if (_sciVersion == SCI_VERSION_0) {
- _isVGA = false; // There is no SCI0 VGA game
- } else if (_sciVersion >= SCI_VERSION_1_1) {
- _isVGA = true; // There is no SCI11 EGA game
- } else {
- // SCI01 or SCI1: EGA games have the second byte of their views set
- // to 0, VGA ones to non-zero
- int i = 0;
-
- while (true) {
- Resource *res = findResource(ResourceId(kResourceTypeView, i), 0);
- if (res) {
- _isVGA = (res->data[1] != 0);
- break;
- }
- i++;
- }
- }
-
- // Workaround for QFG1 VGA (has SCI 1.1 view data with SCI 1 compression)
- if (_sciVersion == SCI_VERSION_1 && !strcmp(((SciEngine*)g_engine)->getGameID(), "qfg1")) {
- debug("Resmgr: Detected QFG1 VGA");
- _isVGA = true;
- }
+ _sciVersion = detectSciVersion();
- // temporary version printout - should be reworked later
- switch (_sciVersion) {
- case SCI_VERSION_0:
- debug("Resmgr: Detected SCI0");
- break;
- case SCI_VERSION_01:
- debug("Resmgr: Detected SCI01");
- break;
- case SCI_VERSION_1:
- debug("Resmgr: Detected SCI1");
- break;
- case SCI_VERSION_1_1:
- debug("Resmgr: Detected SCI1.1");
- break;
-#ifdef ENABLE_SCI32
- case SCI_VERSION_32:
+ if (_sciVersion != SCI_VERSION_AUTODETECT)
+ debug("Resmgr: Detected %s", versionNames[_sciVersion]);
+ else
debug("Resmgr: Couldn't determine SCI version");
+
+ switch (_viewType) {
+ case kViewEga:
+ debug("Resmgr: Detected EGA graphic resources");
break;
-#endif
- default:
- debug("Resmgr: Couldn't determine SCI version");
+ case kViewVga:
+ debug("Resmgr: Detected VGA graphic resources");
break;
+ case kViewVga11:
+ debug("Resmgr: Detected SCI1.1 VGA graphic resources");
}
-
- if (_isVGA)
- debug("Resmgr: Detected VGA graphic resources");
- else
- debug("Resmgr: Detected non-VGA/EGA graphic resources");
}
ResourceManager::~ResourceManager() {
@@ -1408,10 +1283,10 @@ int ResourceManager::readResourceInfo(Resource *res, Common::File *file,
compression = kCompNone;
break;
case 1:
- compression = (_sciVersion == SCI_VERSION_0) ? kCompLZW : kCompHuffman;
+ compression = (_sciVersion <= SCI_VERSION_01) ? kCompLZW : kCompHuffman;
break;
case 2:
- compression = (_sciVersion == SCI_VERSION_0) ? kCompHuffman : kCompLZW1;
+ compression = (_sciVersion <= SCI_VERSION_01) ? kCompHuffman : kCompLZW1;
break;
case 3:
compression = kCompLZW1View;
@@ -1483,4 +1358,240 @@ int ResourceManager::decompress(Resource *res, Common::File *file) {
return error;
}
+ResourceCompression ResourceManager::getViewCompression() {
+ int viewsTested = 0;
+
+ // Test 10 views to see if any are compressed
+ for (int i = 0; i < 1000; i++) {
+ Common::File *file;
+ Resource *res = testResource(ResourceId(kResourceTypeView, i));
+
+ if (!res)
+ continue;
+
+ if (res->source->source_type != kSourceVolume)
+ continue;
+
+ file = getVolumeFile(res->source->location_name.c_str());
+ if (!file)
+ continue;
+ file->seek(res->file_offset, SEEK_SET);
+
+ uint32 szPacked;
+ ResourceCompression compression;
+
+ if (readResourceInfo(res, file, szPacked, compression))
+ continue;
+
+ if (compression != kCompNone)
+ return compression;
+
+ if (++viewsTested == 10)
+ break;
+ }
+
+ return kCompNone;
+}
+
+ResourceManager::ViewType ResourceManager::detectViewType() {
+ for (int i = 0; i < 1000; i++) {
+ Resource *res = findResource(ResourceId(kResourceTypeView, i), 0);
+ if (res) {
+ //FIXME: Amiga
+ switch(res->data[1]) {
+ case 0:
+ return kViewEga;
+ default:
+ return kViewVga;
+ }
+ }
+ }
+
+ warning("Resmgr: Couldn't find any views");
+ return kViewVga;
+}
+
+SciVersion ResourceManager::detectSciVersion() {
+ // We use the view compression to set a preliminary _sciVersion for the sake of getResourceInfo
+ // Pretend we have a SCI0 game
+ _sciVersion = SCI_VERSION_0_EARLY;
+ bool oldDecompressors = true;
+
+ ResourceCompression viewCompression = getViewCompression();
+ if (viewCompression != kCompLZW) {
+ // If it's a different compression type from kCompLZW, the game is probably
+ // SCI_VERSION_1_EGA or later. If the views are uncompressed, it is
+ // likely not an early disk game.
+ _sciVersion = SCI_VERSION_1_EGA;
+ oldDecompressors = false;
+ }
+
+ // Set view type
+ if (viewCompression == kCompDCL) {
+ // SCI1.1 VGA views
+ _viewType = kViewVga11;
+ } else {
+ // Otherwise we detect it from a view
+ _viewType = detectViewType();
+ }
+
+ switch (_mapVersion) {
+ case kResVersionSci0Sci1Early:
+ if (_viewType == kViewVga) {
+ // VGA
+ return SCI_VERSION_1_EARLY;
+ }
+
+ // EGA
+ if (hasOldScriptHeader())
+ return SCI_VERSION_0_EARLY;
+
+ if (oldDecompressors) {
+ // It's either SCI_VERSION_0_LATE or SCI_VERSION_01
+
+ // We first check for SCI1 vocab.999
+ if (testResource(ResourceId(kResourceTypeVocab, 999))) {
+ if (hasSci0Voc999()) {
+ return SCI_VERSION_0_LATE;
+ } else {
+ return SCI_VERSION_01;
+ }
+ }
+
+ // If vocab.999 is missing, we try vocab.900
+ if (testResource(ResourceId(kResourceTypeVocab, 900))) {
+ if (hasSci1Voc900()) {
+ return SCI_VERSION_01;
+ } else {
+ return SCI_VERSION_0_LATE;
+ }
+ }
+
+ warning("Failed to accurately determine SCI version");
+ // No parser, we assume SCI_VERSION_01.
+ return SCI_VERSION_01;
+ }
+
+ // New decompressors. It's either SCI_VERSION_1_EGA or SCI_VERSION_1_EARLY.
+ if (hasSci1Voc900())
+ return SCI_VERSION_1_EGA;
+
+ // SCI_VERSION_1_EARLY EGA versions seem to be lacking a valid vocab.900.
+ // If this turns out to be unreliable, we could do some pic resource checks instead.
+ return SCI_VERSION_1_EARLY;
+ case kResVersionSci1Middle:
+ return SCI_VERSION_1_LATE;
+ case kResVersionSci1Late:
+ if (_viewType == kViewVga11) {
+ // SCI1.1 resources, assume SCI1.1
+ return SCI_VERSION_1_1;
+ }
+ return SCI_VERSION_1_LATE;
+ case kResVersionSci11:
+ return SCI_VERSION_1_1;
+ case kResVersionSci32:
+ return SCI_VERSION_32;
+ default:
+ return SCI_VERSION_AUTODETECT;
+ }
+}
+
+// Functions below are based on PD code by Brian Provinciano (SCI Studio)
+bool ResourceManager::hasOldScriptHeader() {
+ Resource *res = findResource(ResourceId(kResourceTypeScript, 0), 0);
+
+ if (!res) {
+ warning("Resmgr: Failed to find script.000");
+ return false;
+ }
+
+ uint offset = 2;
+ const int objTypes = 17;
+
+ while (offset < res->size) {
+ uint16 objType = READ_LE_UINT16(res->data + offset);
+
+ if (!objType) {
+ offset += 2;
+ // We should be at the end of the resource now
+ return offset == res->size;
+ }
+
+ if (objType >= objTypes) {
+ // Invalid objType
+ return false;
+ }
+
+ int skip = READ_LE_UINT16(res->data + offset + 2);
+
+ if (skip < 2) {
+ // Invalid size
+ return false;
+ }
+
+ offset += skip;
+ }
+
+ return false;
+}
+
+bool ResourceManager::hasSci0Voc999() {
+ Resource *res = findResource(ResourceId(kResourceTypeVocab, 999), 0);
+
+ if (!res) {
+ // No vocab present, possibly a demo version
+ return false;
+ }
+
+ if (res->size < 2)
+ return false;
+
+ uint16 count = READ_LE_UINT16(res->data);
+
+ // Make sure there's enough room for the pointers
+ if (res->size < (uint)count * 2)
+ return false;
+
+ // Iterate over all pointers
+ for (uint i = 0; i < count; i++) {
+ // Offset to string
+ uint16 offset = READ_LE_UINT16(res->data + 2 + count * 2);
+
+ // Look for end of string
+ do {
+ if (offset >= res->size) {
+ // Out of bounds
+ return false;
+ }
+ } while (res->data[offset++]);
+ }
+
+ return true;
+}
+
+bool ResourceManager::hasSci1Voc900() {
+ Resource *res = findResource(ResourceId(kResourceTypeVocab, 900), 0);
+
+ if (!res )
+ return false;
+
+ if (res->size < 0x1fe)
+ return false;
+
+ uint16 offset = 0x1fe;
+
+ while (offset < res->size) {
+ offset++;
+ do {
+ if (offset >= res->size) {
+ // Out of bounds;
+ return false;
+ }
+ } while (res->data[offset++]);
+ offset += 3;
+ }
+
+ return offset == res->size;
+}
+
} // End of namespace Sci
diff --git a/engines/sci/resource.h b/engines/sci/resource.h
index 3a51b3908e..d38cff87df 100644
--- a/engines/sci/resource.h
+++ b/engines/sci/resource.h
@@ -33,7 +33,6 @@
#include "sound/audiostream.h"
#include "sound/mixer.h" // for SoundHandle
-#include "sci/engine/vm.h" // for Object
#include "sci/decompressor.h"
namespace Common {
@@ -47,12 +46,15 @@ namespace Sci {
/** SCI versions */
enum SciVersion {
- SCI_VERSION_AUTODETECT = 0,
- SCI_VERSION_0 = 1,
- SCI_VERSION_01 = 2,
- SCI_VERSION_1 = 3,
- SCI_VERSION_1_1 = 4,
- SCI_VERSION_32 = 5
+ SCI_VERSION_AUTODETECT,
+ SCI_VERSION_0_EARLY, // Early KQ4, 1988 xmas card
+ SCI_VERSION_0_LATE, // KQ4, LSL2, LSL3, SQ3 etc
+ SCI_VERSION_01, // KQ1 and multilingual games (S.old.*)
+ SCI_VERSION_1_EGA, // EGA with parser, QFG2
+ SCI_VERSION_1_EARLY, // KQ5. (EGA/VGA)
+ SCI_VERSION_1_LATE, // ECO1, LSL1, LSL5. (EGA/VGA)
+ SCI_VERSION_1_1, // KQ6, ECO2
+ SCI_VERSION_32 // GK
};
/** Resource status types */
@@ -225,7 +227,14 @@ public:
kResVersionSci32
};
- bool isVGA() const { return _isVGA; }
+ // TODO: Amiga
+ enum ViewType {
+ kViewEga,
+ kViewVga,
+ kViewVga11
+ };
+
+ bool isVGA() const { return (_viewType == kViewVga) || (_viewType == kViewVga11); }
/**
* Returns the SCI version as detected by the resource manager
@@ -284,7 +293,7 @@ public:
void setAudioLanguage(int language);
protected:
- bool _isVGA; // Used to determine if the game has EGA or VGA graphics
+ ViewType _viewType; // Used to determine if the game has EGA or VGA graphics
int _maxMemory; //!< Config option: Maximum total byte number allocated
Common::List<ResourceSource *> _sources;
int _memoryLocked; //!< Amount of resource bytes in locked memory
@@ -403,7 +412,12 @@ protected:
void addToLRU(Resource *res);
void removeFromLRU(Resource *res);
- SciVersion guessSciVersion();
+ ResourceCompression getViewCompression();
+ ViewType detectViewType();
+ bool hasOldScriptHeader();
+ bool hasSci0Voc999();
+ bool hasSci1Voc900();
+ SciVersion detectSciVersion();
};
} // End of namespace Sci
diff --git a/engines/sci/sci.cpp b/engines/sci/sci.cpp
index b4fe197962..b799af9e83 100644
--- a/engines/sci/sci.cpp
+++ b/engines/sci/sci.cpp
@@ -43,11 +43,15 @@ namespace Sci {
class GfxDriver;
-const char *versionNames[6] = {
- "Autodetected",
- "SCI0",
+// FIXME: error-prone
+const char *versionNames[9] = {
+ "Autodetect",
+ "SCI0 Early",
+ "SCI0 Late",
"SCI01",
- "SCI1",
+ "SCI1 EGA",
+ "SCI1 Early",
+ "SCI1 Late",
"SCI1.1",
"SCI32"
};
@@ -128,51 +132,25 @@ Common::Error SciEngine::run() {
// FIXME/TODO: Move some of the stuff below to init()
- SciVersion version = getVersion();
const uint32 flags = getFlags();
_resmgr = new ResourceManager(256 * 1024);
+ _version = _resmgr->sciVersion();
if (!_resmgr) {
printf("No resources found, aborting...\n");
return Common::kNoGameDataFoundError;
}
- // When version is set to autodetect, use version as determined by resource manager
- if (version == SCI_VERSION_AUTODETECT)
- version = _resmgr->sciVersion();
-
_kernel = new Kernel(_resmgr);
_vocabulary = new Vocabulary(_resmgr);
- script_adjust_opcode_formats(_resmgr->sciVersion());
-
-#if 0
- printf("Mapping instruments to General Midi\n");
+ script_adjust_opcode_formats(_version);
- map_MIDI_instruments(_resmgr);
-#endif
-
- _gamestate = new EngineState(_resmgr, version, flags);
-
- // Verify that we haven't got an invalid game detection entry
- if (version < SCI_VERSION_1) {
- // SCI0/SCI01
- } else if (version == SCI_VERSION_1) {
- if (flags & GF_SCI0_OLDGETTIME) {
- error("This game entry is erroneous. It's marked as SCI1, but it has SCI0 flags set");
- }
- } else if (version == SCI_VERSION_1_1 || version == SCI_VERSION_32) {
- if (flags & GF_SCI0_OLDGETTIME) {
- error("This game entry is erroneous. It's marked as SCI1.1/SCI32, but it has SCI0 flags set");
- }
- } else {
- error ("Unknown SCI version in game entry");
- }
+ _gamestate = new EngineState(_resmgr, _version, flags);
if (script_init_engine(_gamestate))
return Common::kUnknownError;
-
if (game_init(_gamestate)) { /* Initialize */
warning("Game initialization failed: Aborting...");
// TODO: Add an "init failed" error?
@@ -226,7 +204,7 @@ Common::Error SciEngine::run() {
return Common::kUnknownError;
}
- printf("Emulating SCI version %s\n", versionNames[version]);
+ printf("Emulating SCI version %s\n", versionNames[_version]);
game_run(&_gamestate); // Run the game
@@ -265,7 +243,7 @@ const char* SciEngine::getGameID() const {
}
SciVersion SciEngine::getVersion() const {
- return _gameDescription->version;
+ return _version;
}
Common::Language SciEngine::getLanguage() const {
diff --git a/engines/sci/sci.h b/engines/sci/sci.h
index 43c0b9f8f8..4781af5870 100644
--- a/engines/sci/sci.h
+++ b/engines/sci/sci.h
@@ -66,10 +66,9 @@ enum kDebugLevels {
struct SciGameDescription {
ADGameDescription desc;
uint32 flags;
- SciVersion version;
};
-extern const char *versionNames[6];
+extern const char *versionNames[];
enum SciGameFlags {
// SCI0 flags
@@ -113,6 +112,7 @@ public:
private:
const SciGameDescription *_gameDescription;
+ SciVersion _version;
ResourceManager *_resmgr;
EngineState *_gamestate;
Kernel *_kernel;
diff --git a/engines/sci/sfx/softseq/adlib.cpp b/engines/sci/sfx/softseq/adlib.cpp
index 8d253a6b85..33ccc28360 100644
--- a/engines/sci/sfx/softseq/adlib.cpp
+++ b/engines/sci/sfx/softseq/adlib.cpp
@@ -641,7 +641,7 @@ int MidiPlayer_Adlib::open(ResourceManager *resmgr) {
static_cast<MidiDriver_Adlib *>(_driver)->loadResource(res);
- return static_cast<MidiDriver_Adlib *>(_driver)->open(resmgr->sciVersion() == SCI_VERSION_0);
+ return static_cast<MidiDriver_Adlib *>(_driver)->open(resmgr->sciVersion() <= SCI_VERSION_0_LATE);
}
} // End of namespace Sci
diff --git a/engines/sci/vocabulary.cpp b/engines/sci/vocabulary.cpp
index 7201ad54ac..69b7bc3393 100644
--- a/engines/sci/vocabulary.cpp
+++ b/engines/sci/vocabulary.cpp
@@ -91,7 +91,7 @@ Vocabulary::Vocabulary(ResourceManager *resmgr) : _resmgr(resmgr) {
debug(2, "Initializing vocabulary");
- if (_resmgr->sciVersion() <= SCI_VERSION_01 && loadParserWords()) {
+ if (_resmgr->sciVersion() <= SCI_VERSION_1_EGA && loadParserWords()) {
loadSuffixes();
if (loadBranches())
// Now build a GNF grammar out of this
diff --git a/engines/scumm/imuse/imuse.cpp b/engines/scumm/imuse/imuse.cpp
index 2d20b72db6..455eaac984 100644
--- a/engines/scumm/imuse/imuse.cpp
+++ b/engines/scumm/imuse/imuse.cpp
@@ -695,11 +695,11 @@ int32 IMuseInternal::doCommand_internal(int numargs, int a[]) {
return -1;
{
- char string[128];
- sprintf(string, "doCommand - %d (%d/%d)", a[0], (int)param, (int)cmd);
+ Common::String string = "doCommand - ";
+ string += Common::String::printf("%d (%d/%d)", a[0], (int)param, (int)cmd);
for (i = 1; i < numargs; ++i)
- sprintf(string + strlen(string), ", %d", a[i]);
- debugC(DEBUG_IMUSE, string);
+ string += Common::String::printf(", %d", a[i]);
+ debugC(DEBUG_IMUSE, "%s", string.c_str());
}
if (param == 0) {
diff --git a/engines/tinsel/pcode.cpp b/engines/tinsel/pcode.cpp
index e6ed9df5c9..8646ad3267 100644
--- a/engines/tinsel/pcode.cpp
+++ b/engines/tinsel/pcode.cpp
@@ -126,6 +126,10 @@ const byte fragment5[] = {OP_IMM | OPSIZE16, 901 % 256, 901 / 256, OP_JUMP, 488
const int fragment5_size = 6;
const byte fragment6[] = {OP_IMM | OPSIZE16, 903 % 256, 903 / 256, OP_JUMP, 516 % 256, 516 / 256};
const int fragment6_size = 6;
+const byte fragment7[] = {OP_IMM | OPSIZE16, 908 % 256, 908 / 256, OP_JUMP, 616 % 256, 616 / 256};
+const int fragment7_size = 6;
+const byte fragment8[] = {OP_IMM | OPSIZE16, 910 % 256, 910 / 256, OP_JUMP, 644 % 256, 644 / 256};
+const int fragment8_size = 6;
const WorkaroundEntry workaroundList[] = {
// DW1-SCN: Global 206 is whether Rincewind is trying to take the book back to the present.
@@ -146,6 +150,8 @@ const WorkaroundEntry workaroundList[] = {
{TINSEL_V1, false, 310506872, 463, fragment4_size, fragment4},
{TINSEL_V1, false, 310506872, 485, fragment5_size, fragment5},
{TINSEL_V1, false, 310506872, 513, fragment6_size, fragment6},
+ {TINSEL_V1, false, 310506872, 613, fragment7_size, fragment7},
+ {TINSEL_V1, false, 310506872, 641, fragment8_size, fragment8},
// DW2: In the garden, global #490 is set when the bees begin their 'out of hive' animation, and reset when done.
// But if the game is saved/restored during it, the animation sequence is reset without the global being cleared.
@@ -158,7 +164,7 @@ const WorkaroundEntry workaroundList[] = {
{TINSEL_V0, false, 0, 0, 0, NULL}
};
-
+//310505453, x
//----------------- LOCAL GLOBAL DATA --------------------
/**