ScummVM API documentation
movesens.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 /*
23  * Based on the Reverse Engineering work of Christophe Fontanel,
24  * maintainer of the Dungeon Master Encyclopaedia (http://dmweb.free.fr/)
25  */
26 
27 #ifndef DM_MOVESENS_H
28 #define DM_MOVESENS_H
29 
30 #include "dm/dm.h"
31 #include "dm/group.h"
32 enum SensorEffect {
33  kDMSensorEffectNone = -1, // @ CM1_EFFECT_NONE
34  kDMSensorEffectSet = 0, // @ C00_EFFECT_SET
35  kDMSensorEffectClear = 1, // @ C01_EFFECT_CLEAR
36  kDMSensorEffectToggle = 2, // @ C02_EFFECT_TOGGLE
37  kDMSensorEffectHold = 3, // @ C03_EFFECT_HOLD
38  kDMSensorEffectAddExperience = 10 // @ C10_EFFECT_ADD_EXPERIENCE
39 };
40 
41 namespace DM {
42  class Sensor;
43  class Teleporter;
44 
45  class MovesensMan {
46  DMEngine *_vm;
47 public:
48  explicit MovesensMan(DMEngine *vm);
49 
50  int16 _moveResultMapX; // @ G0397_i_MoveResultMapX
51  int16 _moveResultMapY; // @ G0398_i_MoveResultMapY
52  uint16 _moveResultMapIndex; // @ G0399_ui_MoveResultMapIndex
53  int16 _moveResultDir; // @ G0400_i_MoveResultDirection
54  uint16 _moveResultCell; // @ G0401_ui_MoveResultCell
55  bool _useRopeToClimbDownPit; // @ G0402_B_UseRopeToClimbDownPit
56  int16 _sensorRotationEffect; // @ G0403_i_SensorRotationEffect
57  int16 _sensorRotationEffMapX; // @ G0404_i_SensorRotationEffectMapX
58  int16 _sensorRotationEffMapY; // @ G0405_i_SensorRotationEffectMapY
59  int16 _sensorRotationEffCell; // @ G0406_i_SensorRotationEffectCell
60 
61  bool sensorIsTriggeredByClickOnWall(int16 mapX, int16 mapY, uint16 cellParam); // @ F0275_SENSOR_IsTriggeredByClickOnWall
62  bool getMoveResult(Thing thing, int16 mapX, int16 mapY, int16 destMapX, int16 destMapY); // @ F0267_MOVE_GetMoveResult_CPSCE
63  bool isLevitating(Thing thing); // @ F0264_MOVE_IsLevitating
64  bool moveIsKilledByProjectileImpact(int16 srcMapX, int16 srcMapY, int16 destMapX, int16 destMapY, Thing thing); // @ F0266_MOVE_IsKilledByProjectileImpact
65  void addEvent(TimelineEventType type, byte mapX, byte mapY, Cell cell, SensorEffect effect, int32 time); // @ F0268_SENSOR_AddEvent
66  int16 getSound(CreatureType creatureType); // @ F0514_MOVE_GetSound
67  int16 getTeleporterRotatedGroupResult(Teleporter *teleporter, Thing thing, uint16 mapIndex);// @ F0262_MOVE_GetTeleporterRotatedGroupResult
68  Thing getTeleporterRotatedProjectileThing(Teleporter *teleporter, Thing projectileThing); // @ F0263_MOVE_GetTeleporterRotatedProjectileThing
69  void processThingAdditionOrRemoval(uint16 mapX, uint16 mapY, Thing thing, bool partySquare, bool addThing);// @ F0276_SENSOR_ProcessThingAdditionOrRemoval
70  bool isObjectInPartyPossession(int16 objectType); // @ F0274_SENSOR_IsObjectInPartyPossession
71  void triggerEffect(Sensor *sensor, SensorEffect effect, int16 mapX, int16 mapY, uint16 cell); // @ F0272_SENSOR_TriggerEffect
72  void triggerLocalEffect(SensorEffect localEffect, int16 effX, int16 effY, int16 effCell); // @ F0270_SENSOR_TriggerLocalEffect
73  void addSkillExperience(int16 skillIndex, uint16 exp, bool leaderOnly); // @ F0269_SENSOR_AddSkillExperience
74  void processRotationEffect();// @ F0271_SENSOR_ProcessRotationEffect
75  void createEventMoveGroup(Thing groupThing, int16 mapX, int16 mapY, int16 mapIndex, bool audible); // @ F0265_MOVE_CreateEvent60To61_MoveGroup
76  Thing getObjectOfTypeInCell(int16 mapX, int16 mapY, int16 cell, int16 objectType); // @ F0273_SENSOR_GetObjectOfTypeInCell
77 };
78 }
79 
80 #endif
Definition: dm.h:117
Definition: movesens.h:45
Definition: champion.h:35
Definition: dungeonman.h:377
Definition: dm.h:155
Definition: dungeonman.h:349