From 6a50ba2308c6a9fc3eb733f310c87ed279b565ed Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 28 Sep 2004 19:28:59 +0000 Subject: Changed more of the actor class members to match our coding guidelines (in the future, when adding new member vars here, please always use our conventions, i.e. prefix them with _ and use CamelBackStyle svn-id: r15331 --- scumm/actor.cpp | 191 ++++++++++++++++++++++++------------------------ scumm/actor.h | 28 ++++--- scumm/akos.cpp | 8 +- scumm/debugger.cpp | 6 +- scumm/insane/insane.cpp | 2 +- scumm/script_v2.cpp | 2 +- scumm/script_v5.cpp | 24 +++--- scumm/script_v6.cpp | 32 ++++---- scumm/script_v6he.cpp | 22 +++--- scumm/script_v72he.cpp | 26 +++---- scumm/script_v7he.cpp | 2 +- scumm/script_v8.cpp | 30 ++++---- scumm/sound.cpp | 6 +- scumm/string.cpp | 2 +- 14 files changed, 193 insertions(+), 188 deletions(-) diff --git a/scumm/actor.cpp b/scumm/actor.cpp index 664d6cd6a3..030ab98dd3 100644 --- a/scumm/actor.cpp +++ b/scumm/actor.cpp @@ -46,7 +46,7 @@ void Actor::initActorClass(ScummEngine *scumm) { Actor::Actor() { assert(_vm != 0); - offs_x = offs_y = 0; + _offsX = _offsY = 0; top = bottom = 0; number = 0; needRedraw = needBgReset = costumeNeedsInit = visible = false; @@ -54,7 +54,7 @@ Actor::Actor() { speedx = 8; speedy = 2; frame = 0; - walkbox = 0; + _walkbox = 0; animProgress = 0; skipLimb = false; drawToBackBuf = false; @@ -87,7 +87,7 @@ void Actor::initActor(int mode) { condMask = 1; skipLimb = false; } - elevation = 0; + _elevation = 0; width = 24; talkColor = 15; talkPosX = 0; @@ -99,8 +99,8 @@ void Actor::initActor(int mode) { stopActorMoving(); - shadow_mode = 0; - layer = 0; + _shadowMode = 0; + _layer = 0; setActorWalkSpeed(8, 2); animSpeed = 0; @@ -119,24 +119,24 @@ void Actor::initActor(int mode) { talkVolume = 127; if (_vm->_version <= 2) { - initFrame = 2; - walkFrame = 0; - standFrame = 1; - talkStartFrame = 5; - talkStopFrame = 4; + _initFrame = 2; + _walkFrame = 0; + _standFrame = 1; + _talkStartFrame = 5; + _talkStopFrame = 4; } else { - initFrame = 1; - walkFrame = 2; - standFrame = 3; - talkStartFrame = 4; - talkStopFrame = 5; + _initFrame = 1; + _walkFrame = 2; + _standFrame = 3; + _talkStartFrame = 4; + _talkStopFrame = 5; } - talking = false; + _talking = false; walkScript = 0; talkScript = 0; - clipOverride = _vm->_actorClipOverride; + _clipOverride = _vm->_actorClipOverride; auxBlock.visible = false; @@ -243,7 +243,7 @@ int Actor::remapDirection(int dir, bool is_walking) { // actor is in the current room anyway. if (!ignoreBoxes || (_vm->_gameId == GID_LOOM || _vm->_gameId == GID_LOOM256)) { - specdir = _vm->_extraBoxFlags[walkbox]; + specdir = _vm->_extraBoxFlags[_walkbox]; if (specdir) { if (specdir & 0x8000) { dir = specdir & 0x3FFF; @@ -256,7 +256,7 @@ int Actor::remapDirection(int dir, bool is_walking) { } } - flags = _vm->getBoxFlags(walkbox); + flags = _vm->getBoxFlags(_walkbox); flipX = (walkdata.deltaXFactor > 0); flipY = (walkdata.deltaYFactor > 0); @@ -358,7 +358,7 @@ int Actor::updateActorDirection(bool is_walking) { } void Actor::setBox(int box) { - walkbox = box; + _walkbox = box; setupActorScale(); } @@ -372,7 +372,7 @@ int Actor::actorWalkStep() { nextFacing = updateActorDirection(true); if (!(moving & MF_IN_LEG) || facing != nextFacing) { - if (walkFrame != frame || facing != nextFacing) { + if (_walkFrame != frame || facing != nextFacing) { startWalkAnim(1, nextFacing); } moving |= MF_IN_LEG; @@ -380,7 +380,7 @@ int Actor::actorWalkStep() { actorPos = _pos; - if (walkbox != walkdata.curbox && _vm->checkXYInBoxBounds(walkdata.curbox, actorPos.x, actorPos.y)) { + if (_walkbox != walkdata.curbox && _vm->checkXYInBoxBounds(walkdata.curbox, actorPos.x, actorPos.y)) { setBox(walkdata.curbox); } @@ -427,12 +427,12 @@ void Actor::setupActorScale() { // For some boxes, we ignore the scaling and use whatever values the // scripts set. This is used e.g. in the Mystery Vortex in Sam&Max. // Older games used the flag 0x20 differently, though. - if (_vm->_gameId == GID_SAMNMAX && (_vm->getBoxFlags(walkbox) & kBoxIgnoreScale)) + if (_vm->_gameId == GID_SAMNMAX && (_vm->getBoxFlags(_walkbox) & kBoxIgnoreScale)) return; - boxscale = _vm->getBoxScale(walkbox); + boxscale = _vm->getBoxScale(_walkbox); - uint16 scale = _vm->getScale(walkbox, _pos.x, _pos.y); + uint16 scale = _vm->getScale(_walkbox, _pos.x, _pos.y); assert(scale <= 0xFF); scalex = scaley = (byte)scale; @@ -442,26 +442,26 @@ void Actor::startAnimActor(int f) { if (_vm->_version >= 7 && !((_vm->_gameId == GID_FT) && (_vm->_features & GF_DEMO) && (_vm->_features & GF_PC))) { switch (f) { case 1001: - f = initFrame; + f = _initFrame; break; case 1002: - f = walkFrame; + f = _walkFrame; break; case 1003: - f = standFrame; + f = _standFrame; break; case 1004: - f = talkStartFrame; + f = _talkStartFrame; break; case 1005: - f = talkStopFrame; + f = _talkStopFrame; break; } if (costume != 0) { animProgress = 0; needRedraw = true; - if (f == initFrame) + if (f == _initFrame) cost.reset(); _vm->akos_decodeData(this, f, (uint) - 1); frame = f; @@ -469,19 +469,19 @@ void Actor::startAnimActor(int f) { } else { switch (f) { case 0x38: - f = initFrame; + f = _initFrame; break; case 0x39: - f = walkFrame; + f = _walkFrame; break; case 0x3A: - f = standFrame; + f = _standFrame; break; case 0x3B: - f = talkStartFrame; + f = _talkStartFrame; break; case 0x3C: - f = talkStopFrame; + f = _talkStopFrame; break; } @@ -493,7 +493,7 @@ void Actor::startAnimActor(int f) { needRedraw = true; // V1 - V2 games don't seem to need a cost.reset() at this point. // Causes Zak to lose his body in several scenes, see bug #771508 - if (_vm->_version >= 3 && f == initFrame) { + if (_vm->_version >= 3 && f == _initFrame) { cost.reset(); auxBlock.visible = false; } @@ -529,7 +529,7 @@ void Actor::animateActor(int anim) { switch (cmd) { case 2: // stop walking - startAnimActor(standFrame); + startAnimActor(_standFrame); stopActorMoving(); break; case 3: // change direction immediatly @@ -603,7 +603,7 @@ void Actor::putActor(int dstX, int dstY, byte newRoom) { if (isInCurrentRoom()) { if (moving) { stopActorMoving(); - startAnimActor(standFrame); + startAnimActor(_standFrame); } adjustActorPos(); } else { @@ -722,8 +722,8 @@ void Actor::adjustActorPos() { stopActorMoving(); cost.soundCounter = 0; - if (walkbox != kInvalidBox) { - byte flags = _vm->getBoxFlags(walkbox); + if (_walkbox != kInvalidBox) { + byte flags = _vm->getBoxFlags(_walkbox); if (flags & 7) { turnToDirection(facing); } @@ -764,7 +764,7 @@ void Actor::hideActor() { if (moving) { stopActorMoving(); - startAnimActor(standFrame); + startAnimActor(_standFrame); } visible = false; cost.soundCounter = 0; @@ -782,17 +782,17 @@ void Actor::showActor() { _vm->ensureResourceLoaded(rtCostume, costume); if (costumeNeedsInit) { - startAnimActor(initFrame); + startAnimActor(_initFrame); if (_vm->_version <= 2) { - startAnimActor(standFrame); - startAnimActor(talkStopFrame); + startAnimActor(_standFrame); + startAnimActor(_talkStopFrame); } costumeNeedsInit = false; } // FIXME: Evil hack to work around bug #770717 if (!moving && _vm->_version <= 2) - startAnimActor(standFrame); + startAnimActor(_standFrame); stopActorMoving(); visible = true; @@ -908,7 +908,7 @@ static int compareDrawOrder(const void* a, const void* b) int diff; // The actor in the higher layer is ordered lower - diff = actor1->layer - actor2->layer; + diff = actor1->_layer - actor2->_layer; if (diff < 0) return +1; if (diff > 0) @@ -952,7 +952,7 @@ void ScummEngine::processActors() { // Make a list of all actors in this room for (int i = 1; i < _numActors; i++) { - if (_version == 8 && _actors[i].layer < 0) + if (_version == 8 && _actors[i]._layer < 0) continue; if (_actors[i].isInCurrentRoom() && _actors[i].costume) actors[numactors++] = &_actors[i]; @@ -989,7 +989,7 @@ void ScummEngine::processUpperActors() { int i; for (i = 1; i < _numActors; i++) { - if (_actors[i].isInCurrentRoom() && _actors[i].costume && _actors[i].layer < 0) { + if (_actors[i].isInCurrentRoom() && _actors[i].costume && _actors[i]._layer < 0) { CHECK_HEAP _actors[i].drawActorCostume(); CHECK_HEAP @@ -1012,8 +1012,8 @@ void Actor::drawActorCostume(bool hitTestMode) { bcr->_actorID = number; - bcr->_actorX = _pos.x + offs_x - _vm->virtscr[0].xstart; - bcr->_actorY = _pos.y + offs_y - elevation; + bcr->_actorX = _pos.x + _offsX - _vm->virtscr[0].xstart; + bcr->_actorY = _pos.y + _offsY - _elevation; if (_vm->_version <= 2) { // HACK: We have to adjust the x position by one strip (8 pixels) in @@ -1028,16 +1028,16 @@ void Actor::drawActorCostume(bool hitTestMode) { bcr->_actorX += 8; } - bcr->_clipOverride = clipOverride; + bcr->_clipOverride = _clipOverride; if (_vm->_version == 4 && boxscale & 0x8000) { - bcr->_scaleX = bcr->_scaleY = _vm->getScale(walkbox, _pos.x, _pos.y); + bcr->_scaleX = bcr->_scaleY = _vm->getScale(_walkbox, _pos.x, _pos.y); } else { bcr->_scaleX = scalex; bcr->_scaleY = scaley; } - bcr->_shadow_mode = shadow_mode; + bcr->_shadow_mode = _shadowMode; if (_vm->_features & GF_SMALL_HEADER) bcr->_shadow_table = NULL; else if (_vm->_heversion == 70) @@ -1053,7 +1053,7 @@ void Actor::drawActorCostume(bool hitTestMode) { bcr->_zbuf = forceClip; if (bcr->_zbuf == 100) { - bcr->_zbuf = _vm->getMaskFromBox(walkbox); + bcr->_zbuf = _vm->getMaskFromBox(_walkbox); if (bcr->_zbuf > _vm->gdi._numZBuffer-1) bcr->_zbuf = _vm->gdi._numZBuffer-1; } @@ -1064,7 +1064,7 @@ void Actor::drawActorCostume(bool hitTestMode) { else if (isInClass(kObjectClassNeverClip)) bcr->_zbuf = 0; else { - bcr->_zbuf = _vm->getMaskFromBox(walkbox); + bcr->_zbuf = _vm->getMaskFromBox(_walkbox); if (bcr->_zbuf > _vm->gdi._numZBuffer-1) bcr->_zbuf = _vm->gdi._numZBuffer-1; } @@ -1269,9 +1269,9 @@ void ScummEngine::actorTalk(const byte *msg) { if ((_version <= 7 && !_keepText) || (_version == 8 && VAR(VAR_HAVE_MSG))) stopTalk(); setTalkingActor(a->number); - a->talking = true; + a->_talking = true; if (!_string[0].no_talk_anim) { - a->runActorTalkScript(a->talkStartFrame); + a->runActorTalkScript(a->_talkStartFrame); _useTalkAnims = true; } oldact = getTalkingActor(); @@ -1325,15 +1325,14 @@ void ScummEngine::stopTalk() { act = getTalkingActor(); if (act && act < 0x80) { Actor *a = derefActor(act, "stopTalk"); - if (a->isInCurrentRoom() || _version >= 7) { - if ((_version >= 7 && !_string[0].no_talk_anim) || (_version <= 6 && _useTalkAnims)) { - a->runActorTalkScript(a->talkStopFrame); - _useTalkAnims = false; - } + if ((_version >= 7 && !_string[0].no_talk_anim) || + (_version <= 6 && a->isInCurrentRoom() && _useTalkAnims)) { + a->runActorTalkScript(a->_talkStopFrame); + _useTalkAnims = false; } if (_version <= 7 && !(_features & GF_HUMONGOUS)) setTalkingActor(0xFF); - a->talking = false; + a->_talking = false; } if (_version == 8 || _features & GF_HUMONGOUS) setTalkingActor(0); @@ -1372,7 +1371,7 @@ void Actor::setActorCostume(int c) { if (costume) { _vm->ensureResourceLoaded(rtCostume, costume); } - startAnimActor(initFrame); + startAnimActor(_initFrame); } } else { if (visible) { @@ -1423,7 +1422,7 @@ void Actor::startWalkActor(int destX, int destY, int dir) { if (ignoreBoxes) { abr.box = kInvalidBox; - walkbox = kInvalidBox; + _walkbox = kInvalidBox; } else { if (_vm->checkXYInBoxBounds(walkdata.destbox, abr.x, abr.y)) { abr.box = walkdata.destbox; @@ -1446,7 +1445,7 @@ void Actor::startWalkActor(int destX, int destY, int dir) { moving = (moving & MF_IN_LEG) | MF_NEW_LEG; walkdata.point3.x = 32000; - walkdata.curbox = walkbox; + walkdata.curbox = _walkbox; } void Actor::startWalkAnim(int cmd, int angle) { @@ -1467,14 +1466,14 @@ void Actor::startWalkAnim(int cmd, int angle) { switch (cmd) { case 1: /* start walk */ setDirection(angle); - startAnimActor(walkFrame); + startAnimActor(_walkFrame); break; case 2: /* change dir only */ setDirection(angle); break; case 3: /* stop walk */ turnToDirection(angle); - startAnimActor(standFrame); + startAnimActor(_standFrame); break; } } @@ -1529,25 +1528,25 @@ void Actor::walkActor() { moving &= ~MF_NEW_LEG; do { - if (walkbox == kInvalidBox) { + if (_walkbox == kInvalidBox) { setBox(walkdata.destbox); walkdata.curbox = walkdata.destbox; break; } - if (walkbox == walkdata.destbox) + if (_walkbox == walkdata.destbox) break; - next_box = _vm->getPathToDestBox(walkbox, walkdata.destbox); + next_box = _vm->getPathToDestBox(_walkbox, walkdata.destbox); if (next_box < 0) { - walkdata.destbox = walkbox; + walkdata.destbox = _walkbox; moving |= MF_LAST_LEG; return; } walkdata.curbox = next_box; - if (findPathTowards(walkbox, next_box, walkdata.destbox, foundPath)) + if (findPathTowards(_walkbox, next_box, walkdata.destbox, foundPath)) break; if (calcMovementFactor(foundPath)) @@ -1585,11 +1584,11 @@ void Actor::walkActorV12() { startWalkAnim(3, walkdata.destdir); } else { setBox(walkdata.curbox); - if (walkbox == walkdata.destbox) { + if (_walkbox == walkdata.destbox) { foundPath = walkdata.dest; moving |= MF_LAST_LEG; } else { - next_box = _vm->getPathToDestBox(walkbox, walkdata.destbox); + next_box = _vm->getPathToDestBox(_walkbox, walkdata.destbox); if (next_box < 0) { moving |= MF_LAST_LEG; return; @@ -1604,7 +1603,7 @@ void Actor::walkActorV12() { walkdata.curbox = next_box; _vm->getClosestPtOnBox(walkdata.curbox, x, y, tmp.x, tmp.y); - _vm->getClosestPtOnBox(walkbox, tmp.x, tmp.y, foundPath.x, foundPath.y); + _vm->getClosestPtOnBox(_walkbox, tmp.x, tmp.y, foundPath.x, foundPath.y); } calcMovementFactor(foundPath); } @@ -1654,16 +1653,16 @@ void Actor::walkActorOld() { do { loopCtr++; - if (walkbox == kInvalidBox) { + if (_walkbox == kInvalidBox) { setBox(walkdata.destbox); walkdata.curbox = walkdata.destbox; break; } - if (walkbox == walkdata.destbox) + if (_walkbox == walkdata.destbox) break; - next_box = _vm->getPathToDestBox(walkbox, walkdata.destbox); + next_box = _vm->getPathToDestBox(_walkbox, walkdata.destbox); if (next_box < 0) { moving |= MF_LAST_LEG; return; @@ -1682,12 +1681,12 @@ void Actor::walkActorOld() { if (_vm->_version <= 2) { _vm->getClosestPtOnBox(walkdata.curbox, _pos.x, _pos.y, p2.x, p2.y); - _vm->getClosestPtOnBox(walkbox, p2.x, p2.y, p3.x, p3.y); + _vm->getClosestPtOnBox(_walkbox, p2.x, p2.y, p3.x, p3.y); // FIXME: Work in progress // calcMovementFactor(p3); // return; } else { - findPathTowardsOld(walkbox, next_box, walkdata.destbox, p2, p3); + findPathTowardsOld(_walkbox, next_box, walkdata.destbox, p2, p3); if (p2.x == 32000 && p3.x == 32000) { break; } @@ -1804,7 +1803,7 @@ void Actor::remapActorPalette(int r_fact, int g_fact, int b_fact, int threshold) akpl_color = *akpl++; // allow remap of generic palette entry? - if (!shadow_mode || akpl_color >= 16) { + if (!_shadowMode || akpl_color >= 16) { r = (r * r_fact) >> 8; g = (g * g_fact) >> 8; b = (b * b_fact) >> 8; @@ -1890,8 +1889,8 @@ void ScummEngine::postProcessAuxQueue() { if (ae->actorNum != -1) { Actor *a = derefActor(ae->actorNum, "postProcessAuxQueue"); const uint8 *cost = getResourceAddress(rtCostume, a->costume); - int dy = a->offs_y + a->_pos.y - a->getElevation(); - int dx = a->offs_x + a->_pos.x; + int dy = a->_offsY + a->_pos.y - a->getElevation(); + int dx = a->_offsX + a->_pos.x; const uint8 *akax = findResource(MKID('AKAX'), cost); assert(akax); @@ -1974,11 +1973,11 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { static const SaveLoadEntry actorEntries[] = { MKLINE(Actor, _pos.x, sleInt16, VER(8)), MKLINE(Actor, _pos.y, sleInt16, VER(8)), - MKLINE(Actor, offs_x, sleInt16, VER(32)), - MKLINE(Actor, offs_y, sleInt16, VER(32)), + MKLINE(Actor, _offsX, sleInt16, VER(32)), + MKLINE(Actor, _offsY, sleInt16, VER(32)), MKLINE(Actor, top, sleInt16, VER(8)), MKLINE(Actor, bottom, sleInt16, VER(8)), - MKLINE(Actor, elevation, sleInt16, VER(8)), + MKLINE(Actor, _elevation, sleInt16, VER(8)), MKLINE(Actor, width, sleUint16, VER(8)), MKLINE(Actor, facing, sleUint16, VER(8)), MKLINE(Actor, costume, sleUint16, VER(8)), @@ -2001,11 +2000,11 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { MKLINE(Actor, moving, sleByte, VER(8)), MKLINE(Actor, ignoreBoxes, sleByte, VER(8)), MKLINE(Actor, forceClip, sleByte, VER(8)), - MKLINE(Actor, initFrame, sleByte, VER(8)), - MKLINE(Actor, walkFrame, sleByte, VER(8)), - MKLINE(Actor, standFrame, sleByte, VER(8)), - MKLINE(Actor, talkStartFrame, sleByte, VER(8)), - MKLINE(Actor, talkStopFrame, sleByte, VER(8)), + MKLINE(Actor, _initFrame, sleByte, VER(8)), + MKLINE(Actor, _walkFrame, sleByte, VER(8)), + MKLINE(Actor, _standFrame, sleByte, VER(8)), + MKLINE(Actor, _talkStartFrame, sleByte, VER(8)), + MKLINE(Actor, _talkStopFrame, sleByte, VER(8)), MKLINE(Actor, speedx, sleUint16, VER(8)), MKLINE(Actor, speedy, sleUint16, VER(8)), MKLINE(Actor, cost.animCounter, sleUint16, VER(8)), @@ -2019,12 +2018,12 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { MKARRAY(Actor, palette[0], sleByte, 256, VER(10)), MK_OBSOLETE(Actor, mask, sleByte, VER(8), VER(9)), - MKLINE(Actor, shadow_mode, sleByte, VER(8)), + MKLINE(Actor, _shadowMode, sleByte, VER(8)), MKLINE(Actor, visible, sleByte, VER(8)), MKLINE(Actor, frame, sleByte, VER(8)), MKLINE(Actor, animSpeed, sleByte, VER(8)), MKLINE(Actor, animProgress, sleByte, VER(8)), - MKLINE(Actor, walkbox, sleByte, VER(8)), + MKLINE(Actor, _walkbox, sleByte, VER(8)), MKLINE(Actor, needRedraw, sleByte, VER(8)), MKLINE(Actor, needBgReset, sleByte, VER(8)), MKLINE(Actor, costumeNeedsInit, sleByte, VER(8)), @@ -2034,7 +2033,7 @@ const SaveLoadEntry *Actor::getSaveLoadEntries() { MKLINE(Actor, talkPosX, sleInt16, VER(8)), MKLINE(Actor, ignoreTurns, sleByte, VER(8)), - MKLINE(Actor, layer, sleByte, VER(8)), + MKLINE(Actor, _layer, sleByte, VER(8)), MKLINE(Actor, talkScript, sleUint16, VER(8)), MKLINE(Actor, walkScript, sleUint16, VER(8)), diff --git a/scumm/actor.h b/scumm/actor.h index 66c64cda3c..5644c93d2f 100644 --- a/scumm/actor.h +++ b/scumm/actor.h @@ -90,9 +90,9 @@ public: Common::Point _pos; /** HE specific: This rect is used to clip actor drawing. */ - Common::Rect clipOverride; + Common::Rect _clipOverride; - int offs_x, offs_y; + int _offsX, _offsY; int top, bottom; uint width; byte number; @@ -108,19 +108,25 @@ public: byte moving; bool ignoreBoxes; byte forceClip; - byte initFrame, walkFrame, standFrame, talkStartFrame, talkStopFrame; + + byte _initFrame; + byte _walkFrame; + byte _standFrame; + byte _talkStartFrame; + byte _talkStopFrame; + bool needRedraw, needBgReset, visible; - byte shadow_mode; + byte _shadowMode; bool flip; byte frame; - byte walkbox; + byte _walkbox; int16 talkPosX, talkPosY; uint16 talkScript, walkScript; bool ignoreTurns; bool skipLimb; bool drawToBackBuf; - bool talking; - int8 layer; + bool _talking; + int8 _layer; uint16 sound[32]; CostumeData cost; uint32 condMask; @@ -136,7 +142,7 @@ public: protected: byte palette[256]; - int elevation; + int _elevation; uint16 facing; uint16 targetFacing; uint speedx, speedy; @@ -229,12 +235,12 @@ public: } int getElevation() const { - return elevation; + return _elevation; } void setElevation(int newElevation) { - if (elevation != newElevation) { - elevation = newElevation; + if (_elevation != newElevation) { + _elevation = newElevation; needRedraw = true; } } diff --git a/scumm/akos.cpp b/scumm/akos.cpp index 8b828a376f..d3fb0ef285 100644 --- a/scumm/akos.cpp +++ b/scumm/akos.cpp @@ -1534,13 +1534,13 @@ bool ScummEngine::akos_increaseAnim(Actor *a, int chan, const byte *aksq, const akos_queCommand(8, a, GB(2), 0); continue; case AKC_C0A1: - if (a->talking) { + if (a->_talking) { curpos = GUW(2); break; } continue; case AKC_C0A2: - if (!a->talking) { + if (!a->_talking) { curpos = GUW(2); break; } @@ -1659,8 +1659,8 @@ void ScummEngine::akos_processQueue() { a->forceClip = param_1; break; case 6: - a->offs_x = param_1; - a->offs_y = param_2; + a->_offsX = param_1; + a->_offsY = param_2; break; case 7: if (_heversion >= 71) { diff --git a/scumm/debugger.cpp b/scumm/debugger.cpp index 815ac7699d..1d77d2bbe4 100644 --- a/scumm/debugger.cpp +++ b/scumm/debugger.cpp @@ -399,9 +399,9 @@ bool ScummDebugger::Cmd_Actor(int argc, const char **argv) { a->putActor(a->_pos.x, value, a->room); DebugPrintf("Actor[%d].y = %d\n", actnum, a->_pos.y); _vm->_fullRedraw = 1; - } else if (!strcmp(argv[2], "elevation")) { + } else if (!strcmp(argv[2], "_elevation")) { a->setElevation(value); - DebugPrintf("Actor[%d].elevation = %d\n", actnum, a->getElevation()); + DebugPrintf("Actor[%d]._elevation = %d\n", actnum, a->getElevation()); _vm->_fullRedraw = 1; } else if (!strcmp(argv[2], "costume")) { if (value >= _vm->res.num[rtCostume]) @@ -432,7 +432,7 @@ bool ScummDebugger::Cmd_PrintActor(int argc, const char **argv) { if (a->visible) DebugPrintf("|%2d|%4d|%4d|%3d|%4d|%3d|%3d|%3d|%3d|%3d|%3d|%3d|$%02x|\n", a->number, a->_pos.x, a->_pos.y, a->width, a->getElevation(), - a->costume, a->walkbox, a->moving, a->forceClip, a->frame, + a->costume, a->_walkbox, a->moving, a->forceClip, a->frame, a->scalex, a->getFacing(), int(_vm->_classData[a->number]&0xFF)); } DebugPrintf("+-----------------------------------------------------+\n"); diff --git a/scumm/insane/insane.cpp b/scumm/insane/insane.cpp index 6e06b3c0df..3d515d0a87 100644 --- a/scumm/insane/insane.cpp +++ b/scumm/insane/insane.cpp @@ -1157,7 +1157,7 @@ void Insane::smlayer_putActor(int actornum, int actnum, int x, int y, byte room) void Insane::smlayer_setActorLayer(int actornum, int actnum, int layer) { Actor *a = _vm->derefActor(_actor[actornum].act[actnum].actor, "smlayer_setActorLayer"); - a->layer = layer; + a->_layer = layer; } void Insane::smlayer_setFluPalette(byte *pal, int shut_flag) { diff --git a/scumm/script_v2.cpp b/scumm/script_v2.cpp index 2b2834df2e..16168acc64 100644 --- a/scumm/script_v2.cpp +++ b/scumm/script_v2.cpp @@ -1522,7 +1522,7 @@ void ScummEngine_v2::o2_getActorWalkBox() { Actor *a; getResultPos(); a = derefActor(getVarOrDirectByte(PARAM_1), "o2_getActorWalkbox"); - setResult(a->walkbox); + setResult(a->_walkbox); } void ScummEngine_v2::o2_dummy() { diff --git a/scumm/script_v5.cpp b/scumm/script_v5.cpp index b4d486d902..5d9b6339b3 100644 --- a/scumm/script_v5.cpp +++ b/scumm/script_v5.cpp @@ -428,14 +428,14 @@ void ScummEngine_v5::o5_actorOps() { a->sound[0] = getVarOrDirectByte(PARAM_1); break; case 4: // SO_WALK_ANIMATION - a->walkFrame = getVarOrDirectByte(PARAM_1); + a->_walkFrame = getVarOrDirectByte(PARAM_1); break; case 5: // SO_TALK_ANIMATION - a->talkStartFrame = getVarOrDirectByte(PARAM_1); - a->talkStopFrame = getVarOrDirectByte(PARAM_2); + a->_talkStartFrame = getVarOrDirectByte(PARAM_1); + a->_talkStopFrame = getVarOrDirectByte(PARAM_2); break; case 6: // SO_STAND_ANIMATION - a->standFrame = getVarOrDirectByte(PARAM_1); + a->_standFrame = getVarOrDirectByte(PARAM_1); break; case 7: // SO_ANIMATION getVarOrDirectByte(PARAM_1); @@ -449,11 +449,11 @@ void ScummEngine_v5::o5_actorOps() { a->setElevation(getVarOrDirectWord(PARAM_1)); break; case 10: // SO_ANIMATION_DEFAULT - a->initFrame = 1; - a->walkFrame = 2; - a->standFrame = 3; - a->talkStartFrame = 4; - a->talkStopFrame = 5; + a->_initFrame = 1; + a->_walkFrame = 2; + a->_standFrame = 3; + a->_talkStartFrame = 4; + a->_talkStopFrame = 5; break; case 11: // SO_PALETTE i = getVarOrDirectByte(PARAM_1); @@ -476,7 +476,7 @@ void ScummEngine_v5::o5_actorOps() { loadPtrToResource(rtActorName, a->number, NULL); break; case 14: // SO_INIT_ANIMATION - a->initFrame = getVarOrDirectByte(PARAM_1); + a->_initFrame = getVarOrDirectByte(PARAM_1); break; case 15: // SO_PALETTE_LIST error("o5_actorOps:unk not implemented"); @@ -524,7 +524,7 @@ void ScummEngine_v5::o5_actorOps() { a->setAnimSpeed(getVarOrDirectByte(PARAM_1)); break; case 23: // SO_SHADOW - a->shadow_mode = getVarOrDirectByte(PARAM_1); + a->_shadowMode = getVarOrDirectByte(PARAM_1); break; default: warning("o5_actorOps: default case"); @@ -1082,7 +1082,7 @@ void ScummEngine_v5::o5_getActorWalkBox() { getResultPos(); int act = getVarOrDirectByte(PARAM_1); Actor *a = derefActor(act, "o5_getActorWalkBox"); - setResult(a->walkbox); + setResult(a->_walkbox); } void ScummEngine_v5::o5_getActorWidth() { diff --git a/scumm/script_v6.cpp b/scumm/script_v6.cpp index 7891008057..9256eee3c1 100644 --- a/scumm/script_v6.cpp +++ b/scumm/script_v6.cpp @@ -1404,7 +1404,7 @@ void ScummEngine_v6::o6_getActorRoom() { void ScummEngine_v6::o6_getActorWalkBox() { Actor *a = derefActor(pop(), "o6_getActorWalkBox"); - push(a->ignoreBoxes ? 0 : a->walkbox); + push(a->ignoreBoxes ? 0 : a->_walkbox); } void ScummEngine_v6::o6_getActorCostume() { @@ -1446,7 +1446,7 @@ void ScummEngine_v6::o6_isActorInBox() { void ScummEngine_v6::o6_getActorLayer() { Actor *a = derefActor(pop(), "getActorLayer"); - push(a->layer); + push(a->_layer); } void ScummEngine_v6::o6_getObjectX() { @@ -1792,14 +1792,14 @@ void ScummEngine_v6::o6_actorOps() { a->sound[i] = args[i]; break; case 79: // SO_WALK_ANIMATION - a->walkFrame = pop(); + a->_walkFrame = pop(); break; case 80: // SO_TALK_ANIMATION - a->talkStopFrame = pop(); - a->talkStartFrame = pop(); + a->_talkStopFrame = pop(); + a->_talkStartFrame = pop(); break; case 81: // SO_STAND_ANIMATION - a->standFrame = pop(); + a->_standFrame = pop(); break; case 82: // SO_ANIMATION // dummy case in scumm6 @@ -1814,11 +1814,11 @@ void ScummEngine_v6::o6_actorOps() { a->setElevation(pop()); break; case 85: // SO_ANIMATION_DEFAULT - a->initFrame = 1; - a->walkFrame = 2; - a->standFrame = 3; - a->talkStartFrame = 4; - a->talkStopFrame = 5; + a->_initFrame = 1; + a->_walkFrame = 2; + a->_standFrame = 3; + a->_talkStartFrame = 4; + a->_talkStopFrame = 5; break; case 86: // SO_PALETTE j = pop(); @@ -1833,7 +1833,7 @@ void ScummEngine_v6::o6_actorOps() { loadPtrToResource(rtActorName, a->number, NULL); break; case 89: // SO_INIT_ANIMATION - a->initFrame = pop(); + a->_initFrame = pop(); break; case 91: // SO_ACTOR_WIDTH a->width = pop(); @@ -1865,7 +1865,7 @@ void ScummEngine_v6::o6_actorOps() { a->setAnimSpeed(pop()); break; case 98: // SO_SHADOW - a->shadow_mode = pop(); + a->_shadowMode = pop(); break; case 99: // SO_TEXT_OFFSET a->talkPosY = pop(); @@ -1885,14 +1885,14 @@ void ScummEngine_v6::o6_actorOps() { a->initActor(2); break; case 227: // SO_ACTOR_DEPTH - a->layer = pop(); + a->_layer = pop(); break; case 228: // SO_ACTOR_WALK_SCRIPT a->walkScript = pop(); break; case 229: // SO_ACTOR_STOP a->stopActorMoving(); - a->startAnimActor(a->standFrame); + a->startAnimActor(a->_standFrame); break; case 230: /* set direction */ a->moving &= ~MF_TURN; @@ -2618,7 +2618,7 @@ void ScummEngine_v6::o6_kernelSetFunctions() { break; case 111: a = derefActor(args[1], "o6_kernelSetFunctions: 111"); - a->shadow_mode = args[2] + args[3]; + a->_shadowMode = args[2] + args[3]; break; case 112: /* palette shift? */ setupShadowPalette(args[3], args[4], args[5], args[1], args[2], args[6], args[7]); diff --git a/scumm/script_v6he.cpp b/scumm/script_v6he.cpp index 624c536029..58966507c4 100644 --- a/scumm/script_v6he.cpp +++ b/scumm/script_v6he.cpp @@ -612,14 +612,14 @@ void ScummEngine_v60he::o60_actorOps() { a->sound[i] = args[i]; break; case 79: // SO_WALK_ANIMATION - a->walkFrame = pop(); + a->_walkFrame = pop(); break; case 80: // SO_TALK_ANIMATION - a->talkStopFrame = pop(); - a->talkStartFrame = pop(); + a->_talkStopFrame = pop(); + a->_talkStartFrame = pop(); break; case 81: // SO_STAND_ANIMATION - a->standFrame = pop(); + a->_standFrame = pop(); break; case 82: // SO_ANIMATION // dummy case in scumm6 @@ -634,11 +634,11 @@ void ScummEngine_v60he::o60_actorOps() { a->setElevation(pop()); break; case 85: // SO_ANIMATION_DEFAULT - a->initFrame = 1; - a->walkFrame = 2; - a->standFrame = 3; - a->talkStartFrame = 4; - a->talkStopFrame = 5; + a->_initFrame = 1; + a->_walkFrame = 2; + a->_standFrame = 3; + a->_talkStartFrame = 4; + a->_talkStopFrame = 5; break; case 86: // SO_PALETTE j = pop(); @@ -653,7 +653,7 @@ void ScummEngine_v60he::o60_actorOps() { loadPtrToResource(rtActorName, a->number, NULL); break; case 89: // SO_INIT_ANIMATION - a->initFrame = pop(); + a->_initFrame = pop(); break; case 91: // SO_ACTOR_WIDTH a->width = pop(); @@ -684,7 +684,7 @@ void ScummEngine_v60he::o60_actorOps() { a->setAnimSpeed(pop()); break; case 98: // SO_SHADOW - a->shadow_mode = pop(); + a->_shadowMode = pop(); break; case 99: // SO_TEXT_OFFSET a->talkPosY = pop(); diff --git a/scumm/script_v72he.cpp b/scumm/script_v72he.cpp index a177a46a4b..7b77e5286c 100644 --- a/scumm/script_v72he.cpp +++ b/scumm/script_v72he.cpp @@ -938,7 +938,7 @@ void ScummEngine_v72he::o72_actorOps() { break; case 43: // HE 90+ // Uses reverse order of layering, so we adjust - a->layer = -pop(); + a->_layer = -pop(); break; case 64: _actorClipOverride.bottom = pop(); @@ -969,14 +969,14 @@ void ScummEngine_v72he::o72_actorOps() { a->sound[i] = args[i]; break; case 79: // SO_WALK_ANIMATION - a->walkFrame = pop(); + a->_walkFrame = pop(); break; case 80: // SO_TALK_ANIMATION - a->talkStopFrame = pop(); - a->talkStartFrame = pop(); + a->_talkStopFrame = pop(); + a->_talkStartFrame = pop(); break; case 81: // SO_STAND_ANIMATION - a->standFrame = pop(); + a->_standFrame = pop(); break; case 82: // SO_ANIMATION // dummy case in scumm6 @@ -991,11 +991,11 @@ void ScummEngine_v72he::o72_actorOps() { a->setElevation(pop()); break; case 85: // SO_ANIMATION_DEFAULT - a->initFrame = 1; - a->walkFrame = 2; - a->standFrame = 3; - a->talkStartFrame = 4; - a->talkStopFrame = 5; + a->_initFrame = 1; + a->_walkFrame = 2; + a->_standFrame = 3; + a->_talkStartFrame = 4; + a->_talkStopFrame = 5; break; case 86: // SO_PALETTE j = pop(); @@ -1011,7 +1011,7 @@ void ScummEngine_v72he::o72_actorOps() { loadPtrToResource(rtActorName, a->number, name); break; case 89: // SO_INIT_ANIMATION - a->initFrame = pop(); + a->_initFrame = pop(); break; case 91: // SO_ACTOR_WIDTH a->width = pop(); @@ -1042,8 +1042,8 @@ void ScummEngine_v72he::o72_actorOps() { a->setAnimSpeed(pop()); break; case 98: // SO_SHADOW - a->shadow_mode = pop(); - debug(0, "Set actor XMAP idx to %d", a->shadow_mode); + a->_shadowMode = pop(); + debug(0, "Set actor XMAP idx to %d", a->_shadowMode); break; case 99: // SO_TEXT_OFFSET a->talkPosY = pop(); diff --git a/scumm/script_v7he.cpp b/scumm/script_v7he.cpp index a28ae984e6..aecb0ef784 100644 --- a/scumm/script_v7he.cpp +++ b/scumm/script_v7he.cpp @@ -714,7 +714,7 @@ void ScummEngine_v70he::o70_kernelSetFunctions() { break; case 30: a = derefActor(args[1], "o70_kernelSetFunctions: 30"); - a->clipOverride.bottom = args[2]; + a->_clipOverride.bottom = args[2]; break; case 42: // drawWizImage related diff --git a/scumm/script_v8.cpp b/scumm/script_v8.cpp index 815a82fde5..0232b7f1fd 100644 --- a/scumm/script_v8.cpp +++ b/scumm/script_v8.cpp @@ -917,24 +917,24 @@ void ScummEngine_v8::o8_actorOps() { a->setActorWalkSpeed(i, j); break; case 0x67: // SO_ACTOR_ANIMATION_DEFAULT Set actor animation to default - a->initFrame = 1; - a->walkFrame = 2; - a->standFrame = 3; - a->talkStartFrame = 4; - a->talkStopFrame = 5; + a->_initFrame = 1; + a->_walkFrame = 2; + a->_standFrame = 3; + a->_talkStartFrame = 4; + a->_talkStopFrame = 5; break; case 0x68: // SO_ACTOR_ANIMATION_INIT Initialize animation - a->initFrame = pop(); + a->_initFrame = pop(); break; case 0x69: // SO_ACTOR_ANIMATION_TALK Set actor animation to talk animation - a->talkStopFrame = pop(); - a->talkStartFrame = pop(); + a->_talkStopFrame = pop(); + a->_talkStartFrame = pop(); break; case 0x6A: // SO_ACTOR_ANIMATION_WALK Set actor animation to walk animation - a->walkFrame = pop(); + a->_walkFrame = pop(); break; case 0x6B: // SO_ACTOR_ANIMATION_STAND Set actor animation to standing animation - a->standFrame = pop(); + a->_standFrame = pop(); break; case 0x6C: // SO_ACTOR_ANIMATION_SPEED Set speed of animation a->setAnimSpeed(pop()); @@ -986,7 +986,7 @@ void ScummEngine_v8::o8_actorOps() { a->putActor(a->_pos.x, a->_pos.y, a->room); break; case 0x78: // SO_ACTOR_SPECIAL_DRAW - a->shadow_mode = pop(); + a->_shadowMode = pop(); break; case 0x79: // SO_ACTOR_TEXT_OFFSET Set text offset relative to actor a->talkPosY = pop(); @@ -1007,11 +1007,11 @@ void ScummEngine_v8::o8_actorOps() { a->initActor(2); break; case 0x7F: // SO_ACTOR_DEPTH Set actor Z position - a->layer = pop(); + a->_layer = pop(); break; case 0x80: // SO_ACTOR_STOP a->stopActorMoving(); - a->startAnimActor(a->standFrame); + a->startAnimActor(a->_standFrame); break; case 0x81: // SO_ACTOR_FACE Make actor face angle a->moving &= ~MF_TURN; @@ -1395,7 +1395,7 @@ void ScummEngine_v8::o8_kernelGetFunctions() { case 0xDC: // actorTalkAnimation { Actor *a = derefActor(args[1], "actorTalkAnimation"); - push(a->talkStartFrame); + push(a->_talkStartFrame); } break; case 0xDD: // getGroupSfxVol @@ -1455,7 +1455,7 @@ void ScummEngine_v8::o8_getActorZPlane() { int z = a->forceClip; if (z == 100) { - z = getMaskFromBox(a->walkbox); + z = getMaskFromBox(a->_walkbox); if (z > gdi._numZBuffer - 1) z = gdi._numZBuffer - 1; } diff --git a/scumm/sound.cpp b/scumm/sound.cpp index 5330d66b56..bca0153dd8 100644 --- a/scumm/sound.cpp +++ b/scumm/sound.cpp @@ -560,15 +560,15 @@ void Sound::processSfxQueues() { if (a->isInCurrentRoom()) { if (isMouthSyncOff(_curSoundPos) && !_mouthSyncMode) { if (!_endOfMouthSync) - a->runActorTalkScript(a->talkStopFrame); + a->runActorTalkScript(a->_talkStopFrame); _mouthSyncMode = 0; } else if (isMouthSyncOff(_curSoundPos) == 0 && !_mouthSyncMode) { - a->runActorTalkScript(a->talkStartFrame); + a->runActorTalkScript(a->_talkStartFrame); _mouthSyncMode = 1; } if (_vm->_version <= 6 && finished) - a->runActorTalkScript(a->talkStopFrame); + a->runActorTalkScript(a->_talkStopFrame); } } diff --git a/scumm/string.cpp b/scumm/string.cpp index 8f7ffecdcf..764580bf91 100644 --- a/scumm/string.cpp +++ b/scumm/string.cpp @@ -174,7 +174,7 @@ void ScummEngine::CHARSET_1() { } if (a && !_string[0].no_talk_anim) { - a->runActorTalkScript(a->talkStartFrame); + a->runActorTalkScript(a->_talkStartFrame); _useTalkAnims = true; } -- cgit v1.2.3