HoverRace  2.0
Mine.h
Go to the documentation of this file.
1 
2 // Mine.h
3 //
4 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
5 //
6 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
7 // you may not use this file except in compliance with the License.
8 //
9 // A copy of the license should have been attached to the package from which
10 // you have taken this file. If you can not find the license you can not use
11 // this file.
12 //
13 //
14 // The author makes no representations about the suitability of
15 // this software for any purpose. It is provided "as is" "AS IS",
16 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
17 // implied.
18 //
19 // See the License for the specific language governing permissions
20 // and limitations under the License.
21 //
22 
23 #pragma once
24 
25 #include "../ObjFacTools/FreeElementBase.h"
26 #include "../Model/RaceEffects.h"
27 
28 namespace HoverRace {
29 namespace ObjFac1 {
30 
31 class Mine :
33  protected Model::CylinderShape
34 {
36 
37 public:
38  Mine();
39  ~Mine();
40 
41 protected:
42  // Shape interface
43  MR_Int32 ZMin() const override;
44  MR_Int32 ZMax() const override;
45  MR_Int32 AxisX() const override;
46  MR_Int32 AxisY() const override;
47  MR_Int32 RayLen() const override;
48 
49 protected:
50  // ContactEffectShapeInterface
51  const Model::ContactEffectList *GetEffectList() override;
54 
55  int Simulate(MR_SimulationTime pTimeSlice,
56  Model::Track &track, int pRoom) override;
57 
59  MR_SimulationTime pTime) override;
60 
61  // Network state
62  Model::ElementNetState GetNetState() const override;
63  void SetNetState(int pDataLen, const MR_UInt8 *pData) override;
64 
65  bool AssignPermNumber(int pNumber) override;
66 
67 private:
68  bool mOnGround;
71 };
72 
73 } // namespace ObjFac1
74 } // namespace HoverRace
void SetNetState(int pDataLen, const MR_UInt8 *pData) override
Definition: Mine.cpp:182
std::vector< ContactEffect * > ContactEffectList
Definition: ContactEffect.h:56
Model::ContactEffectList mEffectList
Definition: Mine.h:70
bool AssignPermNumber(int pNumber) override
Assign a permanent hook number.
Definition: Mine.cpp:91
int Simulate(MR_SimulationTime pTimeSlice, Model::Track &track, int pRoom) override
Advance the simulation.
Definition: Mine.cpp:119
const Model::ContactEffectList * GetEffectList() override
Definition: Mine.cpp:97
Definition: FreeElementBase.h:48
const Model::ShapeInterface * GetReceivingContactEffectShape() override
Get the shape that gives an effect when touched by a moving element.
Definition: Mine.cpp:107
Definition: Viewport3D.h:53
Definition: Shapes.h:50
void Render(VideoServices::Viewport3D *pDest, MR_SimulationTime pTime) override
Definition: Mine.cpp:151
Model::ElementNetState GetNetState() const override
Definition: Mine.cpp:166
MR_Int32 MR_SimulationTime
Definition: WorldCoordinates.h:106
Definition: Mine.h:31
MR_Int32 ZMin() const override
Definition: Mine.cpp:46
A track level.
Definition: Track.h:57
Definition: Shapes.h:75
MR_Int32 AxisY() const override
Definition: Mine.cpp:61
bool mOnGround
Definition: Mine.h:68
int32_t MR_Int32
Definition: MR_Types.h:43
Base class for object created with a Dll Factory.
Definition: DllObjectFactory.h:86
const Model::ShapeInterface * GetGivingContactEffectShape() override
Get the shape that gives an effect when touching while moving.
Definition: Mine.cpp:112
~Mine()
Definition: Mine.cpp:87
Mine()
Definition: Mine.cpp:71
Definition: Announcement.h:24
MR_Int32 RayLen() const override
Definition: Mine.cpp:66
MR_Int32 AxisX() const override
Definition: Mine.cpp:56
Model::LostOfControl mEffect
Definition: Mine.h:69
uint8_t MR_UInt8
Definition: MR_Types.h:40
Definition: RaceEffects.h:50
MR_Int32 ZMax() const override
Definition: Mine.cpp:51
Definition: MazeElement.h:56