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 
54  int32 boundRuleThree(int32 start, int32 end, int32 maxDelay, int32 delay) const;
55 
60  void reajustPos(IVec3 &processActor, ShapeType brickShape) const;
61 
66  int32 checkObjCol(int32 actorIdx);
67  bool checkValidObjPos(int32 actorIdx);
68 
69  void setCollisionPos(const IVec3 &pos);
77  uint32 doCornerReajustTwinkel(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask);
78 
86  uint32 doCornerReajust(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask);
87 
89  void receptionObj(int actorIdx);
90 
96  int32 extraCheckObjCol(ExtraListStruct *extra, int32 actorIdx);
97 
99  bool fullWorldColBrick(int32 x, int32 y, int32 z, const IVec3 &oldPos);
100 
106  int32 extraCheckExtraCol(ExtraListStruct *extra, int32 extraIdx) const;
107 };
108 
109 } // namespace TwinE
110 #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:145
int32 extraCheckExtraCol(ExtraListStruct *extra, int32 extraIdx) const
Definition: shared.h:113
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:200
Definition: achievements_tables.h:27
int32 checkObjCol(int32 actorIdx)
void receptionObj(int actorIdx)
Definition: collision.h:34