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
28namespace TwinE {
29
30class ActorStruct;
31struct ExtraListStruct;
32class TwinEEngine;
33
34class Collision {
35private:
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
42public:
43 Collision(TwinEEngine *engine);
46
52 bool checkZvOnZv(int32 actorIdx1, int32 actorIdx2) const;
53
54 void doImpact(int32 num, int32 x, int32 y, int32 z, int32 owner);
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
Definition: actor.h:137
Definition: collision.h:34
int32 extraCheckExtraCol(ExtraListStruct *extra, int32 extraIdx) const
bool checkZvOnZv(int32 actorIdx1, int32 actorIdx2) const
IVec3 _collision
Definition: collision.h:45
uint32 doCornerReajust(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask)
bool fullWorldColBrick(int32 x, int32 y, int32 z, const IVec3 &oldPos)
uint32 doCornerReajustTwinkel(ActorStruct *actor, int32 x, int32 y, int32 z, int32 damageMask)
void reajustPos(IVec3 &processActor, ShapeType brickShape) const
int32 checkObjCol(int32 actorIdx)
void receptionObj(int actorIdx)
int32 extraCheckObjCol(ExtraListStruct *extra, int32 actorIdx)
Definition: twine.h:207
Definition: extra.h:64
Definition: shared.h:127