diff options
author | Paul Gilbert | 2016-07-16 22:02:09 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-07-17 13:09:59 -0400 |
commit | dee69e206906f59d6af5f6e6351d5b9d8770221f (patch) | |
tree | 18cfb035ebc8f481cbcd5335539a6e742c9e3bba | |
parent | 0118919d358332f243713b69e6fff163413146a3 (diff) | |
download | scummvm-rg350-dee69e206906f59d6af5f6e6351d5b9d8770221f.tar.gz scummvm-rg350-dee69e206906f59d6af5f6e6351d5b9d8770221f.tar.bz2 scummvm-rg350-dee69e206906f59d6af5f6e6351d5b9d8770221f.zip |
TITANIC: Renaming of star point classes
-rw-r--r-- | engines/titanic/module.mk | 6 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub1.cpp | 4 | ||||
-rw-r--r-- | engines/titanic/star_control/star_control_sub1.h | 8 | ||||
-rw-r--r-- | engines/titanic/star_control/star_points1.cpp (renamed from engines/titanic/star_control/star_array.cpp) | 16 | ||||
-rw-r--r-- | engines/titanic/star_control/star_points1.h (renamed from engines/titanic/star_control/star_array.h) | 18 | ||||
-rw-r--r-- | engines/titanic/star_control/star_points2.cpp (renamed from engines/titanic/star_control/star_control_sub9.cpp) | 4 | ||||
-rw-r--r-- | engines/titanic/star_control/star_points2.h (renamed from engines/titanic/star_control/star_control_sub9.h) | 8 |
7 files changed, 30 insertions, 34 deletions
diff --git a/engines/titanic/module.mk b/engines/titanic/module.mk index 9dfbc92986..96715f2c6d 100644 --- a/engines/titanic/module.mk +++ b/engines/titanic/module.mk @@ -423,7 +423,6 @@ MODULE_OBJS := \ star_control/fmatrix.o \ star_control/fpoint.o \ star_control/fvector.o \ - star_control/star_array.o \ star_control/star_control_sub1.o \ star_control/star_control_sub2.o \ star_control/star_control_sub4.o \ @@ -431,8 +430,6 @@ MODULE_OBJS := \ star_control/star_control_sub6.o \ star_control/star_control_sub7.o \ star_control/star_control_sub8.o \ - star_control/star_control_sub9.o \ - star_control/star_view.o \ star_control/star_control_sub12.o \ star_control/star_control_sub13.o \ star_control/star_control_sub20.o \ @@ -442,6 +439,9 @@ MODULE_OBJS := \ star_control/star_control_sub24.o \ star_control/star_control_sub25.o \ star_control/star_control_sub26.o \ + star_control/star_points1.o \ + star_control/star_points2.o \ + star_control/star_view.o \ star_control/surface_area.o \ star_control/surface_fader_base.o \ star_control/surface_fader.o \ diff --git a/engines/titanic/star_control/star_control_sub1.cpp b/engines/titanic/star_control/star_control_sub1.cpp index 75dc2303f1..c3a268eee3 100644 --- a/engines/titanic/star_control/star_control_sub1.cpp +++ b/engines/titanic/star_control/star_control_sub1.cpp @@ -43,8 +43,8 @@ void CStarControlSub1::load(SimpleFile *file, int param) { bool CStarControlSub1::initDocument() { warning("CStarControlSub1::initDocument"); - _starArray.initialize(); - _sub9.initialize(); + _points1.initialize(); + _points2.initialize(); return true; } diff --git a/engines/titanic/star_control/star_control_sub1.h b/engines/titanic/star_control/star_control_sub1.h index 0e99b4ef72..dd7ae5f20c 100644 --- a/engines/titanic/star_control/star_control_sub1.h +++ b/engines/titanic/star_control/star_control_sub1.h @@ -23,12 +23,12 @@ #ifndef TITANIC_STAR_CONTROL_SUB1_H #define TITANIC_STAR_CONTROL_SUB1_H -#include "titanic/star_control/star_array.h" #include "titanic/star_control/star_control_sub2.h" #include "titanic/star_control/star_control_sub5.h" #include "titanic/star_control/star_control_sub7.h" #include "titanic/star_control/star_control_sub8.h" -#include "titanic/star_control/star_control_sub9.h" +#include "titanic/star_control/star_points1.h" +#include "titanic/star_control/star_points2.h" namespace Titanic { @@ -36,8 +36,8 @@ class CStarControlSub1 : public CStarControlSub2 { private: CStarControlSub7 _sub7; CStarControlSub8 _sub8; - CStarControlSub9 _sub9; - CStarArray _starArray; + CStarPoints1 _points1; + CStarPoints2 _points2; CStarControlSub5 _sub5; int _field7DA8; int _field7DAC; diff --git a/engines/titanic/star_control/star_array.cpp b/engines/titanic/star_control/star_points1.cpp index 2e4a928aa2..9e684f3c10 100644 --- a/engines/titanic/star_control/star_array.cpp +++ b/engines/titanic/star_control/star_points1.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/star_control/star_array.h" +#include "titanic/star_control/star_points1.h" #include "titanic/star_control/star_control_sub12.h" #include "titanic/titanic.h" @@ -29,17 +29,17 @@ namespace Titanic { #define ARRAY_COUNT 876 const double FACTOR = 3.1415927 * 0.0055555557; -CStarArray::CStarArray() { +CStarPoints1::CStarPoints1() { } -void CStarArray::initialize() { +void CStarPoints1::initialize() { // Get a reference to the starfield points resource Common::SeekableReadStream *stream = g_vm->_filesManager->getResource("STARFIELD/POINTS"); assert(stream && stream->size() == (12 * ARRAY_COUNT)); _data.resize(ARRAY_COUNT); for (int idx = 0; idx < ARRAY_COUNT; ++idx) { - CStarArrayEntry &entry = _data[idx]; + FVector &entry = _data[idx]; // Get the next set of values double v1 = stream->readUint32LE(); @@ -49,13 +49,13 @@ void CStarArray::initialize() { v1 *= 0.0099999998 * FACTOR; v2 *= 0.015 * FACTOR; - entry._v1 = cos(v2) * 3000000.0 * cos(v1); - entry._v2 = sin(v2) * 3000000.0 * cos(v1); - entry._v3 = sin(v1) * 3000000.0; + entry._x = cos(v2) * 3000000.0 * cos(v1); + entry._y = sin(v2) * 3000000.0 * cos(v1); + entry._z = sin(v1) * 3000000.0; } } -void CStarArray::draw(CSurfaceArea *surface, CStarControlSub12 *img) { +void CStarPoints1::draw(CSurfaceArea *surface, CStarControlSub12 *img) { // TODO } diff --git a/engines/titanic/star_control/star_array.h b/engines/titanic/star_control/star_points1.h index 827af01739..41fb6b488e 100644 --- a/engines/titanic/star_control/star_array.h +++ b/engines/titanic/star_control/star_points1.h @@ -20,26 +20,22 @@ * */ -#ifndef TITANIC_STAR_ARRAY_H -#define TITANIC_STAR_ARRAY_H +#ifndef TITANIC_STAR_POINTS1_H +#define TITANIC_STAR_POINTS1_H #include "common/array.h" #include "titanic/star_control/surface_area.h" +#include "titanic/star_control/fvector.h" namespace Titanic { class CStarControlSub12; -class CStarArray { - struct CStarArrayEntry { - double _v1; - double _v2; - double _v3; - }; +class CStarPoints1 { private: - Common::Array<CStarArrayEntry> _data; + Common::Array<FVector> _data; public: - CStarArray(); + CStarPoints1(); /** * Initialize the array @@ -54,4 +50,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_STAR_ARRAY_H */ +#endif /* TITANIC_STAR_POINTS1_H */ diff --git a/engines/titanic/star_control/star_control_sub9.cpp b/engines/titanic/star_control/star_points2.cpp index 292e9a87d0..10d10e1836 100644 --- a/engines/titanic/star_control/star_control_sub9.cpp +++ b/engines/titanic/star_control/star_points2.cpp @@ -20,7 +20,7 @@ * */ -#include "titanic/star_control/star_control_sub9.h" +#include "titanic/star_control/star_points2.h" #include "titanic/titanic.h" namespace Titanic { @@ -28,7 +28,7 @@ namespace Titanic { #define ARRAY_COUNT 80 const double FACTOR = 3.1415927 * 0.0055555557; -void CStarControlSub9::initialize() { +void CStarPoints2::initialize() { // Get a reference to the starfield points resource Common::SeekableReadStream *stream = g_vm->_filesManager->getResource("STARFIELD/POINTS2"); diff --git a/engines/titanic/star_control/star_control_sub9.h b/engines/titanic/star_control/star_points2.h index 5f334f48d1..0ba5e0a655 100644 --- a/engines/titanic/star_control/star_control_sub9.h +++ b/engines/titanic/star_control/star_points2.h @@ -20,14 +20,14 @@ * */ -#ifndef TITANIC_STAR_CONTROL_SUB9_H -#define TITANIC_STAR_CONTROL_SUB9_H +#ifndef TITANIC_STAR_POINTS2_H +#define TITANIC_STAR_POINTS2_H #include "common/array.h" namespace Titanic { -class CStarControlSub9 { +class CStarPoints2 { struct DataEntry { int _v1; int _v2; @@ -50,4 +50,4 @@ public: } // End of namespace Titanic -#endif /* TITANIC_STAR_CONTROL_SUB9_H */ +#endif /* TITANIC_STAR_POINTS2_H */ |