Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
9f96b7f
Update SimulatorEnums.h
Valla-Chan Dec 30, 2025
d86dfc8
Merge branch 'emd4600:master' into master
Valla-Chan Dec 30, 2025
5fd4ba6
change cCreatureModeStrategy pickup structs
Valla-Chan Jan 3, 2026
cbe288c
add kCreatureFlagIsEpic flag
Valla-Chan Jan 3, 2026
bbc30e0
revert GetSelectableMembers to return cSpatialObjectPtr
Valla-Chan Jan 3, 2026
a647ffc
Merge branch 'emd4600:master' into master
Valla-Chan Jan 9, 2026
be4d2f3
annotate and edit vars
Valla-Chan Jan 12, 2026
189ccba
field_7BC ->mbEnableAmbientEffects
Valla-Chan Jan 13, 2026
33fb038
annotate some vars
Valla-Chan Jan 21, 2026
576d9e2
add additional operators and funcs to Math::Color
Valla-Chan Jan 21, 2026
d347549
rename and annotate cTerrainStateMgr vars
Valla-Chan Jan 21, 2026
5d9657c
overhaul EditorRequest
Valla-Chan Jan 21, 2026
e16bad0
GameBundle related vars
Valla-Chan Jan 22, 2026
251ce94
add ScheduleTaskWithArgs to IMessageManager
Valla-Chan Jan 22, 2026
a87fb51
fix cGameBundleGroundContainer
Valla-Chan Jan 22, 2026
271966d
rename EditorUI vars
Valla-Chan Jan 22, 2026
286917e
make ScheduleTaskWithArgs less strict with input types
Valla-Chan Jan 22, 2026
edf1179
add Teleport & CreateGroundBundles helper funcs
Valla-Chan Jan 23, 2026
15d4c16
remove outdated comment
Valla-Chan Jan 27, 2026
28c2e70
fix typos
Valla-Chan Jan 28, 2026
ef1547d
add info to CitizenAction enum
Valla-Chan Jan 28, 2026
373fb21
annotate and rename vars
Valla-Chan Jan 30, 2026
69358a3
add single arg instantiators to ResourceKey and ResourceID
Valla-Chan Jan 30, 2026
39208dc
annotate community plan vars
Valla-Chan Feb 4, 2026
9de0788
add Vec * Vec and Vec / Vec operators to Vector2-4
Valla-Chan Feb 4, 2026
53a45af
fix various typos, annotate vars
Valla-Chan Feb 5, 2026
acdd1e6
Update AddressesSimulator.cpp
Valla-Chan Feb 5, 2026
04899ba
annotate CreatureModeStrategy Pickup struct
Valla-Chan Feb 5, 2026
90e47aa
Update cCreatureBase.h
Valla-Chan Feb 5, 2026
ef5adfe
add DamageType enum
Valla-Chan Feb 6, 2026
92a58e7
fix some issues
Valla-Chan Feb 6, 2026
52dc391
add App::RenderType
Valla-Chan Feb 6, 2026
04bc681
add .find() to vector<eastl::type>
Valla-Chan Feb 9, 2026
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
30 changes: 30 additions & 0 deletions EASTL-3.02.01/include/EASTL/vector.h
Original file line number Diff line number Diff line change
Expand Up @@ -333,6 +333,8 @@ namespace eastl

bool validate() const EA_NOEXCEPT;
int validate_iterator(const_iterator i) const EA_NOEXCEPT;
int find(const value_type& value) const EA_NOEXCEPT;
int find(const value_type& value, const bool reverse) const EA_NOEXCEPT;

#if EASTL_RESET_ENABLED
void reset() EA_NOEXCEPT; // This function name is deprecated; use reset_lose_memory instead.
Expand Down Expand Up @@ -1356,6 +1358,34 @@ namespace eastl
mpEnd = mpBegin;
}

template <typename T, typename Allocator>
inline int vector<T, Allocator>::find(const value_type& value) const EA_NOEXCEPT
{
const value_type* p = data();
const value_type* e = p + size();
for (; p != e; ++p)
if (*p == value)
return int(p - data());
return -1;
}

template <typename T, typename Allocator>
inline int vector<T, Allocator>::find(const value_type& value, const bool reverse) const EA_NOEXCEPT
{
const value_type* p = data();
const value_type* e = p + size();
if (!reverse) {
for (; p != e; ++p)
if (*p == value)
return int(p - data());
}
else {
while (p != b)
if (*--p == value)
return int(p - b);
}
return -1;
}

