diff options
-rw-r--r-- | engines/scumm/costume.cpp | 9 | ||||
-rw-r--r-- | engines/scumm/script_v0.cpp | 3 | ||||
-rw-r--r-- | engines/scumm/verbs.cpp | 17 |
3 files changed, 13 insertions, 16 deletions
diff --git a/engines/scumm/costume.cpp b/engines/scumm/costume.cpp index 4961200355..d0d8eb2240 100644 --- a/engines/scumm/costume.cpp +++ b/engines/scumm/costume.cpp @@ -75,7 +75,7 @@ static const int v1MMNESLookup[25] = { 0x17, 0x00, 0x01, 0x05, 0x16 }; -const byte v0ActorTalkArray[0x19] = { +static const byte v0ActorTalkArray[0x19] = { 0x00, 0x06, 0x06, 0x06, 0x06, 0x06, 0x06, 0x00, 0x46, 0x06, 0x06, 0x06, 0x06, 0xFF, 0xFF, @@ -1348,8 +1348,7 @@ int C64CostumeLoader::dirToDirStop(int oldDir) { } void C64CostumeLoader::actorSpeak(ActorC64 *a, int &cmd) { - - if ((v0ActorTalkArray[ a->_number ] & 0x80)) + if (v0ActorTalkArray[a->_number] & 0x80) return; if ((a->_speaking & 0x80)) @@ -1367,7 +1366,7 @@ void C64CostumeLoader::costumeDecodeData(Actor *a, int frame, uint usemask) { // Enable/Disable speaking flag if (frame == a->_talkStartFrame) { - if ((v0ActorTalkArray[ a->_number ] & 0x40)) + if (v0ActorTalkArray[a->_number] & 0x40) return; A->_speaking = 1; @@ -1419,7 +1418,7 @@ byte C64CostumeLoader::increaseAnims(Actor *a) { // Is this the correct location? // 0x073C - if ((v0ActorTalkArray[ a->_number ] & 0x3F)) + if (v0ActorTalkArray[a->_number] & 0x3F) a->_cost.soundPos = (a->_cost.soundPos + 1) % 3; } diff --git a/engines/scumm/script_v0.cpp b/engines/scumm/script_v0.cpp index 828691f05c..979a1b8508 100644 --- a/engines/scumm/script_v0.cpp +++ b/engines/scumm/script_v0.cpp @@ -636,8 +636,7 @@ void ScummEngine_v0::o_loadRoomWithEgo() { a = derefActor(VAR(VAR_EGO), "o_loadRoomWithEgo"); //0x634F - if ((((ActorC64*) a)->_miscflags & 0x40)) { - + if (((ActorC64 *)a)->_miscflags & 0x40) { // TODO: Check if this is the correct function // to be calling here stopObjectCode(); diff --git a/engines/scumm/verbs.cpp b/engines/scumm/verbs.cpp index a84f0253a1..95fba8ee7e 100644 --- a/engines/scumm/verbs.cpp +++ b/engines/scumm/verbs.cpp @@ -690,7 +690,6 @@ void ScummEngine_v0::runObject(int obj, int entry) { // (which is not really the what-is script, as this verb never actually executes // it merely seems to be some type of fallback) if (getVerbEntrypoint(obj, 0x0F) != 0) { - entry = 0x0F; } } @@ -728,7 +727,7 @@ void ScummEngine_v2::runObject(int obj, int entry) { bool ScummEngine_v0::verbMoveToActor(int actor) { Actor *a = derefActor(VAR(VAR_EGO), "verbMoveToActor"); - Actor *a2 =derefActor(actor, "verbMoveToActor"); + Actor *a2 = derefActor(actor, "verbMoveToActor"); int dist = getDist(a->getRealPos().x, a->getRealPos().y, a2->getRealPos().x, a2->getRealPos().y); if (!a->_moving && dist > 4) { @@ -812,7 +811,7 @@ bool ScummEngine_v0::verbObtain(int obj, int objIndex) { // Ignore verbs? Actor *a = derefActor(VAR(VAR_EGO), "verbObtain"); - if ((((ActorC64*) a)->_miscflags & 0x40)) { + if (((ActorC64 *)a)->_miscflags & 0x40) { resetSentence(false); return false; } @@ -825,7 +824,7 @@ bool ScummEngine_v0::verbObtain(int obj, int objIndex) { if (_activeVerb != 13 && _activeVerb != 14) { _v0ObjectInInventory = true; - if (whereIsObject( obj ) == WIO_INVENTORY) + if (whereIsObject(obj) == WIO_INVENTORY) _activeInventory = obj; else resetSentence(); @@ -904,7 +903,7 @@ bool ScummEngine_v0::verbExec() { if (verbMoveToActor(_activeActor)) { // Ignore verbs? Actor *a = derefActor(VAR(VAR_EGO), "verbExec"); - if ((((ActorC64*) a)->_miscflags & 0x40)) { + if (((ActorC64 *)a)->_miscflags & 0x40) { resetSentence(false); return false; } @@ -1075,9 +1074,9 @@ void ScummEngine_v0::checkExecVerbs() { // Did we just change the selected inventory item? if (prevInventory && prevInventory != _activeInventory && _activeInventory != _activeObject2) { _v0ObjectInInventory = true; - int prep = verbPrep( _activeInventory ); + int prep = verbPrep(_activeInventory); _v0ObjectInInventory = true; - int prep2 = verbPrep( prevInventory ); + int prep2 = verbPrep(prevInventory); // Should the new inventory object remain as the secondary selected object // Or should the new inventory object become primary? @@ -1128,7 +1127,7 @@ void ScummEngine_v0::checkExecVerbs() { if (_currentMode == 2 || _currentMode == 0) return; - if (!(((ActorC64*) a)->_miscflags & 0x80)) { + if (!(((ActorC64 *)a)->_miscflags & 0x80)) { if (_activeVerb != 7) { _activeVerb = over; over = 0; @@ -1157,7 +1156,7 @@ void ScummEngine_v0::checkExecVerbs() { if (zone->number == kMainVirtScreen) { // Ignore verbs? - if ((((ActorC64*) a)->_miscflags & 0x40)) { + if (((ActorC64 *)a)->_miscflags & 0x40) { resetSentence(false); return; } |