diff options
author | Travis Howell | 2004-10-04 02:23:02 +0000 |
---|---|---|
committer | Travis Howell | 2004-10-04 02:23:02 +0000 |
commit | 4364606894151216963fb0cc79216d6783853ceb (patch) | |
tree | 826a73bd704707c40587d98f6977224a220174b1 /scumm | |
parent | f9e21fe4e221723bc331a0ed690b260c9c7e8963 (diff) | |
download | scummvm-rg350-4364606894151216963fb0cc79216d6783853ceb.tar.gz scummvm-rg350-4364606894151216963fb0cc79216d6783853ceb.tar.bz2 scummvm-rg350-4364606894151216963fb0cc79216d6783853ceb.zip |
Add some HE99 vars
Rename opcodes
svn-id: r15403
Diffstat (limited to 'scumm')
-rw-r--r-- | scumm/intern.h | 10 | ||||
-rw-r--r-- | scumm/resource.cpp | 2 | ||||
-rw-r--r-- | scumm/script_v90he.cpp | 38 | ||||
-rw-r--r-- | scumm/scumm.cpp | 5 | ||||
-rw-r--r-- | scumm/scumm.h | 4 | ||||
-rw-r--r-- | scumm/vars.cpp | 8 |
6 files changed, 41 insertions, 26 deletions
diff --git a/scumm/intern.h b/scumm/intern.h index acbef781ab..10f5d0c7e4 100644 --- a/scumm/intern.h +++ b/scumm/intern.h @@ -882,13 +882,13 @@ protected: void o90_unknown31(); void o90_unknown32(); void o90_findAllObjectsWithClassOf(); - void o90_unknown35(); + void o90_getPolygonOverlap(); void o90_unknown36(); void o90_dim2dim2Array(); - void o90_unknown3A(); - void o90_unknown44(); - void o90_unknown94(); - void o90_unknown9E(); + void o90_sortArray(); + void o90_getObjectData(); + void o90_getPaletteData(); + void o90_paletteOps(); void o90_unknownA5(); void o90_getActorAnimProgress(); }; diff --git a/scumm/resource.cpp b/scumm/resource.cpp index a6dd5c9d15..be32437ea4 100644 --- a/scumm/resource.cpp +++ b/scumm/resource.cpp @@ -2312,7 +2312,7 @@ void ScummEngine::readMAXS(int blockSize) { _numLocalScripts = _fileHandle.readUint16LE(); _fileHandle.readUint16LE(); // heap related _numPalettes = _fileHandle.readUint16LE(); - _fileHandle.readUint16LE(); // unknown + _numUnk = _fileHandle.readUint16LE(); _numTalkies = _fileHandle.readUint16LE(); _numNewNames = 10; diff --git a/scumm/script_v90he.cpp b/scumm/script_v90he.cpp index 751af90a17..eace071dbb 100644 --- a/scumm/script_v90he.cpp +++ b/scumm/script_v90he.cpp @@ -110,13 +110,13 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o6_invalid), /* 34 */ OPCODE(o90_findAllObjectsWithClassOf), - OPCODE(o90_unknown35), + OPCODE(o90_getPolygonOverlap), OPCODE(o90_unknown36), OPCODE(o90_dim2dim2Array), /* 38 */ OPCODE(o6_invalid), OPCODE(o6_invalid), - OPCODE(o90_unknown3A), + OPCODE(o90_sortArray), OPCODE(o6_invalid), /* 3C */ OPCODE(o6_invalid), @@ -129,7 +129,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o6_invalid), OPCODE(o6_writeWordVar), /* 44 */ - OPCODE(o90_unknown44), + OPCODE(o90_getObjectData), OPCODE(o80_unknown45), OPCODE(o6_invalid), OPCODE(o6_wordArrayWrite), @@ -229,7 +229,7 @@ void ScummEngine_v90he::setupOpcodes() { OPCODE(o6_findInventory), OPCODE(o6_getInventoryCount), /* 94 */ - OPCODE(o90_unknown94), + OPCODE(o90_getPaletteData), OPCODE(o6_beginOverride), OPCODE(o6_endOverride), OPCODE(o6_setObjectName), @@ -241,7 +241,7 @@ void ScummEngine_v90he::setupOpcodes() { /* 9C */ OPCODE(o72_roomOps), OPCODE(o72_actorOps), - OPCODE(o90_unknown9E), + OPCODE(o90_paletteOps), OPCODE(o6_getActorFromXY), /* A0 */ OPCODE(o72_findObject), @@ -1049,7 +1049,7 @@ void ScummEngine_v90he::o90_findAllObjectsWithClassOf() { push(readVar(0)); } -void ScummEngine_v90he::o90_unknown35() { +void ScummEngine_v90he::o90_getPolygonOverlap() { // Polygons related int args[32]; int args2[32]; @@ -1072,7 +1072,7 @@ void ScummEngine_v90he::o90_unknown35() { case 9: break; default: - error("o90_unknown35: default case %d", subOp); + error("o90_getPolygonOverlap: default case %d", subOp); } push(0); } @@ -1129,7 +1129,7 @@ void ScummEngine_v90he::o90_dim2dim2Array() { defineArray(fetchScriptWord(), data, dim2start, dim2end, dim1start, dim1end); } -void ScummEngine_v90he::o90_unknown3A() { +void ScummEngine_v90he::o90_sortArray() { // Sorts array via qsort int subOp = fetchScriptByte(); @@ -1143,12 +1143,12 @@ void ScummEngine_v90he::o90_unknown3A() { pop(); break; default: - error("o90_unknown3A: Unknown case %d", subOp); + error("o90_sortArray: Unknown case %d", subOp); } - debug(1,"o90_unknown3A stub (%d)", subOp); + debug(1,"o90_sortArray stub (%d)", subOp); } -void ScummEngine_v90he::o90_unknown44() { +void ScummEngine_v90he::o90_getObjectData() { // Object releated int subOp = fetchScriptByte(); subOp -= 32; @@ -1194,12 +1194,12 @@ void ScummEngine_v90he::o90_unknown44() { push(0); break; default: - error("o90_unknown44: Unknown case %d", subOp); + error("o90_getObjectData: Unknown case %d", subOp); } - debug(1,"o90_unknown44 stub (%d)", subOp); + debug(1,"o90_getObjectData stub (%d)", subOp); } -void ScummEngine_v90he::o90_unknown94() { +void ScummEngine_v90he::o90_getPaletteData() { int subOp = fetchScriptByte(); subOp -= 45; @@ -1231,13 +1231,13 @@ void ScummEngine_v90he::o90_unknown94() { pop(); break; default: - error("o90_unknown94: Unknown case %d", subOp); + error("o90_getPaletteData: Unknown case %d", subOp); } push(0); - debug(1,"o90_unknown94 stub (%d)", subOp); + debug(1,"o90_getPaletteData stub (%d)", subOp); } -void ScummEngine_v90he::o90_unknown9E() { +void ScummEngine_v90he::o90_paletteOps() { int subOp = fetchScriptByte(); subOp -= 57; @@ -1276,9 +1276,9 @@ void ScummEngine_v90he::o90_unknown9E() { case 198: break; default: - error("o90_unknown9E: Unknown case %d", subOp); + error("o90_paletteOps: Unknown case %d", subOp); } - debug(1,"o90_unknown9E stub (%d)", subOp); + debug(1,"o90_paletteOps stub (%d)", subOp); } diff --git a/scumm/scumm.cpp b/scumm/scumm.cpp index ceba06170f..aa74a3c7c4 100644 --- a/scumm/scumm.cpp +++ b/scumm/scumm.cpp @@ -314,6 +314,8 @@ static const ScummGameSettings scumm_settings[] = { GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0, 0}, // Global scripts increased to 2048 + {"500demo", "Putt-Putt Enters the Race (Demo)", GID_FREDDI4, 6, 98, MDT_NONE, + GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0, 0}, {"freddi4", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch", GID_FREDDI4, 6, 98, MDT_NONE, GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0, 0}, {"f4-demo", "Freddi Fish 4: The Case of the Hogfish Rustlers of Briny Gulch (Demo)", GID_FREDDI4, 6, 98, MDT_NONE, @@ -540,6 +542,7 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS _numSprites = 0; _numTalkies = 0; _numPalettes = 0; + _numUnk = 0; _audioNames = NULL; _numAudioNames = 0; _curActor = 0; @@ -835,6 +838,8 @@ ScummEngine::ScummEngine(GameDetector *detector, OSystem *syst, const ScummGameS VAR_NUM_CHARSETS = 0xFF; VAR_NUM_GLOBAL_OBJS = 0xFF; VAR_NUM_SPRITES = 0xFF; + VAR_NUM_PALETTES = 0xFF; + VAR_NUM_UNK = 0xFF; VAR_POLYGONS_ONLY = 0xFF; VAR_WINDOWS_VERSION = 0xFF; VAR_WIZ_TCOLOR = 0xFF; diff --git a/scumm/scumm.h b/scumm/scumm.h index 921a7d2034..eecce18b8a 100644 --- a/scumm/scumm.h +++ b/scumm/scumm.h @@ -495,7 +495,7 @@ protected: int _numInventory; int _numNewNames, _numGlobalScripts; int _numActors, _numRoomVariables; - int _numPalettes, _numSprites, _numTalkies; + int _numPalettes, _numSprites, _numTalkies, _numUnk; public: int _numLocalScripts, _numImages, _numRooms, _numScripts, _numSounds; // Used by HE games int _numCostumes; // FIXME - should be protected, used by Actor::remapActorPalette @@ -1331,6 +1331,8 @@ public: byte VAR_NUM_CHARSETS; byte VAR_NUM_GLOBAL_OBJS; byte VAR_NUM_SPRITES; + byte VAR_NUM_PALETTES; + byte VAR_NUM_UNK; byte VAR_POLYGONS_ONLY; byte VAR_WINDOWS_VERSION; byte VAR_WIZ_TCOLOR; diff --git a/scumm/vars.cpp b/scumm/vars.cpp index aaeec93bc3..f5bd093aec 100644 --- a/scumm/vars.cpp +++ b/scumm/vars.cpp @@ -267,6 +267,10 @@ void ScummEngine_v72he::setupScummVars() { VAR_NUM_SPRITES = 106; VAR_WIZ_TCOLOR = 117; } + if (_heversion >= 99) { + VAR_NUM_PALETTES = 130; + VAR_NUM_UNK = 131; + } } void ScummEngine_v7::setupScummVars() { @@ -504,6 +508,10 @@ void ScummEngine::initScummVars() { VAR(VAR_WINDOWS_VERSION) = 40; if (_heversion >= 90) VAR(VAR_NUM_SPRITES) = _numSprites - 1; + if (_heversion >= 99) { + VAR(VAR_NUM_PALETTES) = _numPalettes; + VAR(VAR_NUM_UNK) = _numUnk; + } } else { VAR(VAR_CURRENTDRIVE) = 0; switch (_midiDriver) { |