#if EASTL_RESET_ENABLED
// This function name is deprecated; use reset_lose_memory instead.
Expand Down
3 changes: 2 additions & 1 deletion Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -844,7 +844,7 @@ namespace Simulator
namespace Addresses(cScenarioPowerup)
{
DefineAddress(ReactToPowerup, SelectAddress(0xF23FD0, 0xF23BF0));
//TODO DefineAddress(ApplyBoost, SelectAddress(0xF20670, 0xF20290));
DefineAddress(ApplyBoost, SelectAddress(0xF20670, 0xF20290));
DefineAddress(ActivateMedKit, SelectAddress(0xF229C0, 0xF225E0));
DefineAddress(ActivateEnergyKit, SelectAddress(0xF22BE0, 0xF22800));
DefineAddress(ActivateSpeedBoost, SelectAddress(0xF232B0, 0xF22ED0));
Expand Down Expand Up @@ -1188,6 +1188,7 @@ namespace Simulator
namespace Addresses(cBundleManager) {
DefineAddress(Get, SelectAddress(0xB3D210, 0xB3D3B0));
DefineAddress(CreateBundles, SelectAddress(0xAC7810, 0xAC79F0));
//DefineAddress(RemoveBundles, SelectAddress(0xAC7A70, )); // TODO: disk address
}

namespace Addresses(cTribeInputStrategy) {
Expand Down
34 changes: 17 additions & 17 deletions Spore ModAPI/SourceCode/Editors/EditorRequest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,39 +6,39 @@ namespace Editors
{
EditorRequest::EditorRequest()
: mRefCount()
, editorID(-1)
, creationKey()
, activeModeID(GameModeManager.GetActiveModeID())
, field_20()
, editableTests()
, sporepediaCanSwitch()
, disableNameEdit()
, allowSporepedia()
, hasSaveButton()
, hasCreateNewButton()
, hasExitButton(true)
, hasPublishButton()
, hasCancelButton(true)
, mEditorName(-1)
, mModelKey()
, mCallingGameModeID(GameModeManager.GetActiveModeID())
, mbIsFirstTimeInEditor()
, mEditableTests()
, mbSporepediaCanSwitch()
, mbDisableNameEdit()
, mbAllowSporepedia()
, mShowSaveButton()
, mShowNewButton()
, mShowExitButton(true)
, mShowPublishButton()
, mShowCancelButton(true)
, field_3C()
, field_3D(true)
, field_40()
, field_50()
, field_60()
, field_64()
, field_65()
, mShowPlayButton()
, field_66()
, field_68()
, field_6C()
, field_6D(true)
, field_6E(true)
, field_6F()
, field_70()
, mConsequenceTraits()
, field_84()
, field_88()
, field_8C()
, field_90()
, field_94(nullptr)
, next(nullptr)
, mpCollectableItems(nullptr)
, mpNext(nullptr)
{
}

Expand Down
18 changes: 18 additions & 0 deletions Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,24 @@ namespace Simulator
Args(float amount, cGameBundleContainer* container, int bundleType),
Args(amount, container, bundleType));


auto_METHOD(cBundleManager, float, RemoveBundles,
Args(float amount, cGameBundleContainer* container, cGameBundle* bundle),
Args(amount, container, bundle));



cGameBundle* cBundleManager::CreateGroundBundles(float amount, int bundleType, const Vector3& position, const Quaternion& orientation) {
cGameBundle* bundles = CreateBundles(amount, mpGroundContainer.get(), bundleType);
if (bundles) bundles->Teleport(position, orientation);
return bundles;
}


float cBundleManager::RemoveGroundBundles(float amount, cGameBundle* bundle) {
return RemoveBundles(amount, mpGroundContainer.get(), bundle);
}

/// GamePlantManager ///

auto_STATIC_METHOD_(cGamePlantManager, cGamePlantManager*, Get);
Expand Down
8 changes: 8 additions & 0 deletions Spore ModAPI/SourceCode/Simulator/cSpatialObject.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,13 @@ namespace Simulator
// Apply the yaw rotation while maintaining the original pitch and roll
return (yawRotation * GetOrientation());
}

void cSpatialObject::Teleport(const Math::Vector3& position) {
this->Teleport(position, mOrientation);
}
void cSpatialObject::Teleport(const cSpatialObjectPtr& refobj) {
this->Teleport(refobj->GetPosition(), refobj->GetOrientation());
}

}
#endif
16 changes: 8 additions & 8 deletions Spore ModAPI/SourceCode/Terrain/Terrain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ namespace Terrain
, mpTextureCliff()
, mpAtmospherePackedCurves()
, mpAboveColorRamp()
, field_38()
, field_3C()
, field_40()
, field_44()
, field_48()
, mpAboveDetailNoise()
, mpPlanetColorRampsDead()
, mpPlanetColorRampsLiving()
, mpPlanetColorRampsIce()
, mpPlanetColorRampsLava()
, field_4C()
, field_50()
, field_54()
, mpJetStream()
, mpPCAWater()
{

}
Expand Down Expand Up @@ -175,7 +175,7 @@ namespace Terrain
, field_61C()
, field_620()
, field_624()
, field_7BC()
, mbEnableAmbientEffects()
{
memset(field_628, 0, sizeof(field_628));
memset(field_7C0, 0, sizeof(field_7C0));
Expand Down
66 changes: 62 additions & 4 deletions Spore ModAPI/Spore/App/IMessageManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ namespace App
/// kMsgAppUpdate message. Every frame uses a Clock object to compare the elapsed time since
/// this task as scheduled. The listener is removed once the task has finished executing.
///
/// @param function A void function with no parameters, that will be executed every frame.
/// @param function A void function with no parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
inline ScheduledTaskListenerPtr ScheduleTask(const VoidFunction_T& function, float scheduleTime) {
auto listener = new ScheduledTaskListener(function, scheduleTime, 0.0f);
Expand All @@ -268,6 +268,14 @@ namespace App
return listener;
}

/// @param function A void function with parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
template <typename Func, typename... Args>
inline ScheduledTaskListenerPtr ScheduleTaskWithArgs(Func&& function, float scheduleTime, Args&&... args) {
auto boundFunction = [=]() { function(args...); };
return ScheduleTask(boundFunction, scheduleTime);
}

///
/// Executes a class method after a certain time (measured in seconds) has passed from ths call. The method
/// is executed only once, and the time starts counting since this ScheduleTask method has been called.
Expand All @@ -280,7 +288,7 @@ namespace App
/// this task as scheduled. The listener is removed once the task has finished executing.
///
/// @param object The object to which the method will be called.
/// @param method A void method with no parameters, that will be executed every frame.
/// @param method A void method with no parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
template <class T>
inline ScheduledTaskListenerPtr ScheduleTask(T* object, VoidMethod_T<T> method, float scheduleTime) {
Expand All @@ -289,6 +297,27 @@ namespace App
}, scheduleTime);
}

