Skip to content

Commit 748f19d

Browse files
committed
Added functions to VerbIconData,h and comments
1 parent 85eccbd commit 748f19d

1 file changed

Lines changed: 78 additions & 22 deletions

File tree

Spore ModAPI/Spore/Editors/VerbIconData.h

Lines changed: 78 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,7 @@ namespace Editors
6565
{
6666
public:
6767
static const uint32_t TYPE = 0x4AA0ACD;
68+
VerbIconData();
6869

6970
/* 00h */ virtual int AddRef() override;
7071
/* 04h */ virtual int Release() override;
@@ -74,36 +75,33 @@ namespace Editors
7475
/* 14h */ virtual void Shutdown();
7576
/* 18h */ virtual void SetArrayIndex(int arrayIndex);
7677
/// Used to generate text
77-
/* 20h */ virtual void SetKey(int verbIconTriggerKey);
78-
/* 24h */ virtual eastl::string16 GetName(bool includeLevel);
79-
/* 28h */ virtual eastl::string16 GetDescription();
8078
/* 1Ch */ virtual void SetHotKey(int verbIconTriggerKey);
81-
/* 20h */ virtual eastl::string16 GetIconName(eastl::string16* iconName, bool includeLevel);
79+
/* 20h */ virtual eastl::string16 GetIconName(bool includeLevel);
8280
/* 24h */ virtual eastl::string16* GetIconDescription();
8381
public:
84-
/* 0Ch */ bool mVerbIconUseDescription; // true
85-
/* 0Dh */ bool mVerbIconShowLevel; // true
86-
/* 0Eh */ bool mPaletteItemRolloverShowLevel; // true
87-
/* 0Fh */ bool mVerbIconRolloverShowLevel; // true
88-
/* 10h */ bool mShowHotKey;
89-
/* 11h */ bool mVerbIconShowZeroLevel;
90-
/* 14h */ int mVerbIconTriggerKey; // -1
91-
/* 18h */ float mVerbIconLevel; // not initialized
92-
/* 1Ch */ float mVerbIconMaxLevel;
93-
/* 20h */ int field_20; // not initialized
94-
/* 24h */ uint32_t mVerbIconCategory;
82+
/* 0Ch */ bool mVerbIconUseDescription; // true
83+
/* 0Dh */ bool mVerbIconShowLevel; // true
84+
/* 0Eh */ bool mPaletteItemRolloverShowLevel; // true
85+
/* 0Fh */ bool mVerbIconRolloverShowLevel; // true
86+
/* 10h */ bool mShowHotKey; // false
87+
/* 11h */ bool mVerbIconShowZeroLevel; // false
88+
/* 14h */ int mVerbIconTriggerKey; // -2
89+
/* 18h */ float mVerbIconLevel; // not initialized
90+
/* 1Ch */ float mVerbIconMaxLevel; // 5.0
91+
/* 20h */ int field_20;
92+
/* 24h */ uint32_t mVerbIconCategory; // not initialized
9593
/* 28h */ uint32_t mVerbIconRepresentativeAnimation; // -1
9694
/* 2Ch */ Math::ColorRGBA mVerbIconColor;
9795
/* 3Ch */ uint32_t mVerbIconRolloverLevelImageID;
9896
/* 40h */ ResourceKey mVerbIconRolloverLevelLayoutID;
99-
/* 4Ch */ bool mVerbIconRolloverShowIcon; // not initialized
100-
/* 4Dh */ bool mVerbIconEnforceMaxLevel;
101-
/* 50h */ uint32_t mCreatureAbilityCategory; // not initialized
97+
/* 4Ch */ bool mVerbIconRolloverShowIcon;
98+
/* 4Dh */ bool mVerbIconEnforceMaxLevel; // false
99+
/* 50h */ uint32_t mCreatureAbilityCategory; // not initialized
102100
/* 54h */ LocalizedString mCreatureAbilityName;
103101
/* 68h */ eastl::string16 field_68;
104102
/* 78h */ uint32_t mTriggerKeyForLocalization;
105-
/* 7Ch */ int field_7C; // -1
106-
/* 80h */ int field_80; // -1
103+
/* 7Ch */ int field_7C; // -1
104+
/* 80h */ int field_80; // -1
107105
/* 84h */ int field_84;
108106
/* 88h */ int field_88;
109107
/* 8Ch */ int field_8C;
@@ -113,7 +111,7 @@ namespace Editors
113111
/* 9Ch */ ResourceKey mVerbIconLayout;
114112
/* A8h */ ResourceKey mVerbIconGameLayout;
115113
/* B4h */ ResourceKey mVerbIconStaticLayout;
116-
/* C0h */ PropertyListPtr mpPropList;
114+
/* C0h */ PropertyListPtr mpPropList; // not initialized
117115
};
118116
ASSERT_SIZE(VerbIconData, 0xC4);
119117

