ScummVM API documentation
buggy.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 TWINE_SCENE_BUGGY_H
23 #define TWINE_SCENE_BUGGY_H
24 
25 #include "common/scummsys.h"
26 #include "twine/input.h"
27 #include "twine/scene/actor.h"
28 
29 #define BUGGY_PRESENT 0x80
30 #define NUM_BUGGY ((uint8)(NumBuggy & ~(BUGGY_PRESENT)))
31 #define IsBuggyPresent() (NumBuggy & BUGGY_PRESENT)
32 
33 namespace TwinE {
34 
35 class Buggy {
36 private:
37  TwinEEngine *_engine;
38  int32 Gear = 0;
39  int32 TimerGear;
40 
41 public:
42 #define MAX_BUGGYS 2
43  struct S_ONE_WHEEL {
44  int32 Angle;
45  int32 X;
46  int32 Y;
47  int32 Z;
48  };
49 
50  typedef struct {
51  int32 X;
52  int32 Y;
53  int32 Z;
54  int32 Cube;
55  int32 Beta;
56  int32 Alpha;
57  int32 Gamma;
58  S_ONE_WHEEL Wheel[4];
59  int32 BetaWheel;
60  int32 SpeedInc;
61  int32 SpeedRot;
62  int32 Speed;
63  int32 LastTimer;
64  } S_BUGGY;
65 
66  // TODO: rename and hide
67  S_BUGGY ListBuggy[MAX_BUGGYS];
68  uint8 NumBuggy;
69 
70  Buggy(TwinEEngine *engine) : _engine(engine) {}
71  void initBuggy(uint8 numobj, uint32 flaginit);
72  void resetBuggy();
73  void takeBuggy();
74  void leaveBuggy(HeroBehaviourType behaviour);
75  void doAnimBuggy(ActorStruct *ptrobj);
76  void moveBuggy(ActorStruct *ptrobj);
77 };
78 
79 } // namespace TwinE
80 
81 #endif
Definition: buggy.h:43
Definition: actor.h:143
Definition: buggy.h:50
Definition: buggy.h:35
Definition: twine.h:207
Definition: achievements_tables.h:27