/// @param object The object to which the method will be called.
/// @param function A void function with parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
template <class ObjT, class MethodT, class... MethodArgs, class... CallArgs>
inline ScheduledTaskListenerPtr ScheduleTaskWithArgs(
ObjT* object,
void (MethodT::* method)(MethodArgs...),
float scheduleTime,
CallArgs&&... args)
{
static_assert(std::is_base_of_v<MethodT, ObjT>,
"Object must derive from method's class");

// Own the data safely for delayed execution
auto boundFunction = [object, method, args...]() {
(static_cast<MethodT*>(object)->*method)(args...);
};

return ScheduleTask(boundFunction, scheduleTime);
}

///
/// Executes a function after a certain time (measured in seconds) has passed from this call,
/// and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter. The function is executed only
Expand Down Expand Up @@ -366,7 +395,7 @@ namespace Simulator
/// kMsgAppUpdate message. Every frame uses a cGonzagoTimer object to compare the elapsed time since
/// this task as scheduled. The listener is removed once the task has finished executing.
///
/// @param function A void function with no parameters, that will be executed every frame.
/// @param function A void function with no parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
inline SimScheduledTaskListenerPtr ScheduleTask(const App::VoidFunction_T& function, float scheduleTime) {
auto listener = new ScheduledTaskListener(function, scheduleTime, 0.0f);
Expand All @@ -375,6 +404,14 @@ namespace Simulator
return listener;
}

/// @param function A void function with parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
template <typename Func, typename... Args>
inline SimScheduledTaskListenerPtr ScheduleTaskWithArgs(Func&& function, float scheduleTime, Args&&... args) {
auto boundFunction = [=]() { function(args...); };
return ScheduleTask(boundFunction, scheduleTime);
}

