[Scummvm-cvs-logs] SF.net SVN: scummvm:[44026] scummvm/trunk/engines/m4/ws_sequence.cpp
fingolfin at users.sourceforge.net
fingolfin at users.sourceforge.net
Fri Sep 11 10:43:32 CEST 2009
Revision: 44026
http://scummvm.svn.sourceforge.net/scummvm/?rev=44026&view=rev
Author: fingolfin
Date: 2009-09-11 08:43:32 +0000 (Fri, 11 Sep 2009)
Log Message:
-----------
M4: Seems that s1_cos and s1_sin are either misnamed, or buggy ?
Modified Paths:
--------------
scummvm/trunk/engines/m4/ws_sequence.cpp
Modified: scummvm/trunk/engines/m4/ws_sequence.cpp
===================================================================
--- scummvm/trunk/engines/m4/ws_sequence.cpp 2009-09-11 08:39:09 UTC (rev 44025)
+++ scummvm/trunk/engines/m4/ws_sequence.cpp 2009-09-11 08:43:32 UTC (rev 44026)
@@ -27,7 +27,7 @@
namespace M4 {
-long sinCosTable[320] = {
+static const long sinCosTable[320] = {
0, 1608, 3215, 4821, 6423, 8022, 9616, 11204,
12785, 14359, 15923, 17479, 19024, 20557, 22078, 23586,
25079, 26557, 28020, 29465, 30893, 32302, 33692, 35061,
@@ -408,6 +408,9 @@
else
tempAngle &= 0xff;
+ // FIXME: Why use the cosTable in s1_sin() ?
+ // Note that sin(0) 0 and sinTable[0] = 0 but cos(0)=1, and indeed
+ // cosTable[0] = 65536, which is 1 considered as a fixed point.
*instruction.argp[0] = -cosTable[tempAngle];
return true;
@@ -422,6 +425,9 @@
else
tempAngle &= 0xff;
+ // FIXME: Why use the sinTable in s1_cos() ?
+ // Note that sin(0) 0 and sinTable[0] = 0 but cos(0)=1, and indeed
+ // cosTable[0] = 65536, which is 1 considered as a fixed point.
*instruction.argp[0] = sinTable[tempAngle];
return true;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list