-Add more Backyard sports titles

-Add additional HE100 opcodes changes for basketball
-Fix baseball asserts in VAR_WIZ_TCOLOR

svn-id: r18385
This commit is contained in:
Travis Howell 2005-06-14 03:06:56 +00:00
parent 01cf8f20ae
commit fc7d6c4e26
6 changed files with 117 additions and 20 deletions

View File

@ -1167,8 +1167,8 @@ protected:
void o90_getActorData();
void o90_startScriptUnk();
void o90_jumpToScriptUnk();
void o90_smackerOps();
void o90_getSmackerData();
void o90_videoOps();
void o90_getVideoData();
void o90_wizImageOps();
void o90_getDistanceBetweenPoints();
void o90_getSpriteInfo();
@ -1263,6 +1263,7 @@ protected:
void o100_startScript();
void o100_systemOps();
void o100_cursorCommand();
void o100_videoOps();
void o100_wait();
void o100_writeFile();
void o100_isResourceLoaded();
@ -1272,6 +1273,7 @@ protected:
void o100_readFile();
void o100_getSpriteInfo();
void o100_getWizData();
void o100_getVideoData();
};
#endif

View File

@ -217,7 +217,7 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(o72_setTimer),
OPCODE(o100_cursorCommand),
/* 8C */
OPCODE(o6_invalid),
OPCODE(o100_videoOps),
OPCODE(o100_wait),
OPCODE(o6_walkActorToObj),
OPCODE(o6_walkActorTo),
@ -265,7 +265,7 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(o72_findObjectWithClassOf),
OPCODE(o70_polygonHit),
OPCODE(o90_getLinesIntersectionPoint),
OPCODE(o6_invalid),
OPCODE(o90_fontUnk),
/* B4 */
OPCODE(o72_getNumFreeArrays),
OPCODE(o72_getArrayDimSize),
@ -337,7 +337,7 @@ void ScummEngine_v100he::setupOpcodes() {
OPCODE(o72_getTimer),
OPCODE(o6_getVerbEntrypoint),
/* EC */
OPCODE(o6_invalid),
OPCODE(o100_getVideoData),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
OPCODE(o6_invalid),
@ -2148,6 +2148,54 @@ void ScummEngine_v100he::o100_cursorCommand() {
VAR(VAR_USERPUT) = _userPut;
}
void ScummEngine_v100he::o100_videoOps() {
// Uses Bink video
int subOp = fetchScriptByte();
switch (subOp) {
case 0:
memset(_videoParams.filename, 0, sizeof(_videoParams.filename));
_videoParams.unk2 = pop();
break;
case 19:
_videoParams.status = 19;
break;
case 40:
_videoParams.unk3 = pop();
if (_videoParams.unk1)
_videoParams.unk1 |= 2;
break;
case 47:
copyScriptString(_videoParams.filename, sizeof(_videoParams.filename));
_videoParams.status = 47;
break;
case 67:
_videoParams.unk1 |= pop();
break;
case 92:
if (_videoParams.status == 47) {
// Start video
if (_videoParams.unk1 == 0)
_videoParams.unk1 = 4;
if (_videoParams.unk1 == 2) {
// result = startVideo(_videoParams.filename, _videoParams.unk1, _videoParams.unk3);
// VAR(119) = result;
} else {
// result = startVideo(_videoParams.filename, _videoParams.unk1);
// VAR(119) = result;
}
} else if (_videoParams.status == 19) {
// Stop video
}
break;
default:
error("o100_videoOps: unhandled case %d", subOp);
}
debug(0,"o100_videoOps stub (%d)", subOp);
}
void ScummEngine_v100he::o100_wait() {
int actnum;
int offs = -2;
@ -2764,6 +2812,39 @@ void ScummEngine_v100he::o100_getSpriteInfo() {
}
}
void ScummEngine_v100he::o100_getVideoData() {
// Uses Bink video
int subOp = fetchScriptByte();
subOp -= 26;
switch (subOp) {
case 0:
pop();
break;
case 13:
pop();
break;
case 14:
pop();
break;
case 28:
pop();
pop();
break;
case 47:
pop();
break;
case 58:
pop();
break;
default:
error("o100_getVideoData: unhandled case %d", subOp);
}
push(-1);
debug(0,"o100_getVideoData stub (%d)", subOp);
}
void ScummEngine_v100he::decodeParseString(int m, int n) {
Actor *a;
int i, colors, size;

View File

@ -99,8 +99,8 @@ void ScummEngine_v90he::setupOpcodes() {
OPCODE(o90_startScriptUnk),
/* 2C */
OPCODE(o90_jumpToScriptUnk),
OPCODE(o90_smackerOps),
OPCODE(o90_getSmackerData),
OPCODE(o90_videoOps),
OPCODE(o90_getVideoData),
OPCODE(o90_floodState),
/* 30 */
OPCODE(o90_mod),
@ -511,7 +511,8 @@ void ScummEngine_v90he::o90_jumpToScriptUnk() {
runScript(script, (flags == 199 || flags == 200), (flags == 195 || flags == 200), args, cycle);
}
void ScummEngine_v90he::o90_smackerOps() {
void ScummEngine_v90he::o90_videoOps() {
// Uses Smacker video
int status = fetchScriptByte();
int subOp = status - 49;
@ -553,13 +554,14 @@ void ScummEngine_v90he::o90_smackerOps() {
}
break;
default:
error("o90_smackerOps: unhandled case %d", subOp);
error("o90_videoOps: unhandled case %d", subOp);
}
debug(0,"o90_smackerOps stub (%d)", subOp);
debug(0,"o90_videoOps stub (%d)", subOp);
}
void ScummEngine_v90he::o90_getSmackerData() {
void ScummEngine_v90he::o90_getVideoData() {
// Uses Smacker video
int subOp = fetchScriptByte();
subOp -= 32;
@ -584,11 +586,11 @@ void ScummEngine_v90he::o90_getSmackerData() {
pop();
break;
default:
error("o90_getSmackerData: unhandled case %d", subOp);
error("o90_getVideoData: unhandled case %d", subOp);
}
push(-1);
debug(0,"o90_getSmackerData stub (%d)", subOp);
debug(0,"o90_getVideoData stub (%d)", subOp);
}
void ScummEngine_v90he::o90_wizImageOps() {
@ -2515,6 +2517,7 @@ void ScummEngine_v90he::o90_fontUnk() {
byte subOp = fetchScriptByte();
switch (subOp) {
case 60: // HE100
case 42:
a = pop();
if (a == 2) {
@ -2528,6 +2531,7 @@ void ScummEngine_v90he::o90_fontUnk() {
push(readVar(0));
}
break;
case 0: // HE100
case 57:
push(1);
break;

View File

@ -1,5 +1,5 @@
/*
This file was generated by the md5table tool on Sun Jun 5 15:22:40 2005
This file was generated by the md5table tool on Tue Jun 14 03:00:25 2005
DO NOT EDIT MANUALLY!
*/
@ -186,7 +186,7 @@ static const MD5Table md5table[] = {
{ "6ea966b4d660c870b9ee790d1fbfc535", "monkey2", Common::ES_ESP, Common::kPlatformAmiga },
{ "6f0be328c64d689bb606d22a389e1b0f", "loom", Common::EN_USA, Common::kPlatformMacintosh },
{ "6f6ef668c608c7f534fea6e6d3878dde", "indy3EGA", Common::DE_DEU, Common::kPlatformPC },
{ "701246819d1a70573f41bf33fc19214f", "soccer", Common::EN_USA, Common::kPlatformWindows },
{ "701246819d1a70573f41bf33fc19214f", "soccer", Common::EN_USA, Common::kPlatformUnknown },
{ "7020931d5a2be0a49d68e7a1882363e4", "zak", Common::EN_USA, Common::kPlatformPC },
{ "71523b539491527d9860f4407faf0411", "monkeyega", Common::EN_USA, Common::kPlatformPC },
{ "71fe97c3108678cf604f14abe342341b", "spyfox2", Common::NL_NLD, Common::kPlatformWindows },
@ -264,6 +264,7 @@ static const MD5Table md5table[] = {
{ "a654fb60c3b67d6317a7894ffd9f25c5", "pj3-demo", Common::EN_USA, Common::kPlatformWindows },
{ "a7cacad9c40c4dc9e1812abf6c8af9d5", "circdemo", Common::EN_USA, Common::kPlatformUnknown },
{ "a85856675429fe88051744f755b72f93", "farm", Common::EN_USA, Common::kPlatformWindows },
{ "a86f9c49355579c30d4a55b477c0d869", "baseball2001", Common::EN_USA, Common::kPlatformUnknown },
{ "a9543ef0d79bcb47cd76ec197ad0a967", "puttmoon", Common::EN_USA, Common::kPlatformUnknown },
{ "a9f2f04b1ecaab9495b59befffe9bf88", "pj3-demo", Common::EN_USA, Common::kPlatformUnknown },
{ "aa6a91b7f6f119d1b7b1f2a4c9e24d59", "moondemo", Common::EN_USA, Common::kPlatformPC },
@ -308,10 +309,11 @@ static const MD5Table md5table[] = {
{ "ce7733f185b838e248927c7ba1a04204", "maniac", Common::FR_FRA, Common::kPlatformAmiga },
{ "ce7fd0c382389a6791fc3e199c117ef4", "indy3EGA", Common::ES_ESP, Common::kPlatformPC },
{ "cea91e3dd47f2518ea418e41611aa77f", "spyfox2", Common::RU_RUS, Common::kPlatformUnknown },
{ "cf8d13446ec6cb6222287a925fd47c1d", "baseball", Common::EN_USA, Common::kPlatformWindows },
{ "cf8d13446ec6cb6222287a925fd47c1d", "baseball", Common::EN_USA, Common::kPlatformUnknown },
{ "cf90b4db5486ef798db78fe6fbf897e5", "pj3-demo", Common::EN_USA, Common::kPlatformWindows },
{ "d06fbe28818fef7bfc45c2cdf0c0849d", "zak", Common::DE_DEU, Common::kPlatformPC },
{ "d0b531227a27c6662018d2bd05aac52a", "monkeyvga", Common::DE_DEU, Common::kPlatformPC },
{ "d2cc8e31bce61e6cf2951249e10638fe", "basketball", Common::EN_USA, Common::kPlatformUnknown },
{ "d37c55388294b66e53e7ced3af88fa68", "ff2-demo", Common::EN_USA, Common::kPlatformUnknown },
{ "d43352a805d78b5f4936c6d7779bf575", "samnmax", Common::RU_RUS, Common::kPlatformPC },
{ "d4b8ee426b1afd3e53bc0cf020418cf6", "dog", Common::EN_USA, Common::kPlatformWindows },

View File

@ -383,12 +383,16 @@ static const ScummGameSettings scumm_settings[] = {
{"bb2demo", "Backyard Baseball 2001 (Demo)", GID_HEGAME, 6, 99, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformWindows, 0, 0},
{"baseball2001", "Backyard Baseball 2001", GID_HEGAME, 6, 99, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES | GF_16BIT_COLOR, Common::kPlatformWindows, 0, 0},
{"footdemo", "Backyard Football (Demo)", GID_FOOTBALL, 6, 99, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES | GF_MULTIPLE_VERSIONS, Common::kPlatformWindows, 0, 0},
{"SoccerMLS", "Backyard Soccer MLS Edition", GID_HEGAME, 6, 99, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
// Humongous Entertainment Scumm Version ?
{"basketball", "Backyard Basketball", GID_HEGAME, 6, 100, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES, Common::kPlatformWindows, 0, 0},
{"ff5demo", "Freddi Fish 5: The Case of the Creature of Coral Cave (Demo)", GID_FREDDICOVE, 6, 100, MDT_NONE,
GF_USE_KEY | GF_NEW_COSTUMES | GF_HE_LOCALIZED | GF_16BIT_COLOR, Common::kPlatformWindows, 0, 0},
{"pjgames", "Pajama Sam: Games to Play On Any Day", GID_HEGAME, 6, 100, MDT_NONE,
@ -586,6 +590,9 @@ static SubstResFileNames substResFileNameTable[] = {
{ "airdemo", "Airport Demo", kGenMac},
{ "balloon", "Balloon-O-Rama", kGenMac},
{ "baseball", "BaseBall", kGenMac},
{ "baseball2001", "Baseball 2001", kGenMac},
{ "baseball2001", "baseball 2001", kGenPC},
{ "basketball", "Basketball", kGenMac},
{ "BluesABCTimeDemo", "BluesABCTimeDemo", kGenMac},
{ "chase", "Cheese Chase", kGenMac},
{ "circdemo", "Putt Circus Demo", kGenMac },

View File

@ -1069,12 +1069,14 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
palPtr = rmap + 4;
}
int color;
uint8 *trns = _vm->findWrappedBlock(MKID('TRNS'), dataPtr, state, 0);
int color = -1;
if (_vm->VAR_WIZ_TCOLOR != 0xFF) {
uint8 *trns = _vm->findWrappedBlock(MKID('TRNS'), dataPtr, state, 0);
color = (trns == NULL) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : -1;
}
switch (comp) {
case 0:
color = (trns == NULL) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : -1;
copyRawWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, color);
break;
case 1:
@ -1089,7 +1091,6 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
copyWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, palPtr);
break;
case 2:
color = (trns == NULL) ? _vm->VAR(_vm->VAR_WIZ_TCOLOR) : -1;
copyRaw16BitWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, color);
break;
case 5: