Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
138 commits
Select commit Hold shift + click to select a range
908feb9
add function definition for AddCreature
Valla-Chan Jan 9, 2024
0318112
Merge branch 'master' of https://github.com/emd4600/Spore-ModAPI
Valla-Chan Jan 9, 2024
9913d93
Add MouthTypes to CommonIDs.h
Valla-Chan Jan 9, 2024
6da280d
Add name for Unk10 in enum CreaturePersonality
Valla-Chan Aug 19, 2024
fbdc34f
Add definitions to Cursors.h
Valla-Chan Aug 23, 2024
d4d3380
Merge branch 'emd4600:master' into master
Valla-Chan Aug 23, 2024
5172cd9
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Aug 23, 2024
b9ae16c
Fix typo, remove duplicate of auto_METHOD(cEditor, bool, AddCreature,…
Valla-Chan Aug 23, 2024
2147ceb
Merge branch 'emd4600:master' into master
Valla-Chan Aug 23, 2024
1eed050
Add enum of identity colors to cIdentityColorable
Valla-Chan Aug 23, 2024
ff135fe
Add several more cursors
Valla-Chan Aug 23, 2024
9ba0a2e
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Aug 23, 2024
f887e7f
ammend comment
Valla-Chan Aug 24, 2024
117e938
remove mouthtypes commit
Valla-Chan Aug 24, 2024
af84e58
Add space game cursors
Valla-Chan Aug 24, 2024
ab8e0a9
fix compile error in cursors.h
Valla-Chan Aug 24, 2024
adaa6ce
remove erroneous comment
Valla-Chan Aug 24, 2024
8807ab6
Merge branch 'emd4600:master' into master
Valla-Chan Aug 24, 2024
f99c941
Merge branch 'emd4600:master' into master
Valla-Chan Aug 24, 2024
546fdde
Merge branch 'emd4600:master' into master
Valla-Chan Aug 24, 2024
489f3ad
change mIDColorID to use IdentityColors
Valla-Chan Aug 25, 2024
3c3ed76
Add 2 new dev cheats (devEffectLog & PrintCursor), add support for pa…
Valla-Chan Aug 25, 2024
49173ec
fix improper effects detour
Valla-Chan Aug 25, 2024
b8bf9c4
Merge branch 'emd4600:master' into master
Valla-Chan Aug 28, 2024
e4a1317
document several part unlocking related fields
Valla-Chan Aug 30, 2024
5343f13
add comment to cCollectibleItems::sub_597BC0
Valla-Chan Aug 30, 2024
56ea6fe
Add cursors, Document string format for CursorManager::Load
Valla-Chan Sep 4, 2024
831a44a
fix typo
Valla-Chan Sep 7, 2024
7787dff
Merge branch 'emd4600:master' into master
Valla-Chan Sep 7, 2024
ffef770
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Sep 7, 2024
daa82fe
Merge branch 'emd4600:master' into master
Valla-Chan Sep 7, 2024
cc145ad
Add Math::GetDistance
Valla-Chan Sep 8, 2024
3812c5f
Merge branch 'emd4600:master' into master
Valla-Chan Sep 8, 2024
588d5ba
Revert "Add Math::GetDistance"
Valla-Chan Sep 9, 2024
89fb05f
Begin redoing EP1 object system
Valla-Chan Sep 11, 2024
33ceaba
Merge branch 'emd4600:master' into master
Valla-Chan Sep 16, 2024
97039ee
Merge branch 'emd4600:master' into master
Valla-Chan Sep 18, 2024
da5eb0b
Merge branch 'emd4600:master' into master
Valla-Chan Sep 19, 2024
7d3abfa
Revert "change mIDColorID to use IdentityColors"
Valla-Chan Sep 20, 2024
de9e709
Update cIdentityColorable.h
Valla-Chan Sep 20, 2024
233dd5c
cTribeHut - Document field_218
Valla-Chan Sep 20, 2024
e3e3584
cTribeHut - document field_21C
Valla-Chan Sep 20, 2024
431ecdd
Resolve 4/5 PR change requests
Valla-Chan Sep 20, 2024
9fa6047
add 'class' to identitycolor enum
Valla-Chan Sep 20, 2024
d7fee33
SpawnNpcTribe's 4rd interger arg = foodAmount
Valla-Chan Sep 21, 2024
2bb178f
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Sep 21, 2024
8c2520c
fix typo
Valla-Chan Sep 28, 2024
c16de41
fix typo in LoadBackgroundFiles
Valla-Chan Sep 30, 2024
4053ad8
Add message enums to SimulatorMessages.h, organize by stage
Valla-Chan Sep 30, 2024
afad808
fix typo
Valla-Chan Oct 1, 2024
25cee87
Clarify new simulator messages
Valla-Chan Oct 2, 2024
488c26a
Clarify more messages
Valla-Chan Oct 2, 2024
a0ee254
Add messages, change 1 type
Valla-Chan Oct 3, 2024
8236dd7
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 3, 2024
8276e41
Update SimulatorMessages.h
Valla-Chan Oct 3, 2024
cdc5dce
Update SimulatorMessages.h
Valla-Chan Oct 3, 2024
9197088
fix typo
Valla-Chan Oct 4, 2024
ed9c724
Document tribe vars
Valla-Chan Oct 7, 2024
4ca2586
Document cTribe.mbMembersFlee, add Button funcs, fix documentation co…
Valla-Chan Oct 7, 2024
f935542
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 7, 2024
d9a3a71
Annotate unknown func
Valla-Chan Oct 8, 2024
d4c51f5
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 9, 2024
482d47b
Resolve PR issues
Valla-Chan Oct 9, 2024
20bd733
Revert cTribeTool temp fix
Valla-Chan Oct 9, 2024
86fbc83
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 10, 2024
f08e17c
Merge branch 'emd4600:master' into master
Valla-Chan Oct 10, 2024
5587d33
fix HandheldItem enum typos
Valla-Chan Oct 10, 2024
3e82986
Merge branch 'emd4600:master' into master
Valla-Chan Oct 10, 2024
8d5a1e5
document tribe vars, rename BakeManager::func4Ch to Bake
Valla-Chan Oct 12, 2024
4631b23
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Oct 12, 2024
88eb2a1
Document EditorNamePanel Initialize()
Valla-Chan Oct 16, 2024
ac45c89
rename mbMembersFlee to mbDefeated
Valla-Chan Oct 16, 2024
fb39540
Merge branch 'emd4600:master' into master
Valla-Chan Oct 17, 2024
9aed2e2
String16 serialization fix
Valla-Chan Oct 17, 2024
d314060
Update cTribe.h
Valla-Chan Oct 19, 2024
ec4bc2a
Merge branch 'emd4600:master' into master
Valla-Chan Oct 19, 2024
b7a3b85
re-sort numgraspers next to numfeet in enum
Valla-Chan Oct 24, 2024
a15d35d
Merge branch 'emd4600:master' into master
Valla-Chan Oct 24, 2024
7f953a2
Merge branch 'emd4600:master' into master
Valla-Chan Oct 24, 2024
08f62a0
fix typos, document working OTDB params, reformat func28 in OTDB
Valla-Chan Oct 25, 2024
d130a7d
Update SimulatorMessages.h
Valla-Chan Oct 26, 2024
f004672
remove unnecessary comment
Valla-Chan Oct 26, 2024
d8df782
rename field_80 in cCombatant to mbInvincible
Valla-Chan Oct 26, 2024
869cc61
Document Cell Stage vars
Valla-Chan Nov 5, 2024
62867cb
Add TribeToolData group ID
Valla-Chan Nov 8, 2024
5fe847a
Add kCitizenActionWalkTo
Valla-Chan Nov 11, 2024
4a59bd6
document mPaintID
Valla-Chan Nov 12, 2024
7e3f5ad
add Simulator::GetMinimapWindow(), Add documentation related to minimap
Valla-Chan Nov 13, 2024
5b5361c
Merge branch 'emd4600:master' into master
Valla-Chan Nov 13, 2024
684f3fb
remove unneeded header
Valla-Chan Nov 13, 2024
a459e0f
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Nov 13, 2024
615488d
remove messy comment
Valla-Chan Nov 13, 2024
c3fbbfe
undo dubious var name
Valla-Chan Nov 13, 2024
6f7edb5
fix GetMinimapWindow crash
Valla-Chan Nov 13, 2024
c13a29d
add EditorManipulators enum to CommonIDs
Valla-Chan Nov 14, 2024
1bf65be
fix new enum to type as a uint32
Valla-Chan Nov 14, 2024
ca7219c
annotate EditorRigblock field_138
Valla-Chan Nov 14, 2024
8b77761
fix typo
Valla-Chan Nov 14, 2024
372b89b
fix typo in EditorRigblockBoolAttributes
Valla-Chan Nov 14, 2024
87f2ca3
change kEditorRigblockModelCanBeParentless to kEditorRigblockModelCan…
Valla-Chan Nov 14, 2024
77b675a
document creature model related vars and flags
Valla-Chan Nov 15, 2024
bd2d8fb
clarify comment
Valla-Chan Nov 15, 2024
97ef7cb
document int arg in cTribe::SpawnMember
Valla-Chan Nov 17, 2024
42d0d59
Add ColorRGB & ColorRGBA Serializers
Valla-Chan Nov 17, 2024
e184d07
rename func78h to GrowUp()
Valla-Chan Nov 18, 2024
89c532b
clarify cCreatureBase::IsHerbivore (also returns if creature is omniv…
Valla-Chan Nov 21, 2024
fd03139
Swap AbilityMode enum entries, annotate Editor::AddCreature()
Valla-Chan Nov 25, 2024
b46c819
add better description for AnimEditor, Fix icon capture for subcatego…
Valla-Chan Nov 27, 2024
8464c53
change IsHervibore to IsHerbivore (recent enough addition to mod API …
Valla-Chan Dec 1, 2024
bce5106
stop tracking editable sdkpathconfigs
Valla-Chan Dec 1, 2024
dc2ce9c
gitgnore
Valla-Chan Dec 1, 2024
291bdd1
fix remaining 'hervibore' typo
Valla-Chan Dec 1, 2024
04b3fee
undo "Hervibore" fix due to crashes
Valla-Chan Dec 1, 2024
391154b
fix variable annotations
Valla-Chan Dec 3, 2024
550030c
add default var amount to AddCreature
Valla-Chan Dec 3, 2024
dd38507
annotate var
Valla-Chan Dec 8, 2024
3d5d0c0
Editor::field_14C set to uint32
Valla-Chan Dec 8, 2024
2895833
change PaletteUIPtr to Palettes::PaletteUI* in thumbnail capture
Valla-Chan Jan 20, 2025
e3b0bfc
Merge branch 'emd4600:master' into master
Valla-Chan Jan 21, 2025
8ccda3c
add kHandheldItemTrgWildHorn to HandheldItem enum
Valla-Chan Mar 22, 2025
6ba7df2
add -help param to animeditor, rename cCreatureCitizen::field_FFC to …
Valla-Chan Mar 24, 2025
7de9d84
clarify raids and gifts in CitizenActions
Valla-Chan Mar 25, 2025
5e1b125
Rename Unknowns, Annotate vars, fix typos
Valla-Chan Apr 22, 2025
796ab7c
Add GetOrientationYawTowards to cSpatialObject
Valla-Chan Apr 22, 2025
1c61d15
Update the Mod Creator Kit to use new variable names
Valla-Chan Apr 22, 2025
36d8196
Add Mod Creator Kit cheats devSFXLog and devPlaySound
Valla-Chan Apr 22, 2025
a1adc3e
Merge branch 'emd4600:master' into master
Valla-Chan Apr 22, 2025
ba13c57
fix typo
Valla-Chan Apr 25, 2025
0f28d7e
Annotate Editor Camera vars
Valla-Chan Jun 22, 2025
b883416
Add Lerp() Math util
Valla-Chan Jun 22, 2025
d394ed0
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Jun 22, 2025
cd8b0ce
Add names to Editor Palette vars
Valla-Chan Aug 1, 2025
6a28e66
minor fixes to thumbnail script
Valla-Chan Aug 1, 2025
f349bc9
Merge branch 'emd4600:master' into master
Valla-Chan Aug 1, 2025
d96f8cd
clarify comments
Valla-Chan Aug 1, 2025
30d70c1
Merge branch 'master' of https://github.com/Valla-Chan/Spore-ModAPI
Valla-Chan Aug 1, 2025
f9cd6cc
Update comments, fix compile error
Valla-Chan Aug 6, 2025
7c271e8
change mSkinEffectIDs to uint32_t
Valla-Chan Aug 7, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion Projects/Example Projects/ModCreatorKit/AnimEditorMode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ bool AnimEditorMode::Initialize(App::IGameModeManager* pManager)
GameModeManager.SetActiveMode(MODE_ID);
}
else {
if (auto args = line.GetOption("help", 1))
{
App::ConsolePrintF("Params: -add, -remove, -play [hash], -default, -help, -exit");
}
if (auto args = line.GetOption("remove", 1))
{
int index = mpFormatParser->ParseInt(args[0]);
Expand All @@ -75,7 +79,7 @@ bool AnimEditorMode::Initialize(App::IGameModeManager* pManager)
request.shopperID = id("CreatureShopper");
Sporepedia::ShopperRequest::Show(request);
}
else if (line.HasFlag("exit"))
else if (line.HasFlag("exit") || line.HasFlag("quit"))
{
GameModeManager.SetActiveMode(kGGEMode);
}
Expand Down
4 changes: 4 additions & 0 deletions Projects/Example Projects/ModCreatorKit/Cheats.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@
#include "AddressCheat.h"
#include "AnimLogCheat.h"
#include "EffectLogCheat.h"
#include "SFXLogCheat.h"
#include "PackageCheat.h"
#include "PrintCursorCheat.h"
#include "UILogCheat.h"
#include "UIInspectCheat.h"
#include "PlaySoundCheat.h"

#include <Spore\App\ICheatManager.h>
#include <Spore\Editors\BakeManager.h>
Expand All @@ -49,11 +51,13 @@ void AddCheats()
{
CheatManager.AddCheat("devContext", new ContextCheat());
CheatManager.AddCheat("devAnimLog", new AnimLogCheat());
CheatManager.AddCheat("devSFXLog", new SFXLogCheat());
CheatManager.AddCheat("devEffectLog", new EffectLogCheat());
CheatManager.AddCheat("devPackage", new PackageCheat());
CheatManager.AddCheat("devLogUI", new UILogCheat());
CheatManager.AddCheat("devInspectUI", new UIInspectCheat());
CheatManager.AddCheat("devPrintCursor", new PrintCursorCheat());
CheatManager.AddCheat("devPlaySound", new PlaySoundCheat());

AddressCheat::AddCheat(Address(ModAPI::ChooseAddress(0x1498444, 0x1493E5C)), "devRaid");
AddressCheat::AddCheat(Address(ModAPI::ChooseAddress(0x149845C, 0x1493E74)), "devSpace");
Expand Down
16 changes: 16 additions & 0 deletions Projects/Example Projects/ModCreatorKit/ModCreatorKit.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -126,10 +126,18 @@
<SubType>
</SubType>
</ClInclude>
<ClInclude Include="PlaySoundCheat.h">
<SubType>
</SubType>
</ClInclude>
<ClInclude Include="PrintCursorCheat.h">
<SubType>
</SubType>
</ClInclude>
<ClInclude Include="SFXLogCheat.h">
<SubType>
</SubType>
</ClInclude>
<ClInclude Include="stdafx.h" />
<ClInclude Include="targetver.h" />
<ClInclude Include="ThumbnailCaptureScript.h" />
Expand Down Expand Up @@ -174,10 +182,18 @@
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="PlaySoundCheat.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="PrintCursorCheat.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="SFXLogCheat.cpp">
<SubType>
</SubType>
</ClCompile>
<ClCompile Include="stdafx.cpp">
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,12 @@
<ClInclude Include="EffectLogCheat.h">
<Filter>ModCreatorKit\Cheats</Filter>
</ClInclude>
<ClInclude Include="SFXLogCheat.h">
<Filter>ModCreatorKit\Cheats</Filter>
</ClInclude>
<ClInclude Include="PlaySoundCheat.h">
<Filter>ModCreatorKit\Cheats</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="DetouredDBPF.cpp">
Expand Down Expand Up @@ -165,6 +171,12 @@
<ClCompile Include="EffectLogCheat.cpp">
<Filter>ModCreatorKit\Cheats</Filter>
</ClCompile>
<ClCompile Include="SFXLogCheat.cpp">
<Filter>ModCreatorKit\Cheats</Filter>
</ClCompile>
<ClCompile Include="PlaySoundCheat.cpp">
<Filter>ModCreatorKit\Cheats</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
<None Include="SdkPathConfig.props" />
Expand Down
27 changes: 27 additions & 0 deletions Projects/Example Projects/ModCreatorKit/PlaySoundCheat.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#include "stdafx.h"
#include "PlaySoundCheat.h"

PlaySoundCheat::PlaySoundCheat()
{
}


PlaySoundCheat::~PlaySoundCheat()
{
}


void PlaySoundCheat::ParseLine(const ArgScript::Line& line)
{
mParameter = line.GetArguments(1)[0];
if (string16(mParameter).find(u"0x") == 0) {
Audio::PlayAudio(mpFormatParser->ParseUInt(mParameter));
}

Audio::PlayAudio(id(mParameter));
}

const char* PlaySoundCheat::GetDescription(ArgScript::DescriptionMode mode) const
{
return "Plays an SNR sound file by name or hash.";
}
20 changes: 20 additions & 0 deletions Projects/Example Projects/ModCreatorKit/PlaySoundCheat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#pragma once

#include <Spore\BasicIncludes.h>

class PlaySoundCheat
: public ArgScript::ICommand
{
public:
PlaySoundCheat();
~PlaySoundCheat();

// Called when the cheat is invoked
void ParseLine(const ArgScript::Line& line) override;

// Returns a string containing the description. If mode != DescriptionMode::Basic, return a more elaborated description
const char* GetDescription(ArgScript::DescriptionMode mode) const override;
private:
const char* mParameter;
};

31 changes: 31 additions & 0 deletions Projects/Example Projects/ModCreatorKit/SFXLogCheat.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#include "stdafx.h"
#include "SFXLogCheat.h"


bool SFXLogCheat::IsEnabled = false;

// Detour the audio playing func
static_detour(PlayAudio_detour, void(uint32_t, Audio::AudioTrack)) {
void detoured(uint32_t soundID, Audio::AudioTrack track) {
original_function(soundID, track);
if (SFXLogCheat::IsEnabled && soundID != 0)
{
App::ConsolePrintF("devSFXLog: playing Audio ID: 0x%x", soundID);
}
}
};

void SFXLogCheat::AttachDetour() {
PlayAudio_detour::attach(GetAddress(Audio, PlayAudio));
}

void SFXLogCheat::ParseLine(const ArgScript::Line& line)
{
auto args = line.GetArguments(1);
SFXLogCheat::IsEnabled = mpFormatParser->ParseBool(args[0]);
}

const char* SFXLogCheat::GetDescription(ArgScript::DescriptionMode mode) const
{
return "Usage: sfxLog on/off. If enabled, every time a UI sound effect is played it will print its ID. Does not include creature voices or world sounds.";
}
16 changes: 16 additions & 0 deletions Projects/Example Projects/ModCreatorKit/SFXLogCheat.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#pragma once

#include <Spore\BasicIncludes.h>

class SFXLogCheat
: public ArgScript::ICommand
{
public:
void ParseLine(const ArgScript::Line& line) override;
const char* GetDescription(ArgScript::DescriptionMode mode) const override;

static bool IsEnabled;

static void AttachDetour();
};

38 changes: 22 additions & 16 deletions Projects/Example Projects/ModCreatorKit/ThumbnailCaptureScript.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ ThumbnailCaptureScript::ThumbnailCaptureScript()
, mItemViewers()
, mpItemViewer(nullptr)
, mFolderPath()
, mIsEnabled(false)
, mbIsEnabled(false)
{
}

Expand Down Expand Up @@ -199,16 +199,20 @@ void ThumbnailCaptureScript::InjectListeners() {
// standard editor/planner
if (pageUI.page->mStandardItems.size() > 0) {
for (StandardItemUIPtr itemUI : pageUI.page->mStandardItems) {
itemUI->field_18->AddWinProc(this);
mItemViewers[itemUI->field_18.get()] = itemUI->mpViewer.get();
itemUI->mpWindow->AddWinProc(this);
mItemViewers[itemUI->mpWindow.get()] = itemUI->mpViewer.get();
}
}
// adventure editor
/*
else {
for (eastl::intrusive_ptr<Palettes::IAdvancedItemUI> itemUI : pageUI.page->mAdvancedItems) {
itemUI->mpWindow
mItemViewers[itemUI->field_18.get()] = itemUI->mpViewer.get();
for (IAdvancedItemUIPtr itemUI : pageUI.page->mAdvancedItems) {
auto item = object_cast<Palettes::DefaultItemFrameUI>(itemUI.get());
if (item && item->mpWindow) {
item->mpWindow->AddWinProc(this);
mItemViewers[item->mpWindow.get()] = itemUI->mpViewer.get();
}

}
}*/

Expand All @@ -218,9 +222,11 @@ void ThumbnailCaptureScript::InjectListeners() {
// simple category
else {
for (auto pageUI : catUI->mPageUIs) {
for (StandardItemUIPtr itemUI : pageUI.page->mStandardItems) {
itemUI->field_18->AddWinProc(this);
mItemViewers[itemUI->field_18.get()] = itemUI->mpViewer.get();
if (pageUI.page->mStandardItems.size() > 0) {
for (StandardItemUIPtr itemUI : pageUI.page->mStandardItems) {
itemUI->mpWindow->AddWinProc(this);
mItemViewers[itemUI->mpWindow.get()] = itemUI->mpViewer.get();
}
}
}
}
Expand All @@ -247,14 +253,14 @@ void ThumbnailCaptureScript::RemoveListeners() {
// standard editor/planner
if (pageUI.page->mStandardItems.size() > 0) {
for (StandardItemUIPtr itemUI : pageUI.page->mStandardItems) {
itemUI->field_18->RemoveWinProc(this);
itemUI->mpWindow->RemoveWinProc(this);
}
}
/*
// adventure editor
else {
for (StandardItemUIPtr itemUI : pageUI.page->mpPage->mItems) {
itemUI->field_18->RemoveWinProc(this);
itemUI->mpWindow->RemoveWinProc(this);
}
}
*/
Expand All @@ -265,8 +271,8 @@ void ThumbnailCaptureScript::RemoveListeners() {
else {
for (auto pageUI : catUI->mPageUIs) {
for (StandardItemUIPtr itemUI : pageUI.page->mStandardItems) {
if (itemUI && itemUI->field_18) {
itemUI->field_18->RemoveWinProc(this);
if (itemUI && itemUI->mpWindow) {
itemUI->mpWindow->RemoveWinProc(this);
}
}
}
Expand All @@ -279,10 +285,10 @@ void ThumbnailCaptureScript::RemoveListeners() {
}

void ThumbnailCaptureScript::ParseLine(const ArgScript::Line& line) {
if (mIsEnabled) {
if (mbIsEnabled) {
RemoveListeners();
App::ConsolePrintF("Icon capture disabled.");
mIsEnabled = false;
mbIsEnabled = false;
return;
}

Expand Down Expand Up @@ -327,7 +333,7 @@ void ThumbnailCaptureScript::ParseLine(const ArgScript::Line& line) {
InjectListeners();

App::ConsolePrintF("Icon capture enabled: hover a palette item and wait until it starts rotating to generate the icon.");
mIsEnabled = true;
mbIsEnabled = true;
}

const char* ThumbnailCaptureScript::GetDescription(ArgScript::DescriptionMode mode) const {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,6 @@ class ThumbnailCaptureScript
ColorRGB mOldColor;
ColorRGB mIdentityColor;
string16 mFolderPath;
bool mIsEnabled;
bool mbIsEnabled;
};

4 changes: 4 additions & 0 deletions Projects/Example Projects/ModCreatorKit/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
#include "Cheats.h"
#include "ThumbnailCaptureScript.h"
#include "AnimLogCheat.h"
#include "EffectLogCheat.h"
#include "SFXLogCheat.h"
#include "UILogCheat.h"
#include "AnimEditorMode.h"

Expand Down Expand Up @@ -108,6 +110,8 @@ void AttachDetours()
Debugging::AttachDetour();
cEffectsManager_detour::attach(GetAddress(Swarm::cSwarmManager, GetDirectoryAndEffectIndex));
AnimLogCheat::AttachDetour();
EffectLogCheat::AttachDetour();
SFXLogCheat::AttachDetour();
UILogCheat::AttachDetour();
ThumbnailCaptureScript::AttachDetour();
}
Expand Down
2 changes: 1 addition & 1 deletion Spore ModAPI/SourceCode/Editors/EditorCamera.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ namespace Editors
, mbEditorCameraTurntableStyle()
, field_94()
, field_98()
, field_9C()
, mbFOVisCurrent()
, mInput()
, mpViewer(nullptr)
{
Expand Down
15 changes: 11 additions & 4 deletions Spore ModAPI/SourceCode/Editors/EditorPalettes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -226,14 +226,14 @@ namespace Palettes
PaletteUI::PaletteUI()
: mpLayout(nullptr)
, mpCategoryButtonsWindow()
, field_14()
, field_18()
, field_1C()
, mpWindowLeft()
, mpWindowRight()
, mpWindowBehind()
, mpAnimatedWindow(nullptr)
, mpCategoryContent()
, mpPalette(nullptr)
, mCategories()
, field_48()
, mCategorySlots()
, field_5C()
, field_60()
, mpActiveCategory()
Expand Down Expand Up @@ -278,6 +278,13 @@ namespace Palettes
return paint;
}

void PaletteUI::SetActiveCategory(int categoryIndex)
{
CALL(GetAddress(PaletteUI, SetActiveCategory), void,
Args(PaletteUI*, int),
Args(this, categoryIndex));
}

auto_METHOD_VOID(PaletteUI, Load, Args(PaletteMain* pPalette, UTFWin::IWindow* pWindow, bool arg_8, PaletteInfo* arg_C),
Args(pPalette, pWindow, arg_8, arg_C));

Expand Down
Loading
Loading