Fix Commodore 64 versions
svn-id: r22732
This commit is contained in:
parent
5fa3985bcb
commit
a0d14a0832
16 changed files with 56 additions and 54 deletions
|
@ -831,14 +831,14 @@ void Actor::showActor() {
|
||||||
// an internal variable. Emulate this to prevent overwriting script vars...
|
// an internal variable. Emulate this to prevent overwriting script vars...
|
||||||
// Maniac NES (V1), however, DOES have a ScummVar for VAR_TALK_ACTOR
|
// Maniac NES (V1), however, DOES have a ScummVar for VAR_TALK_ACTOR
|
||||||
int ScummEngine::getTalkingActor() {
|
int ScummEngine::getTalkingActor() {
|
||||||
if (_game.id == GID_MANIAC && _game.version == 1 && !(_game.platform == Common::kPlatformNES))
|
if (_game.id == GID_MANIAC && _game.version <= 1 && !(_game.platform == Common::kPlatformNES))
|
||||||
return _V1TalkingActor;
|
return _V1TalkingActor;
|
||||||
else
|
else
|
||||||
return VAR(VAR_TALK_ACTOR);
|
return VAR(VAR_TALK_ACTOR);
|
||||||
}
|
}
|
||||||
|
|
||||||
void ScummEngine::setTalkingActor(int value) {
|
void ScummEngine::setTalkingActor(int value) {
|
||||||
if (_game.id == GID_MANIAC && _game.version == 1 && !(_game.platform == Common::kPlatformNES))
|
if (_game.id == GID_MANIAC && _game.version <= 1 && !(_game.platform == Common::kPlatformNES))
|
||||||
_V1TalkingActor = value;
|
_V1TalkingActor = value;
|
||||||
else
|
else
|
||||||
VAR(VAR_TALK_ACTOR) = value;
|
VAR(VAR_TALK_ACTOR) = value;
|
||||||
|
@ -1549,7 +1549,7 @@ void Actor::setActorCostume(int c) {
|
||||||
|
|
||||||
|
|
||||||
// V1 zak uses palette[] as a dynamic costume color array.
|
// V1 zak uses palette[] as a dynamic costume color array.
|
||||||
if (_vm->_game.version == 1)
|
if (_vm->_game.version <= 1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (_vm->_game.features & GF_NEW_COSTUMES) {
|
if (_vm->_game.features & GF_NEW_COSTUMES) {
|
||||||
|
|
|
@ -43,7 +43,7 @@ byte BaseCostumeRenderer::drawCostume(const VirtScreen &vs, int numStrips, const
|
||||||
|
|
||||||
_numStrips = numStrips;
|
_numStrips = numStrips;
|
||||||
|
|
||||||
if (_vm->_game.version == 1) {
|
if (_vm->_game.version <= 1) {
|
||||||
_xmove = 0;
|
_xmove = 0;
|
||||||
_ymove = 0;
|
_ymove = 0;
|
||||||
} else if (_vm->_game.features & GF_OLD_BUNDLE) {
|
} else if (_vm->_game.features & GF_OLD_BUNDLE) {
|
||||||
|
|
|
@ -110,7 +110,7 @@ byte ScummEngine::getMaskFromBox(int box) {
|
||||||
|
|
||||||
if (_game.version == 8)
|
if (_game.version == 8)
|
||||||
return (byte) FROM_LE_32(ptr->v8.mask);
|
return (byte) FROM_LE_32(ptr->v8.mask);
|
||||||
else if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64)
|
else if (_game.version == 0)
|
||||||
return ptr->c64.mask;
|
return ptr->c64.mask;
|
||||||
else if (_game.version <= 2)
|
else if (_game.version <= 2)
|
||||||
return ptr->v2.mask;
|
return ptr->v2.mask;
|
||||||
|
@ -144,7 +144,7 @@ byte ScummEngine::getBoxFlags(int box) {
|
||||||
return 0;
|
return 0;
|
||||||
if (_game.version == 8)
|
if (_game.version == 8)
|
||||||
return (byte) FROM_LE_32(ptr->v8.flags);
|
return (byte) FROM_LE_32(ptr->v8.flags);
|
||||||
else if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64)
|
else if (_game.version == 0)
|
||||||
return 0;
|
return 0;
|
||||||
else if (_game.version <= 2)
|
else if (_game.version <= 2)
|
||||||
return ptr->v2.flags;
|
return ptr->v2.flags;
|
||||||
|
@ -406,7 +406,7 @@ Box *ScummEngine::getBoxBaseAddr(int box) {
|
||||||
box--;
|
box--;
|
||||||
|
|
||||||
checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
|
checkRange(ptr[0] - 1, 0, box, "Illegal box %d");
|
||||||
if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64)
|
if (_game.version == 0)
|
||||||
return (Box *)(ptr + box * SIZEOF_BOX_C64 + 1);
|
return (Box *)(ptr + box * SIZEOF_BOX_C64 + 1);
|
||||||
else if (_game.version <= 2)
|
else if (_game.version <= 2)
|
||||||
return (Box *)(ptr + box * SIZEOF_BOX_V2 + 1);
|
return (Box *)(ptr + box * SIZEOF_BOX_V2 + 1);
|
||||||
|
@ -516,7 +516,7 @@ void ScummEngine::getBoxCoordinates(int boxnum, BoxCoords *box) {
|
||||||
SWAP(box->ul, box->ur);
|
SWAP(box->ul, box->ur);
|
||||||
SWAP(box->ll, box->lr);
|
SWAP(box->ll, box->lr);
|
||||||
}
|
}
|
||||||
} else if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64) {
|
} else if (_game.version == 0) {
|
||||||
box->ul.x = bp->c64.x1 * 8;
|
box->ul.x = bp->c64.x1 * 8;
|
||||||
box->ul.y = bp->c64.y1 * 2;
|
box->ul.y = bp->c64.y1 * 2;
|
||||||
box->ur.x = bp->c64.x2 * 8;
|
box->ur.x = bp->c64.x2 * 8;
|
||||||
|
@ -745,7 +745,7 @@ int ScummEngine::getPathToDestBox(byte from, byte to) {
|
||||||
|
|
||||||
boxm = getBoxMatrixBaseAddr();
|
boxm = getBoxMatrixBaseAddr();
|
||||||
|
|
||||||
if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64) {
|
if (_game.version == 0) {
|
||||||
// Skip up to the matrix data for box 'from'
|
// Skip up to the matrix data for box 'from'
|
||||||
for (i = 0; i < from; i++) {
|
for (i = 0; i < from; i++) {
|
||||||
while (*boxm != 0xFF)
|
while (*boxm != 0xFF)
|
||||||
|
|
|
@ -367,7 +367,7 @@ void ScummEngine_v5::setBuiltinCursor(int idx) {
|
||||||
|
|
||||||
memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor));
|
memset(_grabbedCursor, 0xFF, sizeof(_grabbedCursor));
|
||||||
|
|
||||||
if (_game.version == 1)
|
if (_game.version <= 1)
|
||||||
color = default_v1_cursor_colors[idx];
|
color = default_v1_cursor_colors[idx];
|
||||||
else
|
else
|
||||||
color = default_cursor_colors[idx];
|
color = default_cursor_colors[idx];
|
||||||
|
|
|
@ -222,7 +222,7 @@ void Gdi::init() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) {
|
void Gdi::roomChanged(byte *roomptr, uint32 IM00_offs, byte transparentColor) {
|
||||||
if (_vm->_game.version == 1) {
|
if (_vm->_game.version <= 1) {
|
||||||
if (_vm->_game.platform == Common::kPlatformNES) {
|
if (_vm->_game.platform == Common::kPlatformNES) {
|
||||||
decodeNESGfx(roomptr);
|
decodeNESGfx(roomptr);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1404,7 +1404,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
|
||||||
|
|
||||||
_objectMode = (flag & dbObjectMode) == dbObjectMode;
|
_objectMode = (flag & dbObjectMode) == dbObjectMode;
|
||||||
|
|
||||||
if (_objectMode && _vm->_game.version == 1) {
|
if (_objectMode && _vm->_game.version <= 1) {
|
||||||
if (_vm->_game.platform == Common::kPlatformNES) {
|
if (_vm->_game.platform == Common::kPlatformNES) {
|
||||||
decodeNESObject(ptr, x, y, width, height);
|
decodeNESObject(ptr, x, y, width, height);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1484,7 +1484,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
|
||||||
else
|
else
|
||||||
dstPtr = (byte *)vs->pixels + y * vs->pitch + (x + k) * 8;
|
dstPtr = (byte *)vs->pixels + y * vs->pitch + (x + k) * 8;
|
||||||
|
|
||||||
if (_vm->_game.version == 1) {
|
if (_vm->_game.version <= 1) {
|
||||||
if (_vm->_game.platform == Common::kPlatformNES) {
|
if (_vm->_game.platform == Common::kPlatformNES) {
|
||||||
mask_ptr = getMaskBuffer(x + k, y, 1);
|
mask_ptr = getMaskBuffer(x + k, y, 1);
|
||||||
drawStripNES(dstPtr, mask_ptr, vs->pitch, stripnr, y, height);
|
drawStripNES(dstPtr, mask_ptr, vs->pitch, stripnr, y, height);
|
||||||
|
@ -1535,7 +1535,7 @@ void Gdi::drawBitmap(const byte *ptr, VirtScreen *vs, int x, int y, const int wi
|
||||||
if (_vm->_game.version == 8 || _vm->_game.heversion >= 60)
|
if (_vm->_game.version == 8 || _vm->_game.heversion >= 60)
|
||||||
transpStrip = true;
|
transpStrip = true;
|
||||||
|
|
||||||
if (_vm->_game.version == 1) {
|
if (_vm->_game.version <= 1) {
|
||||||
mask_ptr = getMaskBuffer(x + k, y, 1);
|
mask_ptr = getMaskBuffer(x + k, y, 1);
|
||||||
if (_vm->_game.platform == Common::kPlatformNES) {
|
if (_vm->_game.platform == Common::kPlatformNES) {
|
||||||
drawStripNESMask(mask_ptr, stripnr, y, height);
|
drawStripNESMask(mask_ptr, stripnr, y, height);
|
||||||
|
|
|
@ -338,7 +338,7 @@ int ScummEngine::findObject(int x, int y) {
|
||||||
if ((_objs[i].obj_nr < 1) || getClass(_objs[i].obj_nr, kObjectClassUntouchable))
|
if ((_objs[i].obj_nr < 1) || getClass(_objs[i].obj_nr, kObjectClassUntouchable))
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC) {
|
if (_game.version == 0) {
|
||||||
if (_objs[i].flags == 0 && _objs[i].state & 0x2)
|
if (_objs[i].flags == 0 && _objs[i].state & 0x2)
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
|
@ -642,7 +642,7 @@ void ScummEngine_v3old::resetRoomObjects() {
|
||||||
for (i = 0; i < _numObjectsInRoom; i++) {
|
for (i = 0; i < _numObjectsInRoom; i++) {
|
||||||
od = &_objs[findLocalObjectSlot()];
|
od = &_objs[findLocalObjectSlot()];
|
||||||
|
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC && READ_LE_UINT16(ptr) == defaultPtr)
|
if (_game.version == 0 && READ_LE_UINT16(ptr) == defaultPtr)
|
||||||
od->OBIMoffset = 0;
|
od->OBIMoffset = 0;
|
||||||
else
|
else
|
||||||
od->OBIMoffset = READ_LE_UINT16(ptr);
|
od->OBIMoffset = READ_LE_UINT16(ptr);
|
||||||
|
@ -994,7 +994,7 @@ const byte *ScummEngine::getObjOrActorName(int obj) {
|
||||||
byte *objptr;
|
byte *objptr;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
if (obj < _numActors && !(_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC))
|
if (obj < _numActors && _game.version >= 1)
|
||||||
return derefActor(obj, "getObjOrActorName")->getActorName();
|
return derefActor(obj, "getObjOrActorName")->getActorName();
|
||||||
|
|
||||||
for (i = 0; i < _numNewNames; i++) {
|
for (i = 0; i < _numNewNames; i++) {
|
||||||
|
@ -1011,7 +1011,7 @@ const byte *ScummEngine::getObjOrActorName(int obj) {
|
||||||
if (_game.features & GF_SMALL_HEADER) {
|
if (_game.features & GF_SMALL_HEADER) {
|
||||||
byte offset = 0;
|
byte offset = 0;
|
||||||
|
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC)
|
if (_game.version == 0)
|
||||||
offset = *(objptr + 13);
|
offset = *(objptr + 13);
|
||||||
else if (_game.version <= 2)
|
else if (_game.version <= 2)
|
||||||
offset = *(objptr + 14);
|
offset = *(objptr + 14);
|
||||||
|
@ -1098,7 +1098,7 @@ const byte *ScummEngine::getOBIMFromObjectData(const ObjectData &od) {
|
||||||
const byte *ptr;
|
const byte *ptr;
|
||||||
|
|
||||||
// For objects without image in C64 version of Maniac Mansion
|
// For objects without image in C64 version of Maniac Mansion
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC && od.OBIMoffset == 0)
|
if (_game.version == 0 && od.OBIMoffset == 0)
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (od.fl_object_index) {
|
if (od.fl_object_index) {
|
||||||
|
|
|
@ -32,7 +32,7 @@
|
||||||
namespace Scumm {
|
namespace Scumm {
|
||||||
|
|
||||||
void ScummEngine::resetPalette() {
|
void ScummEngine::resetPalette() {
|
||||||
if (_game.version == 1) {
|
if (_game.version <= 1) {
|
||||||
if (_game.platform == Common::kPlatformC64) {
|
if (_game.platform == Common::kPlatformC64) {
|
||||||
setC64Palette();
|
setC64Palette();
|
||||||
} else if (_game.platform == Common::kPlatformNES) {
|
} else if (_game.platform == Common::kPlatformNES) {
|
||||||
|
|
|
@ -1077,7 +1077,9 @@ static bool testGame(const GameSettings *g, const DescMap &fileMD5Map, const Com
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (file == "00.LFL") {
|
if (file == "maniac1.d64" || file == "zak1.d64") {
|
||||||
|
// TODO
|
||||||
|
} else if (file == "00.LFL" || file == "maniac1.d64" || file == "zak1.d64") {
|
||||||
// Used in V1, V2, V3 games.
|
// Used in V1, V2, V3 games.
|
||||||
if (g->version > 3)
|
if (g->version > 3)
|
||||||
return false;
|
return false;
|
||||||
|
|
|
@ -191,7 +191,10 @@ void ScummEngine_v2::readIndexFile() {
|
||||||
break;
|
break;
|
||||||
case 0x132:
|
case 0x132:
|
||||||
printf("C64 V1 game detected\n");
|
printf("C64 V1 game detected\n");
|
||||||
assert(_game.version == 1);
|
if (_game.id == GID_MANIAC)
|
||||||
|
assert(_game.version == 0);
|
||||||
|
else
|
||||||
|
assert(_game.version == 1);
|
||||||
readClassicIndexFile();
|
readClassicIndexFile();
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|
|
@ -197,7 +197,7 @@ void ScummEngine::startScene(int room, Actor *a, int objectNr) {
|
||||||
|
|
||||||
_egoPositioned = false;
|
_egoPositioned = false;
|
||||||
runEntryScript();
|
runEntryScript();
|
||||||
if ((_game.version <= 2) && !(_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64)) {
|
if (_game.version >= 1 && _game.version <= 2) {
|
||||||
runScript(5, 0, 0, 0);
|
runScript(5, 0, 0, 0);
|
||||||
} else if (_game.version >= 5 && _game.version <= 6) {
|
} else if (_game.version >= 5 && _game.version <= 6) {
|
||||||
if (a && !_egoPositioned) {
|
if (a && !_egoPositioned) {
|
||||||
|
@ -582,7 +582,7 @@ void ScummEngine_v3old::setupRoomSubBlocks() {
|
||||||
//
|
//
|
||||||
rmhd = (const RoomHeader *)(roomptr + 4);
|
rmhd = (const RoomHeader *)(roomptr + 4);
|
||||||
|
|
||||||
if (_game.version == 1) {
|
if (_game.version <= 1) {
|
||||||
if (_game.platform == Common::kPlatformNES) {
|
if (_game.platform == Common::kPlatformNES) {
|
||||||
_roomWidth = READ_LE_UINT16(&(rmhd->old.width)) * 8;
|
_roomWidth = READ_LE_UINT16(&(rmhd->old.width)) * 8;
|
||||||
_roomHeight = READ_LE_UINT16(&(rmhd->old.height)) * 8;
|
_roomHeight = READ_LE_UINT16(&(rmhd->old.height)) * 8;
|
||||||
|
@ -605,7 +605,7 @@ void ScummEngine_v3old::setupRoomSubBlocks() {
|
||||||
//
|
//
|
||||||
// Find the room image data
|
// Find the room image data
|
||||||
//
|
//
|
||||||
if (_game.version == 1) {
|
if (_game.version <= 1) {
|
||||||
_IM00_offs = 0;
|
_IM00_offs = 0;
|
||||||
} else {
|
} else {
|
||||||
_IM00_offs = READ_LE_UINT16(roomptr + 0x0A);
|
_IM00_offs = READ_LE_UINT16(roomptr + 0x0A);
|
||||||
|
@ -708,7 +708,7 @@ void ScummEngine_v3old::resetRoomSubBlocks() {
|
||||||
error("Room %d: data not found (" __FILE__ ":%d)", _roomResource, __LINE__);
|
error("Room %d: data not found (" __FILE__ ":%d)", _roomResource, __LINE__);
|
||||||
|
|
||||||
// Reset room color for V1 zak
|
// Reset room color for V1 zak
|
||||||
if (_game.version == 1)
|
if (_game.version <= 1)
|
||||||
_roomPalette[0] = 0;
|
_roomPalette[0] = 0;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -725,7 +725,7 @@ void ScummEngine_v3old::resetRoomSubBlocks() {
|
||||||
byte numOfBoxes = 0;
|
byte numOfBoxes = 0;
|
||||||
int size;
|
int size;
|
||||||
|
|
||||||
if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64) {
|
if (_game.version == 0) {
|
||||||
// Count number of boxes
|
// Count number of boxes
|
||||||
while (*ptr != 0xFF) {
|
while (*ptr != 0xFF) {
|
||||||
numOfBoxes++;
|
numOfBoxes++;
|
||||||
|
@ -750,7 +750,7 @@ void ScummEngine_v3old::resetRoomSubBlocks() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ptr += size;
|
ptr += size;
|
||||||
if (_game.id == GID_MANIAC && _game.platform == Common::kPlatformC64) {
|
if (_game.version == 0) {
|
||||||
const byte *tmp = ptr;
|
const byte *tmp = ptr;
|
||||||
size = 0;
|
size = 0;
|
||||||
|
|
||||||
|
|
|
@ -334,7 +334,7 @@ bool ScummEngine::loadState(int slot, bool compat) {
|
||||||
// Reset the palette.
|
// Reset the palette.
|
||||||
resetPalette();
|
resetPalette();
|
||||||
|
|
||||||
if (hdr.ver < VER(35) && _game.id == GID_MANIAC && _game.version == 1)
|
if (hdr.ver < VER(35) && _game.id == GID_MANIAC && _game.version <= 1)
|
||||||
resetV1ActorTalkColor();
|
resetV1ActorTalkColor();
|
||||||
|
|
||||||
// Load the static room data
|
// Load the static room data
|
||||||
|
|
|
@ -156,7 +156,7 @@ int ScummEngine::getVerbEntrypoint(int obj, int entry) {
|
||||||
objptr = getOBCDFromObject(obj);
|
objptr = getOBCDFromObject(obj);
|
||||||
assert(objptr);
|
assert(objptr);
|
||||||
|
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC)
|
if (_game.version == 0)
|
||||||
verbptr = objptr + 14;
|
verbptr = objptr + 14;
|
||||||
else if (_game.version <= 2)
|
else if (_game.version <= 2)
|
||||||
verbptr = objptr + 15;
|
verbptr = objptr + 15;
|
||||||
|
|
|
@ -1110,7 +1110,7 @@ void ScummEngine_v5::o5_saveLoadGame() {
|
||||||
byte slot = (a & 0x1F) + 1;
|
byte slot = (a & 0x1F) + 1;
|
||||||
byte result = 0;
|
byte result = 0;
|
||||||
|
|
||||||
if ((_game.id == GID_MANIAC) && (_game.version == 1)) {
|
if ((_game.id == GID_MANIAC) && (_game.version <= 1)) {
|
||||||
// Convert older load/save screen
|
// Convert older load/save screen
|
||||||
// 1 Load
|
// 1 Load
|
||||||
// 2 Save
|
// 2 Save
|
||||||
|
|
|
@ -608,7 +608,7 @@ ScummEngine::ScummEngine(OSystem *syst, const DetectorResult &dr)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Do some render mode restirctions
|
// Do some render mode restirctions
|
||||||
if (_game.version == 1)
|
if (_game.version <= 1)
|
||||||
_renderMode = Common::kRenderDefault;
|
_renderMode = Common::kRenderDefault;
|
||||||
|
|
||||||
switch (_renderMode) {
|
switch (_renderMode) {
|
||||||
|
@ -1107,7 +1107,7 @@ void ScummEngine::setupCostumeRenderer() {
|
||||||
if (_game.features & GF_NEW_COSTUMES) {
|
if (_game.features & GF_NEW_COSTUMES) {
|
||||||
_costumeRenderer = new AkosRenderer(this);
|
_costumeRenderer = new AkosRenderer(this);
|
||||||
_costumeLoader = new AkosCostumeLoader(this);
|
_costumeLoader = new AkosCostumeLoader(this);
|
||||||
} else if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC) {
|
} else if (_game.version == 0) {
|
||||||
_costumeRenderer = new C64CostumeRenderer(this);
|
_costumeRenderer = new C64CostumeRenderer(this);
|
||||||
_costumeLoader = new C64CostumeLoader(this);
|
_costumeLoader = new C64CostumeLoader(this);
|
||||||
} else if (_game.platform == Common::kPlatformNES) {
|
} else if (_game.platform == Common::kPlatformNES) {
|
||||||
|
@ -1125,11 +1125,10 @@ void ScummEngine::resetScumm() {
|
||||||
_tempMusic = 0;
|
_tempMusic = 0;
|
||||||
debug(9, "resetScumm");
|
debug(9, "resetScumm");
|
||||||
|
|
||||||
if ((_game.id == GID_MANIAC) && (_game.version == 1) && !(_game.platform == Common::kPlatformNES)) {
|
if (_game.version == 0) {
|
||||||
if (_game.platform == Common::kPlatformC64)
|
initScreens(8, 144);
|
||||||
initScreens(8, 144);
|
} else if ((_game.id == GID_MANIAC) && (_game.version <= 1) && !(_game.platform == Common::kPlatformNES)) {
|
||||||
else
|
initScreens(16, 152);
|
||||||
initScreens(16, 152);
|
|
||||||
} else if (_game.version >= 7 || _game.heversion >= 71) {
|
} else if (_game.version >= 7 || _game.heversion >= 71) {
|
||||||
initScreens(0, _screenHeight);
|
initScreens(0, _screenHeight);
|
||||||
} else {
|
} else {
|
||||||
|
@ -1166,11 +1165,11 @@ void ScummEngine::resetScumm() {
|
||||||
_actors[i].initActor(1);
|
_actors[i].initActor(1);
|
||||||
|
|
||||||
// this is from IDB
|
// this is from IDB
|
||||||
if ((_game.version == 1) || (_game.id == GID_MANIAC && (_game.features & GF_DEMO)))
|
if ((_game.version <= 1) || (_game.id == GID_MANIAC && (_game.features & GF_DEMO)))
|
||||||
_actors[i].setActorCostume(i);
|
_actors[i].setActorCostume(i);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_game.id == GID_MANIAC && _game.version == 1) {
|
if (_game.id == GID_MANIAC && _game.version <= 1) {
|
||||||
resetV1ActorTalkColor();
|
resetV1ActorTalkColor();
|
||||||
} else if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO)) {
|
} else if (_game.id == GID_MANIAC && _game.version == 2 && (_game.features & GF_DEMO)) {
|
||||||
// HACK Some palette changes needed for demo script
|
// HACK Some palette changes needed for demo script
|
||||||
|
@ -1818,9 +1817,16 @@ void ScummEngine::scummLoop_updateScummVars() {
|
||||||
if (_game.version <= 7)
|
if (_game.version <= 7)
|
||||||
VAR(VAR_HAVE_MSG) = _haveMsg;
|
VAR(VAR_HAVE_MSG) = _haveMsg;
|
||||||
|
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC) {
|
if (_game.version >= 3) {
|
||||||
// TODO
|
VAR(VAR_VIRT_MOUSE_X) = _virtualMouse.x;
|
||||||
} else if (_game.version <= 2) {
|
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y;
|
||||||
|
VAR(VAR_MOUSE_X) = _mouse.x;
|
||||||
|
VAR(VAR_MOUSE_Y) = _mouse.y;
|
||||||
|
if (VAR_DEBUGMODE != 0xFF) {
|
||||||
|
// This is NOT for the Mac version of Indy3/Loom
|
||||||
|
VAR(VAR_DEBUGMODE) = _debugMode;
|
||||||
|
}
|
||||||
|
} else if (_game.version >= 1) {
|
||||||
VAR(VAR_VIRT_MOUSE_X) = _virtualMouse.x / 8;
|
VAR(VAR_VIRT_MOUSE_X) = _virtualMouse.x / 8;
|
||||||
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
|
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y / 2;
|
||||||
|
|
||||||
|
@ -1830,15 +1836,6 @@ void ScummEngine::scummLoop_updateScummVars() {
|
||||||
if (VAR(VAR_VIRT_MOUSE_X) < 0)
|
if (VAR(VAR_VIRT_MOUSE_X) < 0)
|
||||||
VAR(VAR_VIRT_MOUSE_X) = 0;
|
VAR(VAR_VIRT_MOUSE_X) = 0;
|
||||||
}
|
}
|
||||||
} else {
|
|
||||||
VAR(VAR_VIRT_MOUSE_X) = _virtualMouse.x;
|
|
||||||
VAR(VAR_VIRT_MOUSE_Y) = _virtualMouse.y;
|
|
||||||
VAR(VAR_MOUSE_X) = _mouse.x;
|
|
||||||
VAR(VAR_MOUSE_Y) = _mouse.y;
|
|
||||||
if (VAR_DEBUGMODE != 0xFF) {
|
|
||||||
// This is NOT for the Mac version of Indy3/Loom
|
|
||||||
VAR(VAR_DEBUGMODE) = _debugMode;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -553,7 +553,7 @@ void ScummEngine::CHARSET_1() {
|
||||||
_charset->_nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2;
|
_charset->_nextLeft -= _charset->getStringWidth(0, _charsetBuffer + _charsetBufPos) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC) {
|
if (_game.version == 0) {
|
||||||
break;
|
break;
|
||||||
} else if (!(_game.platform == Common::kPlatformFMTowns) && _string[0].height) {
|
} else if (!(_game.platform == Common::kPlatformFMTowns) && _string[0].height) {
|
||||||
_charset->_nextTop += _string[0].height;
|
_charset->_nextTop += _string[0].height;
|
||||||
|
|
|
@ -332,7 +332,7 @@ void ScummEngine_v2::checkV2Inventory(int x, int y) {
|
||||||
object = findInventory(_scummVars[VAR_EGO], object + 1 + _inventoryOffset);
|
object = findInventory(_scummVars[VAR_EGO], object + 1 + _inventoryOffset);
|
||||||
|
|
||||||
if (object > 0) {
|
if (object > 0) {
|
||||||
if (_game.platform == Common::kPlatformC64 && _game.id == GID_MANIAC) {
|
if (_game.version == 0) {
|
||||||
if (_activeInventory != object) {
|
if (_activeInventory != object) {
|
||||||
_activeInventory = object;
|
_activeInventory = object;
|
||||||
} else if (_activeVerb != 3 && _activeVerb != 13) {
|
} else if (_activeVerb != 3 && _activeVerb != 13) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue