ScummVM API documentation
collision.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_COLLISION_H
23 #define TWINE_SCENE_COLLISION_H
24 
25 #include "common/scummsys.h"
26 #include "twine/shared.h"
27 
28 namespace TwinE {
29 
30 class ActorStruct;
31 struct ExtraListStruct;
32 class TwinEEngine;
33 
34 class Collision {
35 private:
36  TwinEEngine *_engine;
37 
38  void handlePushing(IVec3 &processActor, const IVec3 &minsTest, const IVec3 &maxsTest, ActorStruct *actor, ActorStruct *actorTest);
39 
41  IVec3 _processCollision; // SaveNxw, SaveNyw, SaveNzw
42 public:
43  Collision(TwinEEngine *engine);
45  IVec3 _collision; // YMap
46 
52  bool checkZvOnZv(int32 actorIdx1, int32 actorIdx2) const;
53 
58  void reajustPos(IVec3 &processActor, ShapeType brickShape) const;
59 
64  int32 checkObjCol(int32 actorIdx);
65  bool checkValidObjPos(int32 actorIdx);
66 
67  void setCollisionPos(const IVec3 &pos);
75  uint32 doCornerReajustTwinkel(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask);
76 
84  uint32 doCornerReajust(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask);
85 
87  void receptionObj(int actorIdx);
88 
94  int32 extraCheckObjCol(ExtraListStruct *extra, int32 actorIdx);
95 
97  bool fullWorldColBrick(int32 x, int32 y, int32 z, const IVec3 &oldPos);
98 
104  int32 extraCheckExtraCol(ExtraListStruct *extra, int32 extraIdx) const;
105 };
106 
107 } // namespace TwinE
108 #endif
uint32 doCornerReajustTwinkel(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask)
uint32 doCornerReajust(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask)
Definition: actor.h:143
int32 extraCheckExtraCol(ExtraListStruct *extra, int32 extraIdx) const
Definition: shared.h:122
IVec3 _collision
Definition: collision.h:45
void reajustPos(IVec3 &processActor, ShapeType brickShape) const
bool fullWorldColBrick(int32 x, int32 y, int32 z, const IVec3 &oldPos)
int32 extraCheckObjCol(ExtraListStruct *extra, int32 actorIdx)
Definition: extra.h:64
bool checkZvOnZv(int32 actorIdx1, int32 actorIdx2) const
Definition: twine.h:207
Definition: achievements_tables.h:27
int32 checkObjCol(int32 actorIdx)
void receptionObj(int actorIdx)
Definition: collision.h:34