diff options
Diffstat (limited to 'engines/titanic/star_control/star_array.cpp')
-rw-r--r-- | engines/titanic/star_control/star_array.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/engines/titanic/star_control/star_array.cpp b/engines/titanic/star_control/star_array.cpp index d2a5fe1a84..2e4a928aa2 100644 --- a/engines/titanic/star_control/star_array.cpp +++ b/engines/titanic/star_control/star_array.cpp @@ -27,6 +27,7 @@ namespace Titanic { #define ARRAY_COUNT 876 +const double FACTOR = 3.1415927 * 0.0055555557; CStarArray::CStarArray() { } @@ -36,8 +37,6 @@ void CStarArray::initialize() { Common::SeekableReadStream *stream = g_vm->_filesManager->getResource("STARFIELD/POINTS"); assert(stream && stream->size() == (12 * ARRAY_COUNT)); - double factor = 3.1415927 * 0.0055555557; - _data.resize(ARRAY_COUNT); for (int idx = 0; idx < ARRAY_COUNT; ++idx) { CStarArrayEntry &entry = _data[idx]; @@ -47,8 +46,8 @@ void CStarArray::initialize() { double v2 = stream->readUint32LE(); stream->readUint32LE(); - v1 *= 0.0099999998 * factor; - v2 *= 0.015 * factor; + v1 *= 0.0099999998 * FACTOR; + v2 *= 0.015 * FACTOR; entry._v1 = cos(v2) * 3000000.0 * cos(v1); entry._v2 = sin(v2) * 3000000.0 * cos(v1); |