aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Fioramonti2018-08-18 04:01:48 -0700
committerEugene Sandulenko2018-08-18 14:17:36 +0200
commit16ee8aa69f48ad3dd9183b4a525ee600ddaa7294 (patch)
treeca7436eae080099d6c643e76dca88e7be93485ad
parent54419e045a5dea1ef6a698dd07bce75bcfbe4cbf (diff)
downloadscummvm-rg350-16ee8aa69f48ad3dd9183b4a525ee600ddaa7294.tar.gz
scummvm-rg350-16ee8aa69f48ad3dd9183b4a525ee600ddaa7294.tar.bz2
scummvm-rg350-16ee8aa69f48ad3dd9183b4a525ee600ddaa7294.zip
STARTREK: Make atan table static
Currently, it is reloaded every atan call.
-rw-r--r--engines/startrek/math.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/engines/startrek/math.cpp b/engines/startrek/math.cpp
index 9f47309a1f..114ec5cc0f 100644
--- a/engines/startrek/math.cpp
+++ b/engines/startrek/math.cpp
@@ -54,7 +54,7 @@ Fixed14 StarTrekEngine::cos(Angle angle) {
}
Angle StarTrekEngine::atan2(int32 deltaX, int32 deltaY) {
- const int16 atanTable[] = {
+ static const int16 atanTable[] = {
0x0000, 0x0064, 0x00c9, 0x012d, 0x0192, 0x01f6, 0x025b, 0x02c0,
0x0324, 0x0389, 0x03ee, 0x0453, 0x04b8, 0x051d, 0x0582, 0x05e8,
0x064d, 0x06b3, 0x0718, 0x077e, 0x07e4, 0x084a, 0x08b1, 0x0917,