[Scummvm-git-logs] scummvm master -> 6f9199e5028286c3a0c67c470184a36554f86a4c

eriktorbjorn eriktorbjorn at telia.com
Thu Jul 23 09:56:18 UTC 2020


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:
6f9199e502 ZVISION: Fix the Zork Nemesis safe puzzle


Commit: 6f9199e5028286c3a0c67c470184a36554f86a4c
    https://github.com/scummvm/scummvm/commit/6f9199e5028286c3a0c67c470184a36554f86a4c
Author: Torbjörn Andersson (eriktorbjorn at users.sourceforge.net)
Date: 2020-07-23T11:55:39+02:00

Commit Message:
ZVISION: Fix the Zork Nemesis safe puzzle

This reverts bb2f218fa1a8df056626bda9b96aa766da608b38 which was in
response to a Coverity report. Maybe it can be written in a better way -
I haven't wrapped my head around the trigonometry of it - but clicking
on a number on the safe dial is supposed to rotate the dial until that
number is at the red arrow head.

This way, it works. You can test it with "location a c 4 g 0".

Changed paths:
    engines/zvision/scripting/controls/safe_control.cpp


diff --git a/engines/zvision/scripting/controls/safe_control.cpp b/engines/zvision/scripting/controls/safe_control.cpp
index 172ccb7efd..74cb694072 100644
--- a/engines/zvision/scripting/controls/safe_control.cpp
+++ b/engines/zvision/scripting/controls/safe_control.cpp
@@ -157,7 +157,9 @@ bool SafeControl::onMouseUp(const Common::Point &screenSpacePos, const Common::P
 
 			Common::Point tmp = backgroundImageSpacePos - _center;
 
-			float dd = atan2((float)tmp.y, (float)tmp.x) * 57.29578;
+			// Coverity complains about the order of arguments here,
+			// but changing that breaks the Zork Nemesis safe puzzle.
+			float dd = atan2((float)tmp.x, (float)tmp.y) * 57.29578;
 
 			int16 dp_state = 360 / _statesCount;
 




More information about the Scummvm-git-logs mailing list