Add Moonbase Commander target again, for testing only.

svn-id: r35379
This commit is contained in:
Travis Howell 2008-12-15 09:54:21 +00:00
parent 2ce4a32fb6
commit ddb810e17b
10 changed files with 80 additions and 10 deletions

View File

@ -107,6 +107,7 @@ static const PlainGameDescriptor gameDescriptions[] = {
{ "jungle", "Let's Explore the Jungle with Buzzy" },
{ "lost", "Pajama Sam's Lost & Found" },
{ "maze", "Freddi Fish and Luther's Maze Madness" },
{ "moonbase", "Moonbase Commander" },
{ "mustard", "SPY Fox in Hold the Mustard" },
{ "pajama", "Pajama Sam 1: No Need to Hide When It's Dark Outside" },
{ "pajama2", "Pajama Sam 2: Thunder and Lightning Aren't so Frightening" },
@ -347,16 +348,19 @@ static const GameSettings gameVariantsTable[] = {
// Restructured the Scumm engine
{"pjgames", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_HE_NOSUBTITLES | GF_HE_LOCALIZED | GF_16BIT_COLOR, UNK},
// Uses bink in external files for logos
{"Baseball2003", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
{"basketball", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK},
{"Soccer2004", 0, 0, GID_SOCCER, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
// Uses smacker in external files, for testing only
{"arttime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
{"readtime", 0, 0, GID_HEGAME, 6, 99, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
{"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
// Uses bink in external files for logos
{"Baseball2003", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
{"basketball", 0, 0, GID_HEGAME, 6, 100, MDT_NONE, GF_USE_KEY| GF_16BIT_COLOR, UNK},
{"football2002", 0, 0, GID_FOOTBALL, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
{"Soccer2004", 0, 0, GID_SOCCER, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
// U32 code required, for testing only
{"moonbase", 0, 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR, UNK},
{"moonbase", "Demo", 0, GID_MOONBASE, 6, 100, MDT_NONE, GF_USE_KEY | GF_16BIT_COLOR | GF_DEMO, UNK},
// The following are meant to be generic HE game variants and as such do
// not specify a game ID. Make sure that these are last in the table, else
@ -640,6 +644,9 @@ static const GameFilenamePattern gameFilenamesTable[] = {
{ "maze", "Doolhof", kGenHEMac, Common::NL_NLD, Common::kPlatformMacintosh, 0 },
{ "maze", "Maze Madness", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },
{ "moonbase", "moonbase", kGenHEPC, UNK_LANG, UNK, 0 },
{ "moonbase", "moondemo", kGenHEPC, UNK_LANG, UNK, 0 },
{ "mustard", "mustard", kGenHEPC, UNK_LANG, UNK, 0 },
{ "mustard", "Mustard", kGenHEMac, UNK_LANG, Common::kPlatformMacintosh, 0 },

View File

@ -959,4 +959,16 @@ int LogicHEsoccer::op_1021(int32 *args) {
return 1;
}
/***********************
* Moonbase Commander
*
*/
int LogicHEmoonbase::versionID() {
if (_vm->_game.features & GF_DEMO)
return -100;
else
return 100;
}
} // End of namespace Scumm

View File

@ -135,6 +135,13 @@ private:
int op_1021(int32 *args);
};
class LogicHEmoonbase : public LogicHE {
public:
LogicHEmoonbase(ScummEngine_v90he *vm) : LogicHE(vm) {}
int versionID();
};
} // End of namespace Scumm
#endif

View File

@ -430,6 +430,8 @@ int ScummEngine_v60he::convertFilePath(byte *dst) {
if (dst[r - 1] == '/')
break;
}
} else if (dst[0] == 'u' && dst[1] == 's') { // Save Game Path (Moonbase Commander)
r = 5;
}
debug(1, "convertFilePath: converted filePath is %s", dst + r);

View File

@ -1676,6 +1676,11 @@ void ScummEngine_v72he::o72_openFile() {
copyScriptString(buffer, sizeof(buffer));
debug(1, "Original filename %s", buffer);
// HACK: INI filename seems to get reset, corruption elsewhere?
if (_game.id == GID_MOONBASE && buffer[0] == 0) {
strcpy((char *)buffer, "moonbase.ini");
}
const char *filename = (char *)buffer + convertFilePath(buffer);
debug(1, "Final filename to %s", filename);

View File

@ -526,7 +526,7 @@ void Wiz::copyRawWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int
}
void Wiz::copyRaw16BitWizImage(uint8 *dst, const uint8 *src, int dstw, int dsth, int srcx, int srcy, int srcw, int srch, const Common::Rect *rect, int flags, const uint8 *palPtr, int transColor) {
// RAW 16 bits in 555 format
// TODO: RAW 16 bits in 555 format
// HACK: Skip every second bit for now
Common::Rect r1, r2;
@ -1238,6 +1238,12 @@ uint8 *Wiz::drawWizImage(int resNum, int state, int x1, int y1, int zorder, int
case 2:
copyRaw16BitWizImage(dst, wizd, cw, ch, x1, y1, width, height, &rScreen, flags, palPtr, transColor);
break;
case 4:
// TODO: Unknown image type
break;
case 5:
// TODO: 16bit color compressed image
break;
default:
error("drawWizImage: Unhandled wiz compression type %d", comp);
}
@ -2105,7 +2111,15 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags
ret = isWizPixelNonTransparent(wizd, x, y, w, h);
break;
case 2:
// Used baseball2003
// TODO: 16bit color uncompressed image type
debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
break;
case 4:
// TODO: Unknown image type
debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
break;
case 5:
// TODO: 16bit color compressed image type
debug(0, "isWizPixelNonTransparent: Unhandled wiz compression type %d", c);
break;
default:
@ -2117,7 +2131,7 @@ int Wiz::isWizPixelNonTransparent(int resNum, int state, int x, int y, int flags
}
uint8 Wiz::getWizPixelColor(int resNum, int state, int x, int y, int flags) {
uint8 color;
uint8 color = 0;
uint8 *data = _vm->getResourceAddress(rtImage, resNum);
assert(data);
uint8 *wizh = _vm->findWrappedBlock(MKID_BE('WIZH'), data, state, 0);
@ -2138,6 +2152,18 @@ uint8 Wiz::getWizPixelColor(int resNum, int state, int x, int y, int flags) {
case 1:
color = getWizPixelColor(wizd, x, y, w, h, _vm->VAR(_vm->VAR_WIZ_TCOLOR));
break;
case 2:
// TODO: 16bit color uncompressed image type
debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
break;
case 4:
// TODO: Unknown image type
debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
break;
case 5:
// TODO: 16bit color compressed image type
debug(0, "getWizPixelColor: Unhandled wiz compression type %d", c);
break;
default:
error("getWizPixelColor: Unhandled wiz compression type %d", c);
break;

View File

@ -1,5 +1,5 @@
/*
This file was generated by the md5table tool on Fri Oct 3 16:12:45 2008
This file was generated by the md5table tool on Mon Dec 15 08:27:46 2008
DO NOT EDIT MANUALLY!
*/
@ -498,6 +498,7 @@ static const MD5Table md5table[] = {
{ "ce7733f185b838e248927c7ba1a04204", "maniac", "V2", "V2", -1, Common::FR_FRA, Common::kPlatformAmiga },
{ "ce7fd0c382389a6791fc3e199c117ef4", "indy3", "EGA", "EGA", -1, Common::ES_ESP, Common::kPlatformPC },
{ "cea91e3dd47f2518ea418e41611aa77f", "spyfox2", "", "", -1, Common::RU_RUS, Common::kPlatformUnknown },
{ "cf400d20769fb70eb21766582f4924f7", "moonbase", "", "", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "cf4ef315214c7d8cdab6302cdb7e50db", "freddi", "HE 73", "Demo", -1, Common::DE_DEU, Common::kPlatformWindows },
{ "cf8d13446ec6cb6222287a925fd47c1d", "baseball", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "cf8ef3a1fb483c5c4b1c584d1167b2c4", "freddi", "HE 73", "", -1, Common::DE_DEU, Common::kPlatformWindows },
@ -573,6 +574,7 @@ static const MD5Table md5table[] = {
{ "ee41f6afbc5b26fa475754b56fe92048", "puttputt", "HE 61", "", 8032, Common::JA_JPN, Common::kPlatform3DO },
{ "ee785fe2569bc9965526e774f7ab86f1", "spyfox", "HE 99", "", -1, Common::FR_FRA, Common::kPlatformMacintosh },
{ "ef347474f3c7be3b29584eaa133cca05", "samnmax", "", "Floppy", -1, Common::FR_FRA, Common::kPlatformPC },
{ "ef71a322b6530ac45b1a070f7c0795f7", "moonbase", "Demo", "Demo", -1, Common::EN_ANY, Common::kPlatformWindows },
{ "ef74d9071d4e564b037cb44bd6774de7", "fbear", "HE 61", "", -1, Common::HB_ISR, Common::kPlatformPC },
{ "efe0a04a703e765ebebe92b6c8aa6b86", "baseball2003", "", "", -1, Common::EN_ANY, Common::kPlatformUnknown },
{ "f049e38c1f8302b5db6170f1872af89a", "monkey", "CD", "CD", 8955, Common::ES_ESP, Common::kPlatformPC },

View File

@ -1503,6 +1503,10 @@ void ScummEngine_v90he::resetScumm() {
_logicHE = new LogicHEsoccer(this);
break;
case GID_MOONBASE:
_logicHE = new LogicHEmoonbase(this);
break;
default:
_logicHE = new LogicHE(this);
break;

View File

@ -225,6 +225,7 @@ enum ScummGameId {
GID_FUNSHOP, // Used for all three funshops
GID_FOOTBALL,
GID_SOCCER,
GID_MOONBASE,
GID_HECUP // CUP demos
};

View File

@ -591,6 +591,10 @@ jungle Let's Explore the Jungle with Buzzy
659942b9a6b519f123a13cca3c333a13 -1 en Mac - - - Joachim Eberhard
8801fb4a1200b347f7a38523339526dd -1 en Windows - - - Kirben
moonbase Moonbase Commander
cf400d20769fb70eb21766582f4924f7 -1 en Windows - - - Kirben
ef71a322b6530ac45b1a070f7c0795f7 -1 en Windows Demo Demo - Kirben
pajama Pajama Sam 1: No Need to Hide When It's Dark Outside
672dec94b82f7f0877ebb5b5cf7f4bc1 -1 us All - - - khalek
1d7a2e1ddcade791e2de0cfceac86725 -1 fr All - - - gist974, ThierryFR