HoverRace  2.0
BitmapSurface.h
Go to the documentation of this file.
1 
2 // BitmapSurface.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 //
24 // The class defined in this file can be used as a base class for
25 // walls or floor that are going to be simple bitmapped surfaces
26 //
27 // The bitmap must come from a resource
28 //
29 
30 #pragma once
31 
32 #include "ResourceLib.h"
33 #include "../Model/MazeElement.h"
34 
35 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
36 # ifdef MR_ENGINE
37 # define MR_DllDeclare __declspec( dllexport )
38 # else
39 # define MR_DllDeclare __declspec( dllimport )
40 # endif
41 #else
42 # define MR_DllDeclare
43 #endif
44 
45 namespace HoverRace {
46 namespace ObjFac1 {
47 
49 {
51 
52 public:
54  BitmapSurface(pId, nullptr, nullptr, 0, 1) { }
55 
57  ObjFacTools::ResBitmap *pBitmap) :
58  BitmapSurface(pId, pBitmap, pBitmap, 0, 1) { }
59 
62  int pRotationSpeed, int pRotationLen);
63 
65 
66  // Rendering stuff
67  void RenderWallSurface(VideoServices::Viewport3D *pDest,
68  const MR_3DCoordinate &pUpperLeft, const MR_3DCoordinate &pLowerRight,
69  MR_Int32 pLen, MR_SimulationTime pTime) override;
70  void RenderHorizontalSurface(VideoServices::Viewport3D *pDest,
71  int pNbVertex, const MR_2DCoordinate *pVertexList, MR_Int32 pLevel,
72  BOOL pTop, MR_SimulationTime pTime) override;
73 
74  // Logic stuff
75  const Model::ContactEffectList *GetEffectList() override;
76 
77 protected:
82 };
83 
85 {
87 
88 public:
90  ObjFacTools::ResBitmap *pBitmap, int pMaxHeight);
93  int pRotationSpeed, int pRotationLen, int pMaxHeight);
94 
95  void RenderWallSurface(VideoServices::Viewport3D *pDest,
96  const MR_3DCoordinate &pUpperLeft, const MR_3DCoordinate &pLowerRight,
97  MR_Int32 pLen, MR_SimulationTime pTime) override;
98 
99 private:
101 };
102 
103 } // namespace Model
104 } // namespace HoverRace
105 
106 #undef MR_DllDeclare
Unique identifier for a Factory Object.
Definition: DllObjectFactory.h:54
std::vector< ContactEffect * > ContactEffectList
Definition: ContactEffect.h:56
Definition: BitmapSurface.h:84
BitmapSurface(const Util::ObjectFromFactoryId &pId, ObjFacTools::ResBitmap *pBitmap)
Definition: BitmapSurface.h:56
Definition: WorldCoordinates.h:46
~BitmapSurface()
Definition: BitmapSurface.h:64
ObjFacTools::ResBitmap * mBitmap
Definition: BitmapSurface.h:78
Definition: Viewport3D.h:53
Definition: MazeElement.h:128
Definition: WorldCoordinates.h:75
int mRotationSpeed
Negative values mean left to right rotation.
Definition: BitmapSurface.h:80
ObjFacTools::ResBitmap * mBitmap2
Definition: BitmapSurface.h:79
MR_Int32 MR_SimulationTime
Definition: WorldCoordinates.h:106
BitmapSurface(const Util::ObjectFromFactoryId &pId)
Definition: BitmapSurface.h:53
Definition: BitmapSurface.h:48
int32_t MR_Int32
Definition: MR_Types.h:43
#define MR_DllDeclare
Definition: BitmapSurface.h:42
Base class for object created with a Dll Factory.
Definition: DllObjectFactory.h:86
Definition: Announcement.h:24
Definition: ResBitmap.h:47
int mRotationLen
Definition: BitmapSurface.h:81
int mMaxHeight
Definition: BitmapSurface.h:100