Add separate class for Humongous Entertainment games.

svn-id: r12752
This commit is contained in:
Travis Howell 2004-02-07 02:23:24 +00:00
parent 8411a8ade1
commit 82564def69
5 changed files with 1351 additions and 1 deletions

View file

@ -552,6 +552,61 @@ protected:
byte VAR_TIMEDATE_SECOND;
};
class ScummEngine_v6he : public ScummEngine_v6 {
protected:
typedef void (ScummEngine_v6he::*OpcodeProcV6he)();
struct OpcodeEntryV6he {
OpcodeProcV6he proc;
const char *desc;
};
const OpcodeEntryV6he *_opcodesV6he;
File _hFileTable[17];
public:
ScummEngine_v6he(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs) : ScummEngine_v6(detector, syst, gs) {}
protected:
virtual void setupOpcodes();
virtual void executeOpcode(byte i);
virtual const char *getOpcodeDesc(byte i);
virtual void setupScummVars();
virtual void decodeParseString(int a, int b);
void unknownEA_func(int a, int b, int c, int d, int e);
int readFileToArray(int slot, int32 size);
void writeFileFromArray(int slot, int resID);
/* Version 6 script opcodes */
void o6_drawBlastObject();
void o6_setBlastObjectWindow();
void o6_roomOps();
void o6_actorOps();
void o6_verbOps();
void o6_wait();
void o6_soundKludge();
void o6_dummy();
void o6_kernelSetFunctions();
void o6_kernelGetFunctions();
void o6_stampObject();
void o6_openFile();
void o6_closeFile();
void o6_deleteFile();
void o6_readFile();
void o6_rename();
void o6_writeFile();
void o6_findAllObjects();
void o6_unknownE0();
void o6_unknownE1();
void o6_unknownE4();
void o6_localizeArray();
void o6_unknownFA();
void o6_unknownEA();
void o6_readINI();
};
class ScummEngine_v7 : public ScummEngine_v6 {
public:
ScummEngine_v7(GameDetector *detector, OSystem *syst, const ScummGameSettings &gs) : ScummEngine_v6(detector, syst, gs) {}

View file

@ -36,6 +36,7 @@ MODULE_OBJS := \
scumm/script_v2.o \
scumm/script_v5.o \
scumm/script_v6.o \
scumm/script_v6he.o \
scumm/script_v8.o \
scumm/scummvm.o \
scumm/sound.o \

1269
scumm/script_v6he.cpp Normal file

File diff suppressed because it is too large Load diff

View file

@ -170,6 +170,9 @@ static const ScummGameSettings scumm_settings[] = {
{"fbdemo", "Fatty Bear's Birthday Surprise (DOS Demo)", GID_FBEAR, 6, MDT_ADLIB | MDT_NATIVE,
GF_NEW_OPCODES | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, 0},
{"putter", "Putt-Putt Joins The Parade (Windows)", GID_PUTTPUTT, 6, MDT_NONE,
GF_NEW_OPCODES | GF_AFTER_HEV7 | GF_USE_KEY | GF_HUMONGOUS | GF_NEW_COSTUMES, "puttputt"},
{"tentacle", "Day Of The Tentacle", GID_TENTACLE, 6, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_NATIVE,
GF_NEW_OPCODES | GF_USE_KEY, 0},
{"dottdemo", "Day Of The Tentacle (Demo)", GID_TENTACLE, 6, /*MDT_PCSPK |*/ MDT_ADLIB | MDT_NATIVE,
@ -2982,7 +2985,10 @@ Engine *Engine_SCUMM_create(GameDetector *detector, OSystem *syst) {
engine = new ScummEngine_v5(detector, syst, game);
break;
case 6:
engine = new ScummEngine_v6(detector, syst, game);
if (game.features & GF_HUMONGOUS)
engine = new ScummEngine_v6he(detector, syst, game);
else
engine = new ScummEngine_v6(detector, syst, game);
break;
case 7:
engine = new ScummEngine_v7(detector, syst, game);

View file

@ -161,6 +161,25 @@ void ScummEngine_v6::setupScummVars() {
VAR_TIMEDATE_MINUTE = 126;
}
void ScummEngine_v6he::setupScummVars() {
// Many vars are the same as in V5 & V6 games, so just call the inherited method first
ScummEngine::setupScummVars();
VAR_V6_SCREEN_WIDTH = 41;
VAR_V6_SCREEN_HEIGHT = 54;
VAR_V6_EMSSPACE = 76;
VAR_RANDOM_NR = 118;
VAR_V6_SOUNDMODE = 9;
VAR_TIMEDATE_YEAR = 119;
VAR_TIMEDATE_MONTH = 129;
VAR_TIMEDATE_DAY = 128;
VAR_TIMEDATE_HOUR = 125;
VAR_TIMEDATE_MINUTE = 126;
}
void ScummEngine_v7::setupScummVars() {
VAR_MOUSE_X = 1;
VAR_MOUSE_Y = 2;