CommonLibSSE NG
Loading...
Searching...
No Matches
GFxResourceID.h
Go to the documentation of this file.
1#pragma once
2
3namespace RE
4{
6 {
7 public:
9 {
10 enum IDTypeConstant : std::uint32_t
11 {
12 kIndexMask = 0x0000FFFF,
13 kTypeMask = 0x0FFF0000,
14 kGenMask = 0x00030000,
15
16 kSWF = 0,
17 kStatic = 1 << 16,
18 kExport = 1 << 17,
19
21
22 kInvalidID = (1 << kTypeShift) | kSWF
23 };
24 };
25
26 struct IDTypes
27 {
28 enum IDType : std::uint32_t
29 {
35 };
36 };
37
38 class HashOp
39 {
40 public:
42 };
43
45 explicit GFxResourceID(std::uint32_t a_resID);
47
49 bool operator==(const GFxResourceID& a_rhs) const;
50 bool operator!=(const GFxResourceID& a_rhs) const;
51 bool operator==(std::uint32_t a_idVal) const;
52 bool operator!=(std::uint32_t a_idVal) const;
53
54 [[nodiscard]] std::uint32_t GetIDValue() const;
55 [[nodiscard]] std::uint32_t GetIDIndex() const;
56 [[nodiscard]] IDTypes::IDType GetIDType() const;
58
59 protected:
60 // members
61 std::uint32_t id; // 0
62 };
63 static_assert(sizeof(GFxResourceID) == 0x4);
64}
Definition GFxResourceID.h:39
UPInt operator()(const GFxResourceID &a_idRef)
Definition GFxResourceID.h:6
bool operator==(const GFxResourceID &a_rhs) const
GFxResourceID & operator=(const GFxResourceID &a_rhs)
std::uint32_t GetIDValue() const
GFxResourceID GenerateNextID()
bool operator!=(const GFxResourceID &a_rhs) const
IDTypes::IDType GetIDType() const
GFxResourceID(std::uint32_t a_resID)
bool operator==(std::uint32_t a_idVal) const
std::uint32_t id
Definition GFxResourceID.h:61
std::uint32_t GetIDIndex() const
bool operator!=(std::uint32_t a_idVal) const
GFxResourceID(const GFxResourceID &a_rhs)
Definition AbsorbEffect.h:6
std::size_t UPInt
Definition SFTypes.h:5
Definition GFxResourceID.h:9
IDTypeConstant
Definition GFxResourceID.h:11
@ kTypeMask
Definition GFxResourceID.h:13
@ kTypeShift
Definition GFxResourceID.h:20
@ kSWF
Definition GFxResourceID.h:16
@ kGenMask
Definition GFxResourceID.h:14
@ kStatic
Definition GFxResourceID.h:17
@ kInvalidID
Definition GFxResourceID.h:22
@ kIndexMask
Definition GFxResourceID.h:12
@ kExport
Definition GFxResourceID.h:18
Definition GFxResourceID.h:27
IDType
Definition GFxResourceID.h:29
@ kInternalConstant
Definition GFxResourceID.h:31
@ kFontImage
Definition GFxResourceID.h:34
@ kNone
Definition GFxResourceID.h:30
@ kGradientImage
Definition GFxResourceID.h:32
@ kDynFontImage
Definition GFxResourceID.h:33