From 16ee8aa69f48ad3dd9183b4a525ee600ddaa7294 Mon Sep 17 00:00:00 2001 From: David Fioramonti Date: Sat, 18 Aug 2018 04:01:48 -0700 Subject: STARTREK: Make atan table static Currently, it is reloaded every atan call. --- engines/startrek/math.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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, -- cgit v1.2.3