[Scummvm-git-logs] scummvm master -> 95ef0f27656b3518e7b0da982fe862aab81d65de
digitall
noreply at scummvm.org
Sun Jul 9 13:37:31 UTC 2023
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
95ef0f2765 WATCHMAKER: Fix More GCC Compiler Warnings
Commit: 95ef0f27656b3518e7b0da982fe862aab81d65de
https://github.com/scummvm/scummvm/commit/95ef0f27656b3518e7b0da982fe862aab81d65de
Author: D G Turner (digitall at scummvm.org)
Date: 2023-07-09T14:35:59+01:00
Commit Message:
WATCHMAKER: Fix More GCC Compiler Warnings
These were due to the ocCurPlayer and ocBoth defines having identical
values causing warnings of redundant checks.
Changed paths:
engines/watchmaker/classes/do_dialog.cpp
engines/watchmaker/classes/do_player.cpp
engines/watchmaker/define.h
engines/watchmaker/ll/ll_anim.cpp
engines/watchmaker/main.cpp
diff --git a/engines/watchmaker/classes/do_dialog.cpp b/engines/watchmaker/classes/do_dialog.cpp
index 0fefb6c36ae..0d7101b8895 100644
--- a/engines/watchmaker/classes/do_dialog.cpp
+++ b/engines/watchmaker/classes/do_dialog.cpp
@@ -339,9 +339,9 @@ void doDialog(WGame &game) {
ForcedCamera = 0;
bCutCamera = false;
bAllowCalcCamera = false;
- CameraTargetObj = ocBOTH;
+ CameraTargetObj = ocCURPLAYER;
CameraTargetBone = 0;
- TimeWalk = ocBOTH;
+ TimeWalk = ocCURPLAYER;
TimeAnim = aNULL;
bPlayerInAnim = false;
if (NextDlg != dNULL)
diff --git a/engines/watchmaker/classes/do_player.cpp b/engines/watchmaker/classes/do_player.cpp
index 0d829e6001c..934a660d354 100644
--- a/engines/watchmaker/classes/do_player.cpp
+++ b/engines/watchmaker/classes/do_player.cpp
@@ -134,7 +134,7 @@ void doPlayer(WGame &game) {
if (Player)
Player->Walk.NumPathNodes = Player->Walk.CurrentStep = Player->Walk.NumSteps = bNotSkippableWalk = 0;
- if ((!bDialogActive) || (TimeWalk == CurPlayer + ocDARRELL) || (TimeWalk == ocBOTH))
+ if ((!bDialogActive) || (TimeWalk == CurPlayer + ocDARRELL) || (TimeWalk == ocCURPLAYER))
_vm->_messageSystem.addWaitingMsgs(MP_WAIT_ACT);
if (TheMessage->event == ME_PLAYERGOTOEXAMINE)
diff --git a/engines/watchmaker/define.h b/engines/watchmaker/define.h
index 3abebddf168..fba68fe687c 100644
--- a/engines/watchmaker/define.h
+++ b/engines/watchmaker/define.h
@@ -623,9 +623,7 @@ namespace Watchmaker {
#define ocLASTCHAR 24
#define ocCURPLAYER 25
-#define ocBOTH 25
-#define ocNOTRANS 26
#define oCAMERAMAX 26
#define oTOOLTIPS 98
diff --git a/engines/watchmaker/ll/ll_anim.cpp b/engines/watchmaker/ll/ll_anim.cpp
index 066d49aee29..7d9af542ef7 100644
--- a/engines/watchmaker/ll/ll_anim.cpp
+++ b/engines/watchmaker/ll/ll_anim.cpp
@@ -1693,8 +1693,9 @@ void ContinueAnim(Init &init, int32 an) {
void StopObjAnim(WGame &game, int32 obj) {
if (!obj) return;
- if ((obj == ocCURPLAYER) || (obj == ocBOTH))
+ if (obj == ocCURPLAYER) {
obj = ocDARRELL + CurPlayer;
+ }
Init &init = game.init;
// Se esiste gia' un'animazione sullo stesso oggetto base, la termina
diff --git a/engines/watchmaker/main.cpp b/engines/watchmaker/main.cpp
index b3099b7791b..1de01c6b4bc 100644
--- a/engines/watchmaker/main.cpp
+++ b/engines/watchmaker/main.cpp
@@ -206,12 +206,12 @@ void Render3DEnvironment(WGame &game) {
if (game.init.Obj[o48DARRELLSVENUTO].flags & ON) {
for (i = 0; i < T3D_MAX_CHARACTERS; i++)
- if (Character[i] && (i != ocBOTH) && (i != ocDARRELL))
+ if (Character[i] && (i != ocCURPLAYER) && (i != ocDARRELL))
if (!t3dTransformCharacter(Character[i])) // Proietta personaggi
DebugLogWindow("Can't transform %s", Character[i]->Body->name.c_str());
} else {
for (i = 0; i < T3D_MAX_CHARACTERS; i++)
- if (Character[i] && (i != ocBOTH))
+ if (Character[i] && (i != ocCURPLAYER))
if (!t3dTransformCharacter(Character[i])) // Proietta personaggi
DebugLogWindow("Can't transform %s", Character[i]->Body->name.c_str());
}
More information about the Scummvm-git-logs
mailing list