aboutsummaryrefslogtreecommitdiff
path: root/engines/scumm
diff options
context:
space:
mode:
authorTobias Gunkel2012-02-04 18:34:08 +0100
committerTobias Gunkel2012-02-11 08:30:08 +0100
commit9dd6105ce62210509207dc61607543b7bcf5639d (patch)
tree83bd5eed06f9a48d1b7f9cf28c0edc57359121ca /engines/scumm
parent8d3b27293965ea17a4a34a1258688f9eeb3410d1 (diff)
downloadscummvm-rg350-9dd6105ce62210509207dc61607543b7bcf5639d.tar.gz
scummvm-rg350-9dd6105ce62210509207dc61607543b7bcf5639d.tar.bz2
scummvm-rg350-9dd6105ce62210509207dc61607543b7bcf5639d.zip
SCUMM: replace "c64" with "v0" when it applies to both C64 and AppleII v0 versions
In addition some routines (e.g. the gfx ones) that are even used in v1.
Diffstat (limited to 'engines/scumm')
-rw-r--r--engines/scumm/actor.cpp52
-rw-r--r--engines/scumm/actor.h6
-rw-r--r--engines/scumm/boxes.cpp26
-rw-r--r--engines/scumm/boxes.h2
-rw-r--r--engines/scumm/charset-fontdata.cpp2
-rw-r--r--engines/scumm/costume.cpp28
-rw-r--r--engines/scumm/costume.h10
-rw-r--r--engines/scumm/gfx.cpp70
-rw-r--r--engines/scumm/gfx.h12
-rw-r--r--engines/scumm/object.cpp4
-rw-r--r--engines/scumm/room.cpp2
-rw-r--r--engines/scumm/script.cpp4
-rw-r--r--engines/scumm/script_v0.cpp24
-rw-r--r--engines/scumm/script_v2.cpp2
-rw-r--r--engines/scumm/scumm.cpp8
-rw-r--r--engines/scumm/scumm_v0.h6
-rw-r--r--engines/scumm/verbs.cpp4
17 files changed, 131 insertions, 131 deletions
diff --git a/engines/scumm/actor.cpp b/engines/scumm/actor.cpp
index 59c4110348..ee655dec33 100644
--- a/engines/scumm/actor.cpp
+++ b/engines/scumm/actor.cpp
@@ -175,7 +175,7 @@ void Actor_v2::initActor(int mode) {
_talkStopFrame = 4;
}
-void ActorC64::initActor(int mode) {
+void Actor_v0::initActor(int mode) {
Actor_v2::initActor(mode);
_costCommandNew = 0xFF;
@@ -251,7 +251,7 @@ void Actor::stopActorMoving() {
_moving = 0;
if(_vm->_game.version == 0)
- ((ActorC64 *)this)->setDirection(_facing);
+ ((Actor_v0 *)this)->setDirection(_facing);
}
void Actor::setActorWalkSpeed(uint newSpeedX, uint newSpeedY) {
@@ -340,7 +340,7 @@ int Actor::actorWalkStep() {
int nextFacing;
if(_vm->_game.version == 0)
- ((ActorC64 *)this)->_animFrameRepeat = -1;
+ ((Actor_v0 *)this)->_animFrameRepeat = -1;
_needRedraw = true;
@@ -584,7 +584,7 @@ void Actor_v2::walkActor() {
actorWalkStep();
if(_vm->_game.version == 0)
- ((ActorC64 *)this)->animateActor(newDirToOldDir(_facing));
+ ((Actor_v0 *)this)->animateActor(newDirToOldDir(_facing));
} else {
if (_moving & MF_LAST_LEG) {
_moving = 0;
@@ -805,7 +805,7 @@ int Actor::remapDirection(int dir, bool is_walking) {
return 180;
}
- // MM C64 stores flags as a part of the mask
+ // MM v0 stores flags as a part of the mask
if (_vm->_game.version == 0) {
mask = _vm->getMaskFromBox(_walkbox);
// face the wall if climbing/descending a ladder
@@ -893,7 +893,7 @@ void Actor::setDirection(int direction) {
_needRedraw = true;
}
-void ActorC64::setDirection(int direction) {
+void Actor_v0::setDirection(int direction) {
int dir = newDirToOldDir( direction );
int res = 0;
@@ -1329,7 +1329,7 @@ void Actor::showActor() {
_vm->ensureResourceLoaded(rtCostume, _costume);
if (_vm->_game.version == 0) {
- ActorC64 *a = ((ActorC64 *)this);
+ Actor_v0 *a = ((Actor_v0 *)this);
a->_costCommand = a->_costCommandNew = 0xFF;
@@ -1556,7 +1556,7 @@ void ScummEngine::processActors() {
if (_game.version == 0) {
// 0x057B
- ActorC64 *A = (ActorC64*) a;
+ Actor_v0 *A = (Actor_v0*) a;
if (A->_speaking & 1)
A->_speaking ^= 0xFE;
@@ -1869,7 +1869,7 @@ void Actor::startAnimActor(int f) {
}
}
-void ActorC64::startAnimActor(int f) {
+void Actor_v0::startAnimActor(int f) {
if (f == _talkStartFrame) {
if (v0ActorTalkArray[_number] & 0x40)
return;
@@ -1952,7 +1952,7 @@ void Actor::animateCostume() {
}
}
-void ActorC64::limbFrameCheck(int limb) {
+void Actor_v0::limbFrameCheck(int limb) {
if (_cost.frame[limb] == 0xFFFF)
return;
@@ -1965,20 +1965,20 @@ void ActorC64::limbFrameCheck(int limb) {
_limbFrameRepeat[limb] = _limbFrameRepeatNew[limb];
// 0x25C3
- _cost.active[limb] = ((C64CostumeLoader*)_vm->_costumeLoader)->getFrame(this, limb);
+ _cost.active[limb] = ((V0CostumeLoader*)_vm->_costumeLoader)->getFrame(this, limb);
_cost.curpos[limb] = 0;
_needRedraw = true;
}
-void ActorC64::animateCostume() {
+void Actor_v0::animateCostume() {
speakCheck();
if (_vm->_costumeLoader->increaseAnims(this))
_needRedraw = true;
}
-void ActorC64::speakCheck() {
+void Actor_v0::speakCheck() {
if (v0ActorTalkArray[_number] & 0x80)
return;
@@ -2146,7 +2146,7 @@ void ScummEngine::setTalkingActor(int i) {
VAR(VAR_TALK_ACTOR) = i;
}
-static const int c64MMActorTalkColor[25] = {
+static const int v0MMActorTalkColor[25] = {
1, 7, 2, 14, 8, 15, 3, 7, 7, 15, 1, 13, 1, 4, 5, 5, 4, 3, 1, 5, 1, 1, 1, 1, 7
};
static const int v1MMActorTalkColor[25] = {
@@ -2158,7 +2158,7 @@ void ScummEngine::resetV1ActorTalkColor() {
for (i = 1; i < _numActors; i++) {
if (_game.version == 0) {
- _actors[i]->_talkColor = c64MMActorTalkColor[i];
+ _actors[i]->_talkColor = v0MMActorTalkColor[i];
} else {
_actors[i]->_talkColor = v1MMActorTalkColor[i];
}
@@ -2777,7 +2777,7 @@ void ScummEngine_v71he::queueAuxEntry(int actorNum, int subIndex) {
}
#endif
-void ActorC64::animateActor(int anim) {
+void Actor_v0::animateActor(int anim) {
int dir = -1;
switch (anim) {
@@ -2822,19 +2822,19 @@ void ActorC64::animateActor(int anim) {
}
}
-void ActorC64::saveLoadWithSerializer(Serializer *ser) {
+void Actor_v0::saveLoadWithSerializer(Serializer *ser) {
Actor::saveLoadWithSerializer(ser);
static const SaveLoadEntry actorEntries[] = {
- MKLINE(ActorC64, _costCommand, sleByte, VER(84)),
- MK_OBSOLETE(ActorC64, _costFrame, sleByte, VER(84), VER(89)),
- MKLINE(ActorC64, _miscflags, sleByte, VER(84)),
- MKLINE(ActorC64, _speaking, sleByte, VER(84)),
- MK_OBSOLETE(ActorC64, _speakingPrev, sleByte, VER(84), VER(89)),
- MK_OBSOLETE(ActorC64, _limbTemp, sleByte, VER(89), VER(89)),
- MKLINE(ActorC64, _animFrameRepeat, sleByte, VER(89)),
- MKARRAY(ActorC64, _limbFrameRepeatNew[0], sleInt8, 8, VER(89)),
- MKARRAY(ActorC64, _limbFrameRepeat[0], sleInt8, 8, VER(90)),
+ MKLINE(Actor_v0, _costCommand, sleByte, VER(84)),
+ MK_OBSOLETE(Actor_v0, _costFrame, sleByte, VER(84), VER(89)),
+ MKLINE(Actor_v0, _miscflags, sleByte, VER(84)),
+ MKLINE(Actor_v0, _speaking, sleByte, VER(84)),
+ MK_OBSOLETE(Actor_v0, _speakingPrev, sleByte, VER(84), VER(89)),
+ MK_OBSOLETE(Actor_v0, _limbTemp, sleByte, VER(89), VER(89)),
+ MKLINE(Actor_v0, _animFrameRepeat, sleByte, VER(89)),
+ MKARRAY(Actor_v0, _limbFrameRepeatNew[0], sleInt8, 8, VER(89)),
+ MKARRAY(Actor_v0, _limbFrameRepeat[0], sleInt8, 8, VER(90)),
MKEND()
};
diff --git a/engines/scumm/actor.h b/engines/scumm/actor.h
index 9e4955c079..69cfbfe398 100644
--- a/engines/scumm/actor.h
+++ b/engines/scumm/actor.h
@@ -335,7 +335,7 @@ protected:
virtual void prepareDrawActorCostume(BaseCostumeRenderer *bcr);
};
-enum ActorC64MiscFlags {
+enum ActorV0MiscFlags {
kActorMiscFlagStrong = 0x01, // Kid is strong (Hunk-O-Matic used)
kActorMiscFlagGTFriend = 0x02, // Kid is green tentacle's friend (recording contract)
kActorMiscFlagWatchedTV = 0x04, // Kid knows publisher's address (watched TV)
@@ -346,7 +346,7 @@ enum ActorC64MiscFlags {
kActorMiscFlagHide = 0x80 // Kid is invisible (dead or in radiation suit)
};
-class ActorC64 : public Actor_v2 {
+class Actor_v0 : public Actor_v2 {
public:
byte _costCommandNew;
byte _costCommand;
@@ -360,7 +360,7 @@ public:
bool _limb_flipped[8];
public:
- ActorC64(ScummEngine *scumm, int id) : Actor_v2(scumm, id) {}
+ Actor_v0(ScummEngine *scumm, int id) : Actor_v2(scumm, id) {}
virtual void initActor(int mode);
virtual void animateActor(int anim);
diff --git a/engines/scumm/boxes.cpp b/engines/scumm/boxes.cpp
index 64d4d7422c..f6d2a18f38 100644
--- a/engines/scumm/boxes.cpp
+++ b/engines/scumm/boxes.cpp
@@ -42,7 +42,7 @@ struct Box { /* Internal walkbox file format */
byte y1;
byte y2;
byte mask;
- } c64;
+ } v0;
struct {
byte uy;
@@ -181,7 +181,7 @@ byte ScummEngine::getMaskFromBox(int box) {
if (_game.version == 8)
return (byte) FROM_LE_32(ptr->v8.mask);
else if (_game.version == 0)
- return ptr->c64.mask;
+ return ptr->v0.mask;
else if (_game.version <= 2)
return ptr->v2.mask;
else
@@ -479,7 +479,7 @@ Box *ScummEngine::getBoxBaseAddr(int box) {
assertRange(0, box, ptr[0] - 1, "box");
if (_game.version == 0)
- return (Box *)(ptr + box * SIZEOF_BOX_C64 + 1);
+ return (Box *)(ptr + box * SIZEOF_BOX_V0 + 1);
else if (_game.version <= 2)
return (Box *)(ptr + box * SIZEOF_BOX_V2 + 1);
else if (_game.version == 3)
@@ -602,19 +602,19 @@ BoxCoords ScummEngine::getBoxCoordinates(int boxnum) {
SWAP(box->ll, box->lr);
}
} else if (_game.version == 0) {
- box->ul.x = bp->c64.x1;
- box->ul.y = bp->c64.y1;
- box->ur.x = bp->c64.x2;
- box->ur.y = bp->c64.y1;
+ box->ul.x = bp->v0.x1;
+ box->ul.y = bp->v0.y1;
+ box->ur.x = bp->v0.x2;
+ box->ur.y = bp->v0.y1;
- box->ll.x = bp->c64.x1;
- box->ll.y = bp->c64.y2;
- box->lr.x = bp->c64.x2;
- box->lr.y = bp->c64.y2;
+ box->ll.x = bp->v0.x1;
+ box->ll.y = bp->v0.y2;
+ box->lr.x = bp->v0.x2;
+ box->lr.y = bp->v0.y2;
- if ((bp->c64.mask & 0x88) == 0x88) {
+ if ((bp->v0.mask & 0x88) == 0x88) {
// walkbox for (right/left) corner
- if (bp->c64.mask & 0x04)
+ if (bp->v0.mask & 0x04)
box->ur = box->ul;
else
box->ul = box->ur;
diff --git a/engines/scumm/boxes.h b/engines/scumm/boxes.h
index e554aea1b5..345d6a9d36 100644
--- a/engines/scumm/boxes.h
+++ b/engines/scumm/boxes.h
@@ -27,7 +27,7 @@
namespace Scumm {
-#define SIZEOF_BOX_C64 5
+#define SIZEOF_BOX_V0 5
#define SIZEOF_BOX_V2 8
#define SIZEOF_BOX_V3 18
#define SIZEOF_BOX 20
diff --git a/engines/scumm/charset-fontdata.cpp b/engines/scumm/charset-fontdata.cpp
index 29465584f8..16193f5503 100644
--- a/engines/scumm/charset-fontdata.cpp
+++ b/engines/scumm/charset-fontdata.cpp
@@ -420,7 +420,7 @@ static const byte germanCharsetDataV2[] = {
126, 10,
};
-// German C64 MM.
+// German v0 MM.
static const byte germanCharsetDataV0[] = {
36, 11,
42, 12,
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp
index 9fe5296546..da6c1a2ae4 100644
--- a/engines/scumm/costume.cpp
+++ b/engines/scumm/costume.cpp
@@ -1163,7 +1163,7 @@ byte NESCostumeLoader::increaseAnim(Actor *a, int slot) {
return (a->_cost.curpos[slot] != oldframe);
}
-static const byte actorColorsMMC64[25] = {
+static const byte actorV0Colors[25] = {
0, 7, 2, 6, 9, 1, 3, 7, 7, 1, 1, 9, 1, 4, 5, 5, 4, 1, 0, 5, 4, 2, 2, 7, 7
};
@@ -1178,8 +1178,8 @@ static const byte actorColorsMMC64[25] = {
dst[p + 1] = palette[pcolor]; \
}
-byte C64CostumeRenderer::drawLimb(const Actor *a, int limb) {
- const ActorC64* A = (const ActorC64 *)a;
+byte V0CostumeRenderer::drawLimb(const Actor *a, int limb) {
+ const Actor_v0* A = (const Actor_v0 *)a;
if (limb >= 8)
return 0;
@@ -1207,7 +1207,7 @@ byte C64CostumeRenderer::drawLimb(const Actor *a, int limb) {
byte palette[4] = { 0, 0, 0, 0 };
if (_vm->getCurrentLights() & LIGHTMODE_actor_use_colors) {
palette[1] = 10;
- palette[2] = actorColorsMMC64[_actorID];
+ palette[2] = actorV0Colors[_actorID];
} else {
palette[2] = 11;
palette[3] = 11;
@@ -1261,11 +1261,11 @@ byte C64CostumeRenderer::drawLimb(const Actor *a, int limb) {
#undef LINE
#undef MASK_AT
-void C64CostumeRenderer::setCostume(int costume, int shadow) {
+void V0CostumeRenderer::setCostume(int costume, int shadow) {
_loaded.loadCostume(costume);
}
-void C64CostumeLoader::loadCostume(int id) {
+void V0CostumeLoader::loadCostume(int id) {
const byte *ptr = _vm->getResourceAddress(rtCostume, id);
_id = id;
@@ -1275,15 +1275,15 @@ void C64CostumeLoader::loadCostume(int id) {
_numColors = 0;
_numAnim = 0;
_mirror = 0;
- _palette = &actorColorsMMC64[id];
+ _palette = &actorV0Colors[id];
_frameOffsets = _baseptr + READ_LE_UINT16(ptr + 5);
_dataOffsets = ptr;
_animCmds = _baseptr + READ_LE_UINT16(ptr + 7);
}
-void C64CostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) {
- ActorC64 *A = (ActorC64 *)a;
+void V0CostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) {
+ Actor_v0 *A = (Actor_v0 *)a;
if(!a->_costume)
return;
@@ -1337,15 +1337,15 @@ void C64CostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) {
}
}
-byte C64CostumeLoader::getFrame(Actor *a, int limb) {
+byte V0CostumeLoader::getFrame(Actor *a, int limb) {
loadCostume(a->_costume);
// Get the frame number for the current limb / Command
return _frameOffsets[_frameOffsets[limb] + a->_cost.start[limb]];
}
-byte C64CostumeLoader::increaseAnims(Actor *a) {
- ActorC64 *A = (ActorC64 *)a;
+byte V0CostumeLoader::increaseAnims(Actor *a) {
+ Actor_v0 *A = (Actor_v0 *)a;
int i;
byte r = 0;
@@ -1356,8 +1356,8 @@ byte C64CostumeLoader::increaseAnims(Actor *a) {
return r;
}
-byte C64CostumeLoader::increaseAnim(Actor *a, int limb) {
- ActorC64 *A = (ActorC64 *)a;
+byte V0CostumeLoader::increaseAnim(Actor *a, int limb) {
+ Actor_v0 *A = (Actor_v0 *)a;
const uint16 limbPrevious = a->_cost.curpos[limb]++;
loadCostume(a->_costume);
diff --git a/engines/scumm/costume.h b/engines/scumm/costume.h
index 16317cb1c9..4a21692ddb 100644
--- a/engines/scumm/costume.h
+++ b/engines/scumm/costume.h
@@ -67,9 +67,9 @@ protected:
byte increaseAnim(Actor *a, int slot);
};
-class C64CostumeLoader : public ClassicCostumeLoader {
+class V0CostumeLoader : public ClassicCostumeLoader {
public:
- C64CostumeLoader(ScummEngine *vm) : ClassicCostumeLoader(vm) {}
+ V0CostumeLoader(ScummEngine *vm) : ClassicCostumeLoader(vm) {}
void loadCostume(int id);
void costumeDecodeData(Actor *a, int frame, uint usemask);
byte increaseAnims(Actor *a);
@@ -131,12 +131,12 @@ public:
};
#endif
-class C64CostumeRenderer : public BaseCostumeRenderer {
+class V0CostumeRenderer : public BaseCostumeRenderer {
protected:
- C64CostumeLoader _loaded;
+ V0CostumeLoader _loaded;
public:
- C64CostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
+ V0CostumeRenderer(ScummEngine *vm) : BaseCostumeRenderer(vm), _loaded(vm) {}
void setPalette(uint16 *palette) {}
void setFacing(const Actor *a) {}
diff --git a/engines/scumm/gfx.cpp b/engines/scumm/gfx.cpp
index a6b8377d2f..bc6cfc761e 100644
--- a/engines/scumm/gfx.cpp
+++ b/engines/scumm/gfx.cpp
@@ -240,7 +240,7 @@ GdiPCEngine::~GdiPCEngine() {
#endif
GdiV1::GdiV1(ScummEngine *vm) : Gdi(vm) {
- memset(&_C64, 0, sizeof(_C64));
+ memset(&_V1, 0, sizeof(_V1));
}
GdiV2::GdiV2(ScummEngine *vm) : Gdi(vm) {
@@ -297,17 +297,17 @@ void GdiPCEngine::loadTiles(byte *roomptr) {
void GdiV1::roomChanged(byte *roomptr) {
for (int i = 0; i < 4; i++){
- _C64.colors[i] = roomptr[6 + i];
+ _V1.colors[i] = roomptr[6 + i];
}
- decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 10), _C64.charMap, 2048);
- decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 12), _C64.picMap, roomptr[4] * roomptr[5]);
- decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 14), _C64.colorMap, roomptr[4] * roomptr[5]);
- decodeC64Gfx(roomptr + READ_LE_UINT16(roomptr + 16), _C64.maskMap, roomptr[4] * roomptr[5]);
+ decodeV1Gfx(roomptr + READ_LE_UINT16(roomptr + 10), _V1.charMap, 2048);
+ decodeV1Gfx(roomptr + READ_LE_UINT16(roomptr + 12), _V1.picMap, roomptr[4] * roomptr[5]);
+ decodeV1Gfx(roomptr + READ_LE_UINT16(roomptr + 14), _V1.colorMap, roomptr[4] * roomptr[5]);
+ decodeV1Gfx(roomptr + READ_LE_UINT16(roomptr + 16), _V1.maskMap, roomptr[4] * roomptr[5]);
// Read the mask data. The 16bit length value seems to always be 8 too big.
// See bug #1837375 for details on this.
const byte *maskPtr = roomptr + READ_LE_UINT16(roomptr + 18);
- decodeC64Gfx(maskPtr + 2, _C64.maskChar, READ_LE_UINT16(maskPtr) - 8);
+ decodeV1Gfx(maskPtr + 2, _V1.maskChar, READ_LE_UINT16(maskPtr) - 8);
_objectMode = true;
}
@@ -1541,7 +1541,7 @@ void GdiV1::prepareDrawBitmap(const byte *ptr, VirtScreen *vs,
const int x, const int y, const int width, const int height,
int stripnr, int numstrip) {
if (_objectMode) {
- decodeC64Gfx(ptr, _C64.objectMap, (width / 8) * (height / 8) * 3);
+ decodeV1Gfx(ptr, _V1.objectMap, (width / 8) * (height / 8) * 3);
}
}
@@ -1928,9 +1928,9 @@ bool GdiPCEngine::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const in
bool GdiV1::drawStrip(byte *dstPtr, VirtScreen *vs, int x, int y, const int width, const int height,
int stripnr, const byte *smap_ptr) {
if (_objectMode)
- drawStripC64Object(dstPtr, vs->pitch, stripnr, width, height);
+ drawStripV1Object(dstPtr, vs->pitch, stripnr, width, height);
else
- drawStripC64Background(dstPtr, vs->pitch, stripnr, height);
+ drawStripV1Background(dstPtr, vs->pitch, stripnr, height);
return false;
}
@@ -2071,7 +2071,7 @@ void GdiV1::decodeMask(int x, int y, const int width, const int height,
int stripnr, int numzbuf, const byte *zplane_list[9],
bool transpStrip, byte flag) {
byte *mask_ptr = getMaskBuffer(x, y, 1);
- drawStripC64Mask(mask_ptr, stripnr, width, height);
+ drawStripV1Mask(mask_ptr, stripnr, width, height);
}
void GdiV2::decodeMask(int x, int y, const int width, const int height,
@@ -3089,67 +3089,67 @@ void GdiPCEngine::drawStripPCEngineMask(byte *dst, int stripnr, int top, int hei
}
#endif
-void GdiV1::drawStripC64Background(byte *dst, int dstPitch, int stripnr, int height) {
+void GdiV1::drawStripV1Background(byte *dst, int dstPitch, int stripnr, int height) {
int charIdx;
height /= 8;
for (int y = 0; y < height; y++) {
- _C64.colors[3] = (_C64.colorMap[y + stripnr * height] & 7);
+ _V1.colors[3] = (_V1.colorMap[y + stripnr * height] & 7);
// Check for room color change in V1 zak
if (_roomPalette[0] == 255) {
- _C64.colors[2] = _roomPalette[2];
- _C64.colors[1] = _roomPalette[1];
+ _V1.colors[2] = _roomPalette[2];
+ _V1.colors[1] = _roomPalette[1];
}
- charIdx = _C64.picMap[y + stripnr * height] * 8;
+ charIdx = _V1.picMap[y + stripnr * height] * 8;
for (int i = 0; i < 8; i++) {
- byte c = _C64.charMap[charIdx + i];
- dst[0] = dst[1] = _C64.colors[(c >> 6) & 3];
- dst[2] = dst[3] = _C64.colors[(c >> 4) & 3];
- dst[4] = dst[5] = _C64.colors[(c >> 2) & 3];
- dst[6] = dst[7] = _C64.colors[(c >> 0) & 3];
+ byte c = _V1.charMap[charIdx + i];
+ dst[0] = dst[1] = _V1.colors[(c >> 6) & 3];
+ dst[2] = dst[3] = _V1.colors[(c >> 4) & 3];
+ dst[4] = dst[5] = _V1.colors[(c >> 2) & 3];
+ dst[6] = dst[7] = _V1.colors[(c >> 0) & 3];
dst += dstPitch;
}
}
}
-void GdiV1::drawStripC64Object(byte *dst, int dstPitch, int stripnr, int width, int height) {
+void GdiV1::drawStripV1Object(byte *dst, int dstPitch, int stripnr, int width, int height) {
int charIdx;
height /= 8;
width /= 8;
for (int y = 0; y < height; y++) {
- _C64.colors[3] = (_C64.objectMap[(y + height) * width + stripnr] & 7);
- charIdx = _C64.objectMap[y * width + stripnr] * 8;
+ _V1.colors[3] = (_V1.objectMap[(y + height) * width + stripnr] & 7);
+ charIdx = _V1.objectMap[y * width + stripnr] * 8;
for (int i = 0; i < 8; i++) {
- byte c = _C64.charMap[charIdx + i];
- dst[0] = dst[1] = _C64.colors[(c >> 6) & 3];
- dst[2] = dst[3] = _C64.colors[(c >> 4) & 3];
- dst[4] = dst[5] = _C64.colors[(c >> 2) & 3];
- dst[6] = dst[7] = _C64.colors[(c >> 0) & 3];
+ byte c = _V1.charMap[charIdx + i];
+ dst[0] = dst[1] = _V1.colors[(c >> 6) & 3];
+ dst[2] = dst[3] = _V1.colors[(c >> 4) & 3];
+ dst[4] = dst[5] = _V1.colors[(c >> 2) & 3];
+ dst[6] = dst[7] = _V1.colors[(c >> 0) & 3];
dst += dstPitch;
}
}
}
-void GdiV1::drawStripC64Mask(byte *dst, int stripnr, int width, int height) const {
+void GdiV1::drawStripV1Mask(byte *dst, int stripnr, int width, int height) const {
int maskIdx;
height /= 8;
width /= 8;
for (int y = 0; y < height; y++) {
if (_objectMode)
- maskIdx = _C64.objectMap[(y + 2 * height) * width + stripnr] * 8;
+ maskIdx = _V1.objectMap[(y + 2 * height) * width + stripnr] * 8;
else
- maskIdx = _C64.maskMap[y + stripnr * height] * 8;
+ maskIdx = _V1.maskMap[y + stripnr * height] * 8;
for (int i = 0; i < 8; i++) {
- byte c = _C64.maskChar[maskIdx + i];
+ byte c = _V1.maskChar[maskIdx + i];
- // V1/C64 masks are inverted compared to what ScummVM expects
+ // V1/V0 masks are inverted compared to what ScummVM expects
*dst = c ^ 0xFF;
dst += _numStrips;
}
}
}
-void GdiV1::decodeC64Gfx(const byte *src, byte *dst, int size) const {
+void GdiV1::decodeV1Gfx(const byte *src, byte *dst, int size) const {
int x, z;
byte color, run, common[4];
diff --git a/engines/scumm/gfx.h b/engines/scumm/gfx.h
index 4b44ddc376..0d81698c50 100644
--- a/engines/scumm/gfx.h
+++ b/engines/scumm/gfx.h
@@ -375,19 +375,19 @@ public:
class GdiV1 : public Gdi {
protected:
- /** Render settings which are specific to the C64 graphic decoders. */
+ /** Render settings which are specific to the v0/v1 graphic decoders. */
struct {
byte colors[4];
byte charMap[2048], objectMap[2048], picMap[4096], colorMap[4096];
byte maskMap[4096], maskChar[4096];
- } _C64;
+ } _V1;
protected:
- void decodeC64Gfx(const byte *src, byte *dst, int size) const;
+ void decodeV1Gfx(const byte *src, byte *dst, int size) const;
- void drawStripC64Object(byte *dst, int dstPitch, int stripnr, int width, int height);
- void drawStripC64Background(byte *dst, int dstPitch, int stripnr, int height);
- void drawStripC64Mask(byte *dst, int stripnr, int width, int height) const;
+ void drawStripV1Object(byte *dst, int dstPitch, int stripnr, int width, int height);
+ void drawStripV1Background(byte *dst, int dstPitch, int stripnr, int height);
+ void drawStripV1Mask(byte *dst, int stripnr, int width, int height) const;
virtual bool drawStrip(byte *dstPtr, VirtScreen *vs,
int x, int y, const int width, const int height,
diff --git a/engines/scumm/object.cpp b/engines/scumm/object.cpp
index 4ef8707714..e38552c8f3 100644
--- a/engines/scumm/object.cpp
+++ b/engines/scumm/object.cpp
@@ -327,7 +327,7 @@ int ScummEngine::getObjectIndex(int object) const {
int ScummEngine::whereIsObject(int object) const {
int i;
- // Note: in MMC64 bg objects are greater _numGlobalObjects
+ // Note: in MM v0 bg objects are greater _numGlobalObjects
if (_game.version != 0 && object >= _numGlobalObjects)
return WIO_NOT_FOUND;
@@ -808,7 +808,7 @@ void ScummEngine_v3old::resetRoomObjects() {
else
ptr = room + 29;
- // Default pointer of objects without image, in C64 verison of Maniac Mansion
+ // Default pointer of objects without image, in v0 version of Maniac Mansion
int defaultPtr = READ_LE_UINT16(ptr + 2 * _numObjectsInRoom);
for (i = 0; i < _numObjectsInRoom; i++) {
diff --git a/engines/scumm/room.cpp b/engines/scumm/room.cpp
index 63cbef8944..9ee8fb93a9 100644
--- a/engines/scumm/room.cpp
+++ b/engines/scumm/room.cpp
@@ -747,7 +747,7 @@ void ScummEngine_v3old::resetRoomSubBlocks() {
}
ptr = roomptr + *(roomptr + 0x15);
- size = numOfBoxes * SIZEOF_BOX_C64 + 1;
+ size = numOfBoxes * SIZEOF_BOX_V0 + 1;
_res->createResource(rtMatrix, 2, size + 1);
getResourceAddress(rtMatrix, 2)[0] = numOfBoxes;
diff --git a/engines/scumm/script.cpp b/engines/scumm/script.cpp
index 3bd70d0e24..39420ee974 100644
--- a/engines/scumm/script.cpp
+++ b/engines/scumm/script.cpp
@@ -1132,7 +1132,7 @@ void ScummEngine::checkAndRunSentenceScript() {
void ScummEngine_v0::walkToActorOrObject(int object) {
int x, y, dir;
- ActorC64 *a = (ActorC64 *)derefActor(VAR(VAR_EGO), "walkToObject");
+ Actor_v0 *a = (Actor_v0 *)derefActor(VAR(VAR_EGO), "walkToObject");
_walkToObject = object;
_walkToObjectState = kWalkToObjectStateWalk;
@@ -1162,7 +1162,7 @@ bool ScummEngine_v0::checkPendingWalkAction() {
return false;
int actor = VAR(VAR_EGO);
- ActorC64 *a = (ActorC64 *)derefActor(actor, "checkPendingWalkAction");
+ Actor_v0 *a = (Actor_v0 *)derefActor(actor, "checkPendingWalkAction");
// wait until walking or turning action is finished
if (a->_moving)
diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp
index 07be151ce2..45901186cd 100644
--- a/engines/scumm/script_v0.cpp
+++ b/engines/scumm/script_v0.cpp
@@ -51,7 +51,7 @@ void ScummEngine_v0::setupOpcodes() {
OPCODE(0x0b, o_setActorBitVar);
/* 0C */
OPCODE(0x0c, o_loadSound);
- OPCODE(0x0d, o_printEgo_c64);
+ OPCODE(0x0d, o_printEgo);
OPCODE(0x0e, o_putActorAtObject);
OPCODE(0x0f, o2_clearState02);
/* 10 */
@@ -60,7 +60,7 @@ void ScummEngine_v0::setupOpcodes() {
OPCODE(0x12, o2_panCameraTo);
OPCODE(0x13, o_lockCostume);
/* 14 */
- OPCODE(0x14, o_print_c64);
+ OPCODE(0x14, o_print);
OPCODE(0x15, o5_walkActorToActor);
OPCODE(0x16, o5_getRandomNr);
OPCODE(0x17, o2_clearState08);
@@ -92,7 +92,7 @@ void ScummEngine_v0::setupOpcodes() {
/* 2C */
OPCODE(0x2c, o_stopCurrentScript);
OPCODE(0x2d, o2_putActorInRoom);
- OPCODE(0x2e, o_print_c64);
+ OPCODE(0x2e, o_print);
OPCODE(0x2f, o2_ifState08);
/* 30 */
OPCODE(0x30, o_loadCostume);
@@ -181,7 +181,7 @@ void ScummEngine_v0::setupOpcodes() {
OPCODE(0x73, o_getObjectOwner);
/* 74 */
OPCODE(0x74, o5_getDist);
- OPCODE(0x75, o_printEgo_c64);
+ OPCODE(0x75, o_printEgo);
OPCODE(0x76, o_walkActorToObject);
OPCODE(0x77, o2_clearState04);
/* 78 */
@@ -252,7 +252,7 @@ void ScummEngine_v0::setupOpcodes() {
/* AC */
OPCODE(0xac, o_stopCurrentScript);
OPCODE(0xad, o2_putActorInRoom);
- OPCODE(0xae, o_print_c64);
+ OPCODE(0xae, o_print);
OPCODE(0xaf, o2_ifNotState08);
/* B0 */
OPCODE(0xb0, o_loadCostume);
@@ -575,13 +575,13 @@ void ScummEngine_v0::o_loadRoom() {
}
void ScummEngine_v0::o_loadRoomWithEgo() {
- ActorC64 *a;
+ Actor_v0 *a;
int obj, room, x, y, dir;
obj = fetchScriptByte();
room = fetchScriptByte();
- a = (ActorC64 *)derefActor(VAR(VAR_EGO), "o_loadRoomWithEgo");
+ a = (Actor_v0 *)derefActor(VAR(VAR_EGO), "o_loadRoomWithEgo");
//0x634F
if (a->_miscflags & kActorMiscFlagFreeze) {
@@ -685,7 +685,7 @@ void ScummEngine_v0::o_animateActor() {
int anim = getVarOrDirectByte(PARAM_2);
int8 repeat = (int8) fetchScriptByte();
- ActorC64 *a = (ActorC64*) derefActor(act, "o_animateActor");
+ Actor_v0 *a = (Actor_v0*) derefActor(act, "o_animateActor");
a->_animFrameRepeat = repeat;
@@ -789,7 +789,7 @@ void ScummEngine_v0::o_setActorBitVar() {
if (act >= _numActors)
return;
- ActorC64 *a = (ActorC64 *)derefActor(act, "o_setActorBitVar");
+ Actor_v0 *a = (Actor_v0 *)derefActor(act, "o_setActorBitVar");
if (mod)
a->_miscflags |= mask;
@@ -814,7 +814,7 @@ void ScummEngine_v0::o_getActorBitVar() {
byte act = getVarOrDirectByte(PARAM_1);
byte mask = getVarOrDirectByte(PARAM_2);
- ActorC64 *a = (ActorC64 *)derefActor(act, "o_getActorBitVar");
+ Actor_v0 *a = (Actor_v0 *)derefActor(act, "o_getActorBitVar");
setResult((a->_miscflags & mask) ? 1 : 0);
debug(0, "o_getActorBitVar(%d, %d, %d)", act, mask, (a->_miscflags & mask));
@@ -843,12 +843,12 @@ void ScummEngine_v0::o_getBitVar() {
debug(0, "o_getBitVar (%d, %d %d)", flag, mask, _bitVars[flag] & (1 << mask));
}
-void ScummEngine_v0::o_print_c64() {
+void ScummEngine_v0::o_print() {
_actorToPrintStrFor = fetchScriptByte();
decodeParseString();
}
-void ScummEngine_v0::o_printEgo_c64() {
+void ScummEngine_v0::o_printEgo() {
_actorToPrintStrFor = (byte)VAR(VAR_EGO);
decodeParseString();
}
diff --git a/engines/scumm/script_v2.cpp b/engines/scumm/script_v2.cpp
index 1b8dc965e0..9c8742cffd 100644
--- a/engines/scumm/script_v2.cpp
+++ b/engines/scumm/script_v2.cpp
@@ -401,7 +401,7 @@ void ScummEngine_v2::decodeParseString() {
_string[textSlot].overhead = false;
if (_game.id == GID_MANIAC && _actorToPrintStrFor == 0xFF) {
- if (_game.platform == Common::kPlatformC64) {
+ if (_game.version == 0) {
_string[textSlot].color = 14;
} else if (_game.features & GF_DEMO) {
_string[textSlot].color = (_game.version == 2) ? 15 : 1;
diff --git a/engines/scumm/scumm.cpp b/engines/scumm/scumm.cpp
index d8b02d0881..fc46f88df4 100644
--- a/engines/scumm/scumm.cpp
+++ b/engines/scumm/scumm.cpp
@@ -1025,7 +1025,7 @@ Common::Error ScummEngine::init() {
// The kGenUnchanged method is only used for 'container files', i.e. files
// that contain the real game files bundled together in an archive format.
- // This is the case of the NES, C64 and Mac versions of certain games.
+ // This is the case of the NES, v0 and Mac versions of certain games.
// Note: All of these can also occur in 'extracted' form, in which case they
// are treated like any other SCUMM game.
if (_filenamePattern.genMethod == kGenUnchanged) {
@@ -1379,8 +1379,8 @@ void ScummEngine::setupCostumeRenderer() {
_costumeRenderer = new AkosRenderer(this);
_costumeLoader = new AkosCostumeLoader(this);
} else if (_game.version == 0) {
- _costumeRenderer = new C64CostumeRenderer(this);
- _costumeLoader = new C64CostumeLoader(this);
+ _costumeRenderer = new V0CostumeRenderer(this);
+ _costumeLoader = new V0CostumeLoader(this);
} else if (_game.platform == Common::kPlatformNES) {
_costumeRenderer = new NESCostumeRenderer(this);
_costumeLoader = new NESCostumeLoader(this);
@@ -1459,7 +1459,7 @@ void ScummEngine::resetScumm() {
_sortedActors = new Actor * [_numActors];
for (i = 0; i < _numActors; ++i) {
if (_game.version == 0)
- _actors[i] = new ActorC64(this, i);
+ _actors[i] = new Actor_v0(this, i);
else if (_game.version <= 2)
_actors[i] = new Actor_v2(this, i);
else if (_game.version == 3)
diff --git a/engines/scumm/scumm_v0.h b/engines/scumm/scumm_v0.h
index 982b62d645..1341b9ed15 100644
--- a/engines/scumm/scumm_v0.h
+++ b/engines/scumm/scumm_v0.h
@@ -118,7 +118,7 @@ protected:
virtual int getCurrentLights() const;
- /* Version C64 script opcodes */
+ /* Version 0 script opcodes */
void o_stopCurrentScript();
void o_walkActorToObject();
void o_loadSound();
@@ -150,8 +150,8 @@ protected:
void o_ifEqualActiveObject2();
void o_ifNotEqualActiveObject2();
void o_getClosestActor();
- void o_printEgo_c64();
- void o_print_c64();
+ void o_printEgo();
+ void o_print();
void o_unlockRoom();
void o_unlockSound();
void o_cutscene();
diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp
index 88a1283067..567ca31485 100644
--- a/engines/scumm/verbs.cpp
+++ b/engines/scumm/verbs.cpp
@@ -705,7 +705,7 @@ void ScummEngine_v0::verbExec() {
return;
}
- ActorC64 *a = (ActorC64 *)derefActor(VAR(VAR_EGO), "verbExec");
+ Actor_v0 *a = (Actor_v0 *)derefActor(VAR(VAR_EGO), "verbExec");
int x = _virtualMouse.x / V12_X_MULTIPLIER;
int y = _virtualMouse.y / V12_Y_MULTIPLIER;
//actorSetPosInBox();
@@ -730,7 +730,7 @@ bool ScummEngine_v0::checkSentenceComplete() {
}
void ScummEngine_v0::checkExecVerbs() {
- ActorC64 *a = (ActorC64 *)derefActor(VAR(VAR_EGO), "checkExecVerbs");
+ Actor_v0 *a = (Actor_v0 *)derefActor(VAR(VAR_EGO), "checkExecVerbs");
VirtScreen *zone = findVirtScreen(_mouse.y);
bool execute = false;