ScummVM API documentation
actor.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 TRECISION_ACTOR_H
23 #define TRECISION_ACTOR_H
24 
25 #include "trecision/struct.h"
26 #include "common/scummsys.h"
27 #include "common/serializer.h"
28 
29 namespace Trecision {
30 
31 #define MAXLIGHT 40
32 
33 class TrecisionEngine;
34 
35 class Actor {
36  TrecisionEngine *_vm;
37 
38  SLight _lightArea[MAXLIGHT];
39  SCamera _cameraArea;
40  uint8 *_textureData;
41  STexture _textureArea[MAXMAT];
42 
43  void initTextures();
44  void readModel(const char *filename);
45  void microproseHeadFix(uint32 actionNum);
46 
47 public:
49  ~Actor();
50 
51  SVertex *_characterArea;
52  SVertex *_vertex;
53 
54  SFace *_face;
55  SLight *_light;
56  SCamera *_camera;
57  STexture *_textures;
58 
59  int16 _textureCoord[MAXFACE][3][2];
60 
61  uint32 _vertexNum;
62  uint32 _faceNum;
63  uint32 _lightNum;
64 
65  float _px, _pz;
66  float _dx, _dz;
67  float _theta;
68 
69  int _area[6];
70 
71  int _curFrame;
72  int _curAction;
73 
74  void syncGameStream(Common::Serializer &ser);
75  void actorDoAction(int action);
76  void actorStop();
77  void read3D(Common::SeekableReadStreamEndian *ff);
78  float frameCenter(SVertex *v);
79  void updateStepSound();
80  bool actorRectIsValid() const;
81  Common::Rect getActorRect() const;
82 };
83 
84 } // End of namespace Trecision
85 #endif
86 
Definition: struct.h:203
Definition: struct.h:222
Definition: struct.h:215
Definition: trecision.h:112
Definition: rect.h:144
Definition: actor.h:35
Definition: serializer.h:79
Definition: actor.h:29
Definition: struct.h:239
Definition: stream.h:944
Definition: struct.h:227