diff options
author | Travis Howell | 2008-12-15 09:54:21 +0000 |
---|---|---|
committer | Travis Howell | 2008-12-15 09:54:21 +0000 |
commit | ddb810e17b76a999d46d1a4aba68e8a66edd7668 (patch) | |
tree | f8f41dbed4dc102ed4e107840a5e550e180ec7a8 /engines/scumm/he | |
parent | 2ce4a32fb61567522e0a7afb76337aca12357dcb (diff) | |
download | scummvm-rg350-ddb810e17b76a999d46d1a4aba68e8a66edd7668.tar.gz scummvm-rg350-ddb810e17b76a999d46d1a4aba68e8a66edd7668.tar.bz2 scummvm-rg350-ddb810e17b76a999d46d1a4aba68e8a66edd7668.zip |
Add Moonbase Commander target again, for testing only.
svn-id: r35379
Diffstat (limited to 'engines/scumm/he')
-rw-r--r-- | engines/scumm/he/logic_he.cpp | 12 | ||||
-rw-r--r-- | engines/scumm/he/logic_he.h | 7 | ||||
-rw-r--r-- | engines/scumm/he/script_v60he.cpp | 2 | ||||
-rw-r--r-- | engines/scumm/he/script_v72he.cpp | 5 | ||||
-rw-r--r-- | engines/scumm/he/wiz_he.cpp | 32 |
5 files changed, 55 insertions, 3 deletions
diff --git a/engines/scumm/he/logic_he.cpp b/engines/scumm/he/logic_he.cpp index 5bc61da76d..f7f4c1effc 100644 --- a/engines/scumm/he/logic_he.cpp +++ b/engines/scumm/he/logic_he.cpp @@ -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 diff --git a/engines/scumm/he/logic_he.h b/engines/scumm/he/logic_he.h index b144f78c46..67b3ce78d3 100644 --- a/engines/scumm/he/logic_he.h +++ b/engines/scumm/he/logic_he.h @@ -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 diff --git a/engines/scumm/he/script_v60he.cpp b/engines/scumm/he/script_v60he.cpp index e908670c83..f6e88596d4 100644 --- a/engines/scumm/he/script_v60he.cpp +++ b/engines/scumm/he/script_v60he.cpp @@ -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); diff --git a/engines/scumm/he/script_v72he.cpp b/engines/scumm/he/script_v72he.cpp index 78be4399a4..afedcdba22 100644 --- a/engines/scumm/he/script_v72he.cpp +++ b/engines/scumm/he/script_v72he.cpp @@ -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); diff --git a/engines/scumm/he/wiz_he.cpp b/engines/scumm/he/wiz_he.cpp index f514449bff..62d81e2640 100644 --- a/engines/scumm/he/wiz_he.cpp +++ b/engines/scumm/he/wiz_he.cpp @@ -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; |