ScummVM API documentation
do_camera.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 WATCHMAKER_DO_CAMERA_H
23 #define WATCHMAKER_DO_CAMERA_H
24 
25 #include "watchmaker/t3d.h"
26 #include "watchmaker/globvar.h"
27 #include "watchmaker/game.h"
28 
29 namespace Watchmaker {
30 
31 class CameraMan {
32  // Constants:
33  static const int MAX_CAMERA_STEPS = 500;
34 
35  t3dCAMERA FirstPersonCamera, *DestCamera, *LastCamera, CameraCarrello;
36  t3dCAMERA CameraStep[MAX_CAMERA_STEPS], AnimCamera;
37  int16 CurCameraSubStep = 0, CurCameraStep = 0, NumCameraSteps = 0;
38  t3dV3F OldCameraTarget, OldPlayerDir, FirstPersonTarget;
39  t3dV3F SourceBlend, TargetBlend;
40 
41 
42  uint8 bForceDirectCamera = false, bCameraCarrello = false;
43 
44  uint8 t3dCurCameraIndex = 255;
45  uint8 t3dLastCameraIndex = 255;
46 
47  void NextCameraStep(WGame &game);
48  void HandleCameraCarrello(t3dBODY *croom);
49 public:
50  t3dV3F HeadAngles;
51  t3dF32 CamAngleX, CamAngleY;
52 
53  void resetAngle();
54  void resetLastCameraIndex() { t3dLastCameraIndex = 255; }
55  uint8 getCurCameraIndex() { return t3dCurCameraIndex; }
56 
57  void MoveHeadAngles(t3dF32 diffx, t3dF32 diffy);
58  void GetCameraTarget(Init &init, t3dV3F *Target);
59  t3dCAMERA *PickCamera(t3dBODY *b, unsigned char in);
60  void doCamera(WGame &game);
61  void GetRealCharPos(Init &init, t3dV3F *Target, int32 oc, uint8 bn);
62  void ResetCameraTarget();
63  void ResetCameraSource();
64  void ProcessCamera(WGame &game);
65  uint8 GetCameraIndexUnderPlayer(int32 pl);
66  void StartAnimCamera(WGame &game);
67  uint8 ClipGolfCameraMove(t3dV3F *NewT, t3dV3F *OldT, t3dV3F *Source);
68 };
69 
70 
71 } // End of namespace Watchmaker
72 
73 #endif // WATCHMAKER_DO_CAMERA_H
Definition: types3d.h:38
Definition: 2d_stuff.h:30
Definition: globvar.h:199
Definition: t3d_body.h:32
Definition: game.h:56
Definition: t3d.h:213
Definition: do_camera.h:31