 |
Gorgon Game Engine
|
Go to the documentation of this file.
14 static const unsigned long CurrentVersion = 0x00010000;
26 constexpr
Type() : value() { }
29 explicit constexpr
Type(uint32_t value) : value(value) { }
38 return (
const char*)&value;
42 constexpr
bool IsEmpty()
const {
return value==0; }
51 constexpr
bool operator < (
const Type &type)
const {
return type.value<value; }
60 return (value>>16) & 0xff;
65 return value & 0xffff;
70 std::string
Name()
const;
259 static char hextable[]={
"0123456789ABCDEF"};
265 for(
int i=1;i<=8;i++) {
266 ret[8-i]=hextable[v%16];
288 case 0x00000000:
return "None";
289 case 0x000000FF:
return "File";
290 case 0x030100FF:
return "GameFile";
291 case 0x01010000:
return "Folder";
292 case 0x01010101:
return "Folder Names";
293 case 0x01010102:
return "Folder Name";
294 case 0x01010103:
return "Folder Props";
295 case 0x01020000:
return "LinkNode";
296 case 0x01020010:
return "LinkNode Target";
297 case 0x01030000:
return "Null";
298 case 0x00000010:
return "Guid";
299 case 0x00000011:
return "SGuid";
300 case 0x00000012:
return "Name";
301 case 0xF0030100:
return "LZMA";
302 case 0xF0040100:
return "FLAC";
303 case 0xF0030300:
return "JPEG";
304 case 0xF0030400:
return "PNG";
305 case 0x02010000:
return "Text";
306 case 0x02010101:
return "HTML";
307 case 0x02010102:
return "URL";
308 case 0x02010103:
return "File list";
309 case 0x02010104:
return "URI list";
310 case 0x02020000:
return "Image";
311 case 0x02020101:
return "Image Props";
312 case 0x02020102:
return "Image Cmp Props";
313 case 0x02020501:
return "Image Data";
314 case 0x02020601:
return "Image Cmp Data";
315 case 0x02020502:
return "Image Palette";
316 case 0x0202A100:
return "Image NULL";
317 case 0x02030000:
return "Data";
318 case 0x02030101:
return "Data Names";
319 case 0x02030102:
return "Data Name";
320 case 0x02030C01:
return "Data Text";
321 case 0x02030C02:
return "Data Int";
322 case 0x02030C03:
return "Data Float";
323 case 0x02030C04:
return "Data Point";
324 case 0x02030C09:
return "Data Pointf";
325 case 0x02030C05:
return "Data Rectangle";
326 case 0x02030C07:
return "Data Link";
327 case 0x03300C01:
return "Data Font";
328 case 0x02030D02:
return "Data Color";
329 case 0x02030D03:
return "Data Size";
330 case 0x02030D04:
return "Data Bounds";
331 case 0x02030D05:
return "Data Margin";
332 case 0x02030D06:
return "Data Object";
333 case 0x03100000:
return "Animation";
334 case 0x03110000:
return "Animation Image";
335 case 0x03100101:
return "Animation Durations";
336 case 0x03100102:
return "Animation Names";
337 case 0x03100103:
return "Animation Name";
338 case 0x03D10000:
return "LegacyPointer";
339 case 0x03D10101:
return "LegacyPointer Props";
340 case 0x03D20000:
return "Pointer";
341 case 0x03D20101:
return "Pointer Props";
342 case 0x03200000:
return "Font";
343 case 0x03200101:
return "Font Charmap";
344 case 0x03200102:
return "Font Names";
345 case 0x03200103:
return "Font Name";
346 case 0x03210000:
return "Font Image";
347 case 0x03200804:
return "Font Props";
348 case 0x03200805:
return "Font Charmap II";
349 case 0x03200806:
return "Font BitmapProps";
350 case 0x03300000:
return "FontTheme";
351 case 0x03301001:
return "FontTheme Font";
352 case 0x03301002:
return "FontTheme Shadow";
353 case 0x03300804:
return "FontTheme Props";
354 case 0x04010000:
return "Sound";
355 case 0x04010101:
return "Sound Props";
356 case 0x04010801:
return "Sound Wave";
357 case 0x04010802:
return "Sound Cmp Wave";
358 case 0x04010803:
return "Sound Cmp Props";
359 case 0x04010104:
return "Sound Fmt";
360 case 0x04010105:
return "Sound Channels";
361 case 0x04020000:
return "Blob";
362 case 0x04020101:
return "Blob Props";
363 case 0x04020801:
return "Blob Data";
364 case 0x04020802:
return "Blob Cmp Data";
365 case 0x05110000:
return "Line";
366 case 0x05110101:
return "Line Props";
367 case 0x05110102:
return "Line Props II";
368 case 0x05120000:
return "Rectangle";
369 case 0x05120101:
return "Rectangle Props";
370 case 0x05120102:
return "Rectangle Props II";
371 case 0x05170000:
return "MaskedObject";
372 case 0x05180000:
return "TintedObject";
373 case 0x05180101:
return "TintedObject Props";
374 case 0x05190000:
return "ScalableObject";
375 case 0x05190101:
return "ScalableObject Props";
376 case 0x051A0000:
return "StackedObject";
377 case 0x051A0101:
return "StackedObject Props";
constexpr Type Font_Charmap_II
Definition: GID.h:205
std::ostream & operator<<(std::ostream &out, const Resource::GID::Type &value)
Inserts a GID to a stream.
Definition: GID.h:277
constexpr Type Font_BitmapProps
Definition: GID.h:206
constexpr Type Font_Charmap
Definition: GID.h:200
constexpr Type PNG
PNG compression.
Definition: GID.h:126
std::enable_if< decltype(gorgon__enum_tr_loc(T_()))::isupgradedenum, std::string >::type From(const T_ &e)
Definition: Enum.h:303
constexpr uint32_t AsInteger() const
Returns the value of the GID as an integer.
Definition: GID.h:32
constexpr Type ScalableObject_Props
Definition: GID.h:248
constexpr Type Image_Props
Image properties.
Definition: GID.h:151
constexpr Type Image_Data
Uncompressed image data.
Definition: GID.h:155
constexpr Type Data_Names
Definition: GID.h:166
constexpr Type LinkNode
Link node resource Gorgon::Resource::LinkNode.
Definition: GID.h:101
constexpr Type Guid
Definition: GID.h:113
constexpr Type Data_Rectangle
Definition: GID.h:174
constexpr Type Sound_Props
Definition: GID.h:220
constexpr Type Sound_Cmp_Props
Definition: GID.h:223
constexpr Type Data_Color
Definition: GID.h:177
This is a line resource, it stores a Graphics::LineProvider.
Definition: Line.h:16
constexpr Type Text
Stores text data, no longer a resource.
Definition: GID.h:134
const char * AsData() const
Returns the value of the GID as a character array.
Definition: GID.h:37
constexpr Type LegacyPointer_Props
Definition: GID.h:194
constexpr Type Data_Pointf
Definition: GID.h:173
constexpr Type Data_Margin
Definition: GID.h:180
constexpr Type Data_Point
Definition: GID.h:172
constexpr Type URIList
List of URIs, not a resource.
Definition: GID.h:146
constexpr Type Folder_Props
Properties of a folder.
Definition: GID.h:97
constexpr Type Font_FreeTypeProps
Definition: GID.h:208
constexpr Type Animation_Name
Definition: GID.h:191
constexpr Type URL
URL data, not a resource.
Definition: GID.h:140
constexpr Type FontTheme_Font
Definition: GID.h:212
constexpr Type Image_Cmp_Data
Compressed image data.
Definition: GID.h:157
constexpr Type LinkNode_Target
Stores the target of the link.
Definition: GID.h:103
constexpr Type()
Default constructor creates an empty type.
Definition: GID.h:26
constexpr Type Image_Cmp_Props
Image compression properties.
Definition: GID.h:153
constexpr Type Sound_Wave
Definition: GID.h:221
This is sound resource.
Definition: Blob.h:15
This is a tinted object resource.
Definition: TintedObject.h:16
Root namespace for Gorgon Game Engine.
Definition: Any.h:19
constexpr Type Font_BitmapKerning
Definition: GID.h:207
constexpr Type TintedObject_Props
Definition: GID.h:245
constexpr Type StackedObject_Props
Definition: GID.h:251
constexpr bool operator==(const Type &type) const
Compares two GIDs.
Definition: GID.h:45
This is a stacked object resource.
Definition: StackedObject.h:15
constexpr Type Rectangle_Props_II
Definition: GID.h:240
constexpr Type FLAC
LZMA compression.
Definition: GID.h:122
constexpr Type Image_Palette
Image palette, not active yet.
Definition: GID.h:159
constexpr Type Font_Names
Definition: GID.h:201
constexpr Type Data_Text
Definition: GID.h:169
constexpr Type Folder_Name
Definition: GID.h:95
constexpr Type Line_Props_II
Definition: GID.h:236
This class represents a logical resource file.
Definition: File.h:53
constexpr Type Name
Name of a resource, names are not required to be unique.
Definition: GID.h:117
Pointer resource that can be used to create a new pointer to be displayed.
Definition: Pointer.h:25
constexpr Type None
Empty, different from Null resource.
Definition: GID.h:81
constexpr Type FileList
List of local files, not a resource.
Definition: GID.h:143
constexpr Type FontTheme_Shadow
Definition: GID.h:213
constexpr Type Blob_Cmp_Data
Definition: GID.h:230
constexpr Type Line_Props
Definition: GID.h:235
constexpr Type Font_Name
Definition: GID.h:202
constexpr Type Animation_Image
Definition: GID.h:188
constexpr Type FontTheme
Definition: GID.h:211
constexpr Byte Module() const
Returns the module identifier.
Definition: GID.h:54
constexpr bool IsEmpty() const
Checks if this type information is empty.
Definition: GID.h:42
constexpr Type Blob_Data
Definition: GID.h:229
constexpr bool operator!=(const Type &type) const
Compares two GIDs.
Definition: GID.h:48
constexpr Type Sound_Fmt
Definition: GID.h:224
This is a tinted object resource.
Definition: ScalableObject.h:16
constexpr Type Data_Int
Definition: GID.h:170
Definition: Rectangle.h:11
std::string Name() const
Return the name of a known GID.
Definition: GID.h:283
constexpr Type Animation_Durations
Definition: GID.h:189
constexpr Type Sound_Cmp_Wave
Definition: GID.h:222
unsigned char Byte
Represents smallest cell in memory.
Definition: Types.h:9
constexpr Type Blob_Props
Definition: GID.h:228
constexpr Type Data_Bounds
Definition: GID.h:179
constexpr Type Sound_Channels
Definition: GID.h:225
constexpr Type Image_NULL
Denotes the image is null.
Definition: GID.h:161
constexpr Type Font_Image
Definition: GID.h:203
constexpr Type Font_FreeTypeData
Definition: GID.h:209
constexpr Type FontTheme_Props
Definition: GID.h:214
constexpr Type Rectangle_Props
Definition: GID.h:239
constexpr Byte Property() const
Returns the property part of the GID.
Definition: GID.h:64
constexpr Type GameFile
Denotes this file is a game file.
Definition: GID.h:87
constexpr Type JPEG
JPEG compression.
Definition: GID.h:124
This is a null resource, it can be used in places where a resource is required but it is not wanted.
Definition: Null.h:17
constexpr Type Data_Link
Definition: GID.h:175
constexpr Type HTML
HTML data, not a resource.
Definition: GID.h:137
constexpr Type LZMA
LZMA compression.
Definition: GID.h:120
This is a masked object resource.
Definition: MaskedObject.h:15
Type to store GID information.
Definition: GID.h:23
This class represents a short globally unique identifier.
Definition: SGuid.h:22
Font resource.
Definition: Font.h:16
constexpr Type Data_Name
Definition: GID.h:167
constexpr Type LegacyPointer
Definition: GID.h:193
constexpr Type Font_Props
Definition: GID.h:204
constexpr Type Data_Size
Definition: GID.h:178
constexpr Type Pointer_Props
Definition: GID.h:197
constexpr Byte Object() const
Returns the object identifier.
Definition: GID.h:59
constexpr Type Animation_Names
Definition: GID.h:190
constexpr Type Data_Float
Definition: GID.h:171
This is basic folder resource, it contains other resources.
Definition: Folder.h:14
constexpr bool operator<(const Type &type) const
For std::less.
Definition: GID.h:51
This resource contains images.
Definition: Image.h:23
constexpr Type Data_Object
Definition: GID.h:181
This class represents an animation resource.
Definition: Animation.h:19
constexpr Type(uint32_t value)
Constructor to create a new GID from the given value.
Definition: GID.h:29
constexpr Type Folder_Names
Definition: GID.h:93
This is sound resource.
Definition: Sound.h:17
constexpr Type Data_Font
Definition: GID.h:176