ScummVM API documentation
amerzone_game.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 TETRAEDGE_GAME_AMERZONE_GAME_H
23 #define TETRAEDGE_GAME_AMERZONE_GAME_H
24 
25 #include "tetraedge/game/game.h"
26 
27 #include "tetraedge/game/puzzle_cadenas.h"
28 #include "tetraedge/game/puzzle_coffre.h"
29 #include "tetraedge/game/puzzle_computer_hydra.h"
30 #include "tetraedge/game/puzzle_computer_pwd.h"
31 #include "tetraedge/game/puzzle_disjoncteur.h"
32 #include "tetraedge/game/puzzle_hanjie.h"
33 #include "tetraedge/game/puzzle_liquides.h"
34 #include "tetraedge/game/puzzle_pentacle.h"
35 #include "tetraedge/game/puzzle_transfusion.h"
36 
37 #include "tetraedge/te/te_timer.h"
38 #include "tetraedge/te/te_warp.h"
39 
40 namespace Tetraedge {
41 
44 class AmerzoneGame : public Tetraedge::Game {
45 public:
46  AmerzoneGame();
47  ~AmerzoneGame() {}
48 
49  virtual void addToBag(const Common::String &objname) override;
50  virtual bool changeWarp(const Common::String &zone, const Common::String &scene, bool fadeFlag) override;
51  virtual void draw() override;
52  virtual void enter() override;
53  virtual void finishGame() override;
54  virtual void initLoadedBackupData() override;
55  virtual void leave(bool flag) override;
56  virtual void update() override;
57  virtual bool onDialogFinished(const Common::String &val) override;
58  virtual bool onVideoFinished() override;
59 
60  TeWarp *warpY() { return _warpY; }
61  const Common::String lastHitObjectName() const { return _lastHitObjectName; }
62 
63  void setAngleX(float angle);
64  void setAngleY(float angle);
65  void showPuzzle(int puzzleNo, int puzParam1, int puzParam2);
66 
67 private:
68  void changeSpeedToMouseDirection();
69  void isInDrag(bool val);
70  void speedX(const float &speed);
71  void speedY(const float &speed);
72 
73  bool onHelpButtonValidated();
74  bool onAnimationFinished(const Common::String &anim);
75  bool onMouseLeftUp(const Common::Point &pt);
76  bool onMouseLeftDown(const Common::Point &pt);
77  bool onObjectClick(const Common::String &obj);
78  bool onPuzzleEnterAnimLoadTime();
79 
80  void optimizeWarpResources();
81  void startChangeWarpAnim();
82  void startDecelerationAnim();
83  bool onChangeWarpAnimFinished();
84 
85  TeTimer _dragTimer;
86  float _orientationX;
87  float _orientationY;
88  float _xAngleMin;
89  float _xAngleMax;
90  float _yAngleMin;
91  float _yAngleMax;
92  float _speedX;
93  float _speedY;
94  bool _isInDrag;
95  int _edgeButtonRolloverCount;
96  Common::Point _mouseDragStart;
97  Common::Point _mouseDragLast;
98  int _puzzleNo;
99  int _puzParam1;
100  int _puzParam2;
103  TeWarp *_warpX;
104  TeWarp *_warpY;
105  TeWarp *_prevWarpY;
106  Common::String _lastHitObjectName;
107 
108  PuzzleCadenas _puzzleCadenas;
109  PuzzleCoffre _puzzleCoffre;
110  PuzzleComputerPwd _puzzleComputerPwd;
111  PuzzleComputerHydra _puzzleComputerHydra;
112  PuzzleDisjoncteur _puzzleDisjoncteur;
113  PuzzleHanjie _puzzleHanjie;
114  PuzzleLiquides _puzzleLiquides;
115  PuzzlePentacle _puzzlePentacle;
116  PuzzleTransfusion _puzzleTransfusion;
117 };
118 
119 } // end namespace Tetraedge
120 
121 #endif // TETRAEDGE_GAME_AMERZONE_GAME_H
Definition: game.h:46
Definition: str.h:59
Definition: detection.h:27
Definition: puzzle_cadenas.h:30
Definition: amerzone_game.h:44
Definition: puzzle_pentacle.h:29
Definition: puzzle_disjoncteur.h:31
Definition: puzzle_liquides.h:29
Definition: puzzle_computer_pwd.h:30
Definition: puzzle_coffre.h:31
Definition: te_warp.h:38
Definition: te_curve_anim2.h:36
Definition: te_timer.h:33
Definition: puzzle_hanjie.h:33
Definition: rect.h:45
Definition: puzzle_computer_hydra.h:31
Definition: puzzle_transfusion.h:31