@@ -128,7 +126,65 @@ namespace Editors
128126
DeclareAddress(SetArrayIndex);
129127
DeclareAddress(SetHotKey);
130128
DeclareAddress(GetIconName);
131-
DeclareAddress(OnKeyDown);
132129
DeclareAddress(GetIconDescription);
133130
}
131+
132+
inline VerbIconData::VerbIconData()
133+
: mVerbIconUseDescription(true)
134+
, mVerbIconShowLevel(true)
135+
, mPaletteItemRolloverShowLevel(true)
136+
, mVerbIconRolloverShowLevel(true)
137+
, mShowHotKey(false)
138+
, mVerbIconShowZeroLevel(false)
139+
, mVerbIconTriggerKey(-2)
140+
, mVerbIconLevel()
141+
, mVerbIconMaxLevel(5.0)
142+
, field_20()
143+
, mVerbIconCategory()
144+
, mVerbIconRepresentativeAnimation()
145+
, mVerbIconColor()
146+
, mVerbIconRolloverLevelImageID()
147+
, mVerbIconRolloverLevelLayoutID()
148+
, mVerbIconRolloverShowIcon()
149+
, mVerbIconEnforceMaxLevel()
150+
, mCreatureAbilityCategory()
151+
, mCreatureAbilityName(LocalizedString())
152+
, field_68(eastl::string16())
153+
, mTriggerKeyForLocalization()
154+
, field_7C(-1)
155+
, field_80(-1)
156+
, field_84()
157+
, field_88()
158+
, field_8C()
159+
, mVerbIconImageID()
160+
, mVerbIconTrayOverrideImageID()
161+
, mVerbIconTraySmallCardOverrideImageID()
162+
, mVerbIconLayout()
163+
, mVerbIconGameLayout()
164+
, mVerbIconStaticLayout()
165+
, mpPropList(nullptr)
166+
{
167+
}
168+
inline VerbIconData::~VerbIconData() {}
169+
inline int VerbIconData::AddRef() {
170+
return DefaultRefCounted::AddRef();
171+
}
172+
inline int VerbIconData::Release() {
173+
return DefaultRefCounted::Release();
174+
}
175+
inline void* VerbIconData::Cast(uint32_t type) const {
176+
CLASS_CAST(Object);
177+
CLASS_CAST(VerbIconData);
178+
return nullptr;
179+
}
180+
#ifndef SDK_TO_GHIDRA
181+
182+
inline auto_METHOD_VOID(VerbIconData, Init, Args(App::PropertyList* propList), Args(propList));
183+
inline auto_METHOD_VOID_(VerbIconData, Shutdown);
184+
inline auto_METHOD_VOID(VerbIconData, SetArrayIndex, Args(int arrayIndex), Args(arrayIndex));
185+
inline auto_METHOD_VOID(VerbIconData, SetHotKey, Args(int verbIconTriggerKey), Args(verbIconTriggerKey));
186+
inline auto_METHOD(VerbIconData, eastl::string16, GetIconName, Args(bool includeLevel), Args(includeLevel));
187+
inline auto_METHOD_(VerbIconData, eastl::string16*, GetIconDescription);
188+
189+
#endif
134190
}

0 commit comments

Comments
 (0)