///
/// Executes a class method after a certain time (measured in seconds) has passed from ths call. The method
/// is executed only once, and the time starts counting since this ScheduleTask method has been called.
Expand All @@ -387,7 +424,7 @@ namespace Simulator
/// this task as scheduled. The listener is removed once the task has finished executing.
///
/// @param object The object to which the method will be called.
/// @param method A void method with no parameters, that will be executed every frame.
/// @param method A void method with no parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
template <class T>
inline SimScheduledTaskListenerPtr ScheduleTask(T* object, App::VoidMethod_T<T> method, float scheduleTime) {
Expand All @@ -396,6 +433,27 @@ namespace Simulator
}, scheduleTime);
}

/// @param object The object to which the method will be called.
/// @param method A void method with parameters, that will be executed after the scheduled time.
/// @param scheduleTime The time that has to pass, in seconds, since the task is scheduled for it to be executed.
template <class ObjT, class MethodT, class... MethodArgs, class... CallArgs>
inline SimScheduledTaskListenerPtr ScheduleTaskWithArgs(
ObjT* object,
void (MethodT::* method)(MethodArgs...),
float scheduleTime,
CallArgs&&... args)
{
static_assert(std::is_base_of_v<MethodT, ObjT>,
"Object must derive from method's class");

// Own the data safely for delayed execution
auto boundFunction = [object, method, args...]() {
(static_cast<MethodT*>(object)->*method)(args...);
};

return ScheduleTask(boundFunction, scheduleTime);
}

///
/// Executes a function after a certain time (measured in seconds) has passed from this call,
/// and then keeps repeating it after a certain period (defined by the repeatRate parameter) parameter. The function is executed only
Expand Down
14 changes: 7 additions & 7 deletions Spore ModAPI/Spore/App/cCreatureModeStrategy.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,20 +139,20 @@ namespace App
void* unk1; // unknown class?
};

struct PickupItem {
static const uint32_t ID = 0xD335362C;
struct Pickup {
static const uint32_t ID = 0xD3353636;

cCreatureBase* creature;
cInteractableObject* item;
cGameData* target; // cInteractableObject* or cCreatureBase*
int field_8; // 0
void* unk1; // unknown class?
};
struct PickupCreature {
static const uint32_t ID = 0xD3353636;

struct Pickup1 {
static const uint32_t ID = 0xD335362C;

cCreatureBase* creature;
cCreatureBase* targetcreature;
cGameData* target; // cInteractableObject* or cCreatureBase*
int field_8; // 0
void* unk1; // unknown class?
};
Expand Down
21 changes: 21 additions & 0 deletions Spore ModAPI/Spore/App/cViewer.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,27 @@ using namespace Math;

namespace App
{

enum RenderType {
kRenderTypeDefault = 0,
kRenderTypeShadowRender = 1,
kRenderTypeShadowMap = 2,
kRenderTypeSplatter = 3,
kRenderTypeNonMRTShadows = 4,
kRenderTypeImpostorDiffuse = 5,
kRenderTypeImpostorNormal = 6,
kRenderTypeImpostorSpec = 7,
kRenderTypeAmbOccShadowMap = 8,
kRenderTypeAmbOccSplatter = 9,
kRenderTypeStandardShadow = 10,
kRenderTypeDepth = 11,
kRenderTypeRegionOutline = 12,
kRenderTypeShowLOD = 13,
kRenderTypeSolidWhite = 13,
kRenderTypeCreatureEffects = 15, // 15 : hologram and such
kMaxRenderTypes = 16
};

/// This class represents all the camera and viewport configuration used to render a scene.
/// This includes the FOV, projection matrix, view matrix (i.e. camera orientation and position),
/// as well as the color and depth buffers where the scene will be rendered into.
Expand Down
2 changes: 1 addition & 1 deletion Spore ModAPI/Spore/Editors/Editor.h
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ namespace Editors
/* 142h */ bool field_142;
/* 143h */ bool field_143; // not initialized
/* 144h */ bool field_144; // true
/* 148h */ ObjectPtr field_148;
/* 148h */ ObjectPtr field_148; // Unknown. NOT cCollectableItemsPtr.
/* 14Ch */ uint32_t field_14C; // vertebra? only present in creature-like editor
/* 150h */ cEditorSkinPtr mpEditorSkin; // something related with painting? uses sub_4C3E70 to return something that parts also use
/* 154h */ cEditorSkinPtr field_154;
Expand Down
Loading