ScummVM API documentation
star_closeup.h
1 /* ScummVM - Graphic Adventure Engine
2  *
3  * ScummVM is the legal property of its developers, whose names
4  * are too numerous to list here. Please refer to the COPYRIGHT
5  * file distributed with this source distribution.
6  *
7  * This program is free software: you can redistribute it and/or modify
8  * it under the terms of the GNU General Public License as published by
9  * the Free Software Foundation, either version 3 of the License, or
10  * (at your option) any later version.
11  *
12  * This program is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with this program. If not, see <http://www.gnu.org/licenses/>.
19  *
20  */
21 
22 #ifndef TITANIC_STAR_CLOSEUP_H
23 #define TITANIC_STAR_CLOSEUP_H
24 
25 #include "titanic/star_control/fvector.h"
26 #include "titanic/star_control/fpose.h"
27 #include "titanic/star_control/surface_area.h"
28 #include "common/array.h"
29 
30 namespace Titanic {
31 
32 class CErrorCode;
33 class CCamera;
34 class CSurfaceArea;
35 
39 class CStarCloseup {
40  struct Data1 {
41  int _index1;
42  int _index2;
43  Data1() : _index1(0), _index2(0) {}
44  };
45 
46  struct SubEntry {
47  Common::Array<Data1> _data1;
49  ~SubEntry() { clear(); }
50 
54  void clear();
55  };
56 
57  struct Entry {
58  int _field0;
59  byte _pixel1;
60  byte _pixel2;
61  byte _pixel3;
62  int _field8;
63  int _fieldC;
64  double _field10;
65  double _field14;
66 
67  Entry() : _field0(0), _pixel1(0), _pixel2(0), _pixel3(0), _field8(0),
68  _fieldC(0), _field10(0), _field14(0) {}
69  };
70 
71  struct GridEntry : public FVector {
72  FPoint _position;
73 
74  GridEntry() : FVector() {}
75  };
76 
81  struct SineTable {
82  private:
84  public:
85  SineTable() {}
86 
90  bool setup();
91 
95  double operator[](int idx) { return _data[idx]; }
96  };
97 private:
98  bool _flag;
99  FPose _sub1, _sub2;
100  SubEntry _array[5];
101  Entry _entries[1284];
102  int _multiplier;
103  SineTable _sineTable;
105 private:
110  bool setupEntry(int width, int height, int index, float val);
111 
116  bool setup2(int val1, int val2);
117 public:
118  CStarCloseup();
119  virtual ~CStarCloseup() {}
120 
121  virtual bool setup();
122 
126  virtual void draw(const FPose &pose, const FVector &vector, const FVector &vector2,
127  CSurfaceArea *surfaceArea, CCamera *camera);
128 
129  virtual void proc3(CErrorCode *errorCode);
130 
131  bool get4() const { return _flag; }
132  void set4(bool val) { _flag = val; }
133 
134  void fn1();
135 };
136 
137 } // End of namespace Titanic
138 
139 #endif /* TITANIC_STAR_CLOSEUP_H */
Definition: surface_area.h:36
Definition: star_closeup.h:39
Definition: error_code.h:27
Definition: fpose.h:34
Definition: camera.h:42
Definition: arm.h:30
virtual void draw(const FPose &pose, const FVector &vector, const FVector &vector2, CSurfaceArea *surfaceArea, CCamera *camera)
Definition: fpoint.h:32
Definition: fvector.h:36