HoverRace  2.0
ResActor.h
Go to the documentation of this file.
1 // ResActor.h
2 //
3 // Copyright (c) 1995-1998 - Richard Langlois and Grokksoft Inc.
4 //
5 // Licensed under GrokkSoft HoverRace SourceCode License v1.0(the "License");
6 // you may not use this file except in compliance with the License.
7 //
8 // A copy of the license should have been attached to the package from which
9 // you have taken this file. If you can not find the license you can not use
10 // this file.
11 //
12 //
13 // The author makes no representations about the suitability of
14 // this software for any purpose. It is provided "as is" "AS IS",
15 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
16 // implied.
17 //
18 // See the License for the specific language governing permissions
19 // and limitations under the License.
20 //
21 
22 #pragma once
23 
24 #include "ResBitmap.h"
25 #include "../VideoServices/Viewport3D.h"
26 
27 #if defined(_WIN32) && defined(HR_ENGINE_SHARED)
28 # ifdef MR_ENGINE
29 # define MR_DllDeclare __declspec( dllexport )
30 # else
31 # define MR_DllDeclare __declspec( dllimport )
32 # endif
33 #else
34 # define MR_DllDeclare
35 #endif
36 
37 namespace HoverRace {
38  namespace ObjFac1 {
39  class ResActorFriend;
40  }
41  namespace ObjFacTools {
42  class ResourceLib;
43  }
44  namespace Parcel {
45  class ObjStream;
46  }
47 }
48 
49 namespace HoverRace {
50 namespace ObjFacTools {
51 
52 class ResActor
53 {
54  public:
56 
57  enum eComponentType { ePatch };
58 
59  protected:
60 
62  {
63  public:
64 
65  virtual ~ ActorComponent();
66  virtual eComponentType GetType() const = 0;
67  virtual void Serialize(Parcel::ObjStream &pArchive, ResourceLib *pLib) = 0;
68  virtual void Draw(VideoServices::Viewport3D *pDest, const VideoServices::PositionMatrix & pMatrix) const = 0;
69 
70  };
71 
73  {
74  public:
75  int mURes;
76  int mVRes;
79 
80  Patch();
81  ~Patch();
82 
83  eComponentType GetType() const;
84  void Serialize(Parcel::ObjStream &pArchive, ResourceLib *pLib);
85  void Draw(VideoServices::Viewport3D *pDest, const VideoServices::PositionMatrix & pMatrix) const;
86 
87  int GetURes() const;
88  int GetVRes() const;
89  const MR_3DCoordinate *GetNodeList() const;
90 
91  };
92 
94  {
95  public:
98 
99  Frame();
100  ~Frame();
101  void Clean();
102  void Serialize(Parcel::ObjStream &pArchive, ResourceLib *pLib);
103  void Draw(VideoServices::Viewport3D *pDest, const VideoServices::PositionMatrix & pMatrix) const;
104 
105  };
106 
108  {
109  public:
110  int mNbFrame;
112 
113  Sequence();
114  ~Sequence();
115  void Serialize(Parcel::ObjStream &pArchive, ResourceLib *pLib);
116  void Draw(VideoServices::Viewport3D * pDest, const VideoServices::PositionMatrix & pMatrix, int pFrame) const;
117 
118  };
119 
123 
124  public:
125  // Only availlable for resourceLib and construction
126  MR_DllDeclare ResActor(int mResourceId);
128 
129  MR_DllDeclare int GetResourceId() const;
130 
131  MR_DllDeclare int GetSequenceCount() const;
132  MR_DllDeclare int GetFrameCount(int pSequence) const;
133 
134  MR_DllDeclare void Serialize(Parcel::ObjStream &pArchive, ResourceLib *pLib = NULL);
135  MR_DllDeclare void Draw(VideoServices::Viewport3D * pDest, const VideoServices::PositionMatrix & pMatrix, int pSequence, int pFrame) const;
136 
137 };
138 
139 } // namespace ObjFacTools
140 } // namespace HoverRace
141 
142 #undef MR_DllDeclare
#define MR_DllDeclare
Definition: ResActor.h:34
int mNbFrame
Definition: ResActor.h:110
int mNbSequence
Definition: ResActor.h:121
ActorComponent ** mComponentList
Definition: ResActor.h:97
int mURes
Definition: ResActor.h:75
Definition: Viewport3D.h:53
Definition: HoverRender.cpp:36
Definition: WorldCoordinates.h:75
Definition: Patch.h:39
MR_DllDeclare void Clean() noexcept
Must be called at the end of the program.
Definition: DllObjectFactory.cpp:63
Sequence * mSequenceList
Definition: ResActor.h:122
MR_3DCoordinate * mVertexList
Definition: ResActor.h:78
int mResourceId
Definition: ResActor.h:120
const ResBitmap * mBitmap
Definition: ResActor.h:77
Definition: Viewport3D.h:47
Base class for parcel serializers.
Definition: ObjStream.h:58
Definition: ResActor.h:52
int mVRes
Definition: ResActor.h:76
eComponentType
Definition: ResActor.h:57
Definition: Announcement.h:24
Definition: ResBitmap.h:47
int mNbComponent
Definition: ResActor.h:96
Legacy resource manager for ObjFac1.dat resources.
Definition: ResourceLib.h:55
Frame * mFrameList
Definition: ResActor.h:111