HoverRace  2.0
ResBitmap.h
Go to the documentation of this file.
1 // ResBitmap.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 "../VideoServices/Bitmap.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 Parcel {
40  class ObjStream;
41  }
42 }
43 
44 namespace HoverRace {
45 namespace ObjFacTools {
46 
48 {
49  protected:
50  class SubBitmap
51  {
52  public:
53  int mXRes;
54  int mYRes;
58 
61 
64 
65  void Serialize(Parcel::ObjStream &pArchive);
66 
67  };
68 
70  int mWidth; // in milimeters
71  int mHeight; // in milimeters
72  int mXRes;
73  int mYRes;
75  MR_UInt8 mPlainColor; // 0 mean transparent
76 
78 
79  public:
80  // Only availlable for resourceLib and construction
81  MR_DllDeclare ResBitmap(int pResourceId);
83 
84  MR_DllDeclare int GetResourceId() const;
85  MR_DllDeclare void Serialize(Parcel::ObjStream &pArchive);
86 
87  MR_DllDeclare int GetWidth() const;
88  MR_DllDeclare int GetHeight() const;
89  MR_DllDeclare int GetMaxXRes() const;
90  MR_DllDeclare int GetMaxYRes() const;
91  MR_DllDeclare MR_UInt8 GetPlainColor() const;
92 
93  MR_DllDeclare void SetWidthHeight(int pWidth, int pHeight);
94 
95  // Subbitmap related functions
96  MR_DllDeclare int GetNbSubBitmap() const;
97  MR_DllDeclare int GetXRes(int pSubBitmap) const;
98  MR_DllDeclare int GetYRes(int pSubBitmap) const;
99  MR_DllDeclare int GetXResShiftFactor(int pSubBitmap) const;
100  MR_DllDeclare int GetYResShiftFactor(int pSubBitmap) const;
101  MR_DllDeclare MR_UInt8 *GetBuffer(int pSubBitmap) const;
102  MR_DllDeclare MR_UInt8 *GetColumnBuffer(int pSubBitmap, int pColumn) const;
103  MR_DllDeclare MR_UInt8 **GetColumnBufferTable(int pSubBitmap) const;
104 };
105 
106 } // namespace ObjFacTools
107 } // namespace HoverRace
108 
109 #undef MR_DllDeclare
int mYRes
Definition: ResBitmap.h:73
int mHeight
Definition: ResBitmap.h:71
#define MR_DllDeclare
Definition: ResBitmap.h:35
MR_UInt8 ** mColumnPtr
Definition: ResBitmap.h:60
int mYResShiftFactor
Definition: ResBitmap.h:56
MR_UInt8 * mBuffer
Definition: ResBitmap.h:59
int mResourceId
Definition: ResBitmap.h:69
int mSubBitmapCount
Definition: ResBitmap.h:74
int mWidth
Definition: ResBitmap.h:70
int mXRes
Definition: ResBitmap.h:53
BOOL mHaveTransparent
Definition: ResBitmap.h:57
Base class for parcel serializers.
Definition: ObjStream.h:58
int mXResShiftFactor
Definition: ResBitmap.h:55
int mYRes
Definition: ResBitmap.h:54
Definition: Bitmap.h:40
Definition: Announcement.h:24
Definition: ResBitmap.h:47
uint8_t MR_UInt8
Definition: MR_Types.h:40
SubBitmap * mSubBitmapList
Definition: ResBitmap.h:77
MR_UInt8 mPlainColor
Definition: ResBitmap.h:75
int mXRes
Definition: ResBitmap.h:72