HoverRace  2.0
ObstacleCollisionReport.h
Go to the documentation of this file.
1 // FreeElementMovingInterface.h
2 //
3 //
4 //
5 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
6 //
7 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
8 // you may not use this file except in compliance with the License.
9 //
10 // A copy of the license should have been attached to the package from which
11 // you have taken this file. If you can not find the license you can not use
12 // this file.
13 //
14 //
15 // The author makes no representations about the suitability of
16 // this software for any purpose. It is provided "as is" "AS IS",
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
18 // implied.
19 //
20 // See the License for the specific language governing permissions
21 // and limitations under the License.
22 //
23 
24 #pragma once
25 
26 #include "Level.h"
27 
28 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
29 # ifdef MR_ENGINE
30 # define MR_DllDeclare __declspec( dllexport )
31 # else
32 # define MR_DllDeclare __declspec( dllimport )
33 # endif
34 #else
35 # define MR_DllDeclare
36 #endif
37 
38 namespace HoverRace {
39 namespace Model {
40 
41 // Helper class
43 {
44  private:
45  BOOL mInMaze; // If false, forget the rest
46 
48 
49  MR_Int32 mShapeTop; // Absolute
50  MR_Int32 mShapeBottom; // Absolute
51 
52  MR_Int32 mClosestFloor; // Relative to Bottom
53  MR_Int32 mClosestCeiling; // Relative to Top
54 
56  MR_Int32 mObstacleTop; // Absolute
58 
59  BOOL AlmostCompleted() const;
60 
61  void GetContactWithFeaturesAndActors(Level * pLevel, const ShapeInterface * pShape, int pRoom, FreeElement * pElement, BOOL pIgnoreActors);
62 
63  public:
64 
65  BOOL MR_DllDeclare IsInMaze() const; // Call notting else if false
66  BOOL MR_DllDeclare HaveContact() const;
67  int MR_DllDeclare Room() const; // Room containing the shape
68  MR_Int32 MR_DllDeclare StepHeight() const;// Negative Height of the floor if Not having contact, Shape height if higher than shape
69  // Negative Ceiling Height if Not having contact, Shape depth if lower than shape
71  // Negative if in floor
73  // Negative if in ceiling
75 
78 
79  void MR_DllDeclare GetContactWithObstacles(Level * pLevel, const ShapeInterface * pShape, int pRoom, FreeElement * pElement, BOOL pIgnoreActors = FALSE);
80 
81 };
82 
83 // Helper class that determine if a move can be made
84 // If not the function
85 
86 } // namespace Model
87 } // namespace HoverRace
88 
89 #undef MR_DllDeclare
int mCurrentRoom
Definition: ObstacleCollisionReport.h:47
#define MR_DllDeclare
Definition: ObstacleCollisionReport.h:35
MR_Int32 mObstacleBottom
Definition: ObstacleCollisionReport.h:57
MR_Int32 MR_DllDeclare LargestHoleStep() const
Definition: ObstacleCollisionReport.cpp:89
BOOL AlmostCompleted() const
Definition: ObstacleCollisionReport.cpp:94
MR_Int32 MR_DllDeclare LargestHoleHeight() const
Definition: ObstacleCollisionReport.cpp:84
Definition: ObstacleCollisionReport.h:42
MR_Int32 mObstacleTop
Definition: ObstacleCollisionReport.h:56
MR_Int32 MR_DllDeclare CeilingStepHeight() const
Definition: ObstacleCollisionReport.cpp:58
void GetContactWithFeaturesAndActors(Level *pLevel, const ShapeInterface *pShape, int pRoom, FreeElement *pElement, BOOL pIgnoreActors)
Definition: ObstacleCollisionReport.cpp:178
void MR_DllDeclare GetContactWithObstacles(Level *pLevel, const ShapeInterface *pShape, int pRoom, FreeElement *pElement, BOOL pIgnoreActors=FALSE)
Definition: ObstacleCollisionReport.cpp:99
Definition: Shapes.h:50
MR_Int32 mShapeBottom
Definition: ObstacleCollisionReport.h:50
Definition: MazeElement.h:151
MR_Int32 MR_DllDeclare SpaceToFloor() const
Definition: ObstacleCollisionReport.cpp:70
MR_Int32 mClosestFloor
Definition: ObstacleCollisionReport.h:52
MR_Int32 mShapeTop
Definition: ObstacleCollisionReport.h:49
int32_t MR_Int32
Definition: MR_Types.h:43
MR_Int32 MR_DllDeclare SpaceToCeiling() const
Definition: ObstacleCollisionReport.cpp:77
MR_Int32 mClosestCeiling
Definition: ObstacleCollisionReport.h:53
Definition: Level.h:74
Definition: Announcement.h:24
int MR_DllDeclare Room() const
Return the current room that this MR_ObstaceCollisionReport refers to.
Definition: ObstacleCollisionReport.cpp:173
BOOL mInMaze
Definition: ObstacleCollisionReport.h:45
BOOL mHaveObstacleContact
Definition: ObstacleCollisionReport.h:55
MR_Int32 MR_DllDeclare StepHeight() const
Definition: ObstacleCollisionReport.cpp:45
BOOL MR_DllDeclare IsInMaze() const
Definition: ObstacleCollisionReport.cpp:33
BOOL MR_DllDeclare HaveContact() const
Definition: ObstacleCollisionReport.cpp:38