Skip to content

Commit a5df8af

Browse files
authored
Merge branch 'master' into update4
2 parents 356dab2 + 261a09e commit a5df8af

58 files changed

Lines changed: 595 additions & 188 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ jobs:
133133
cd Spore-ModAPI
134134
python3 ../m.css/documentation/doxygen.py "Documentation/Doxygen-mcss.txt" --debug
135135
136+
- name: Configure URL
137+
run: echo "modapi-docs.sporecommunity.com" > Spore-ModAPI/modapi-generated-docs/html/CNAME
138+
136139
- name: Commit documentation pages
137140
run: |
138141
cd Spore-ModAPI

EASTL-3.02.01/include/EASTL/vector.h

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -333,6 +333,8 @@ namespace eastl
333333

334334
bool validate() const EA_NOEXCEPT;
335335
int validate_iterator(const_iterator i) const EA_NOEXCEPT;
336+
int find(const value_type& value) const EA_NOEXCEPT;
337+
int find(const value_type& value, const bool reverse) const EA_NOEXCEPT;
336338

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

1361+
template <typename T, typename Allocator>
1362+
inline int vector<T, Allocator>::find(const value_type& value) const EA_NOEXCEPT
1363+
{
1364+
const value_type* p = data();
1365+
const value_type* e = p + size();
1366+
for (; p != e; ++p)
1367+
if (*p == value)
1368+
return int(p - data());
1369+
return -1;
1370+
}
1371+
1372+
template <typename T, typename Allocator>
1373+
inline int vector<T, Allocator>::find(const value_type& value, const bool reverse) const EA_NOEXCEPT
1374+
{
1375+
const value_type* p = data();
1376+
const value_type* e = p + size();
1377+
if (!reverse) {
1378+
for (; p != e; ++p)
1379+
if (*p == value)
1380+
return int(p - data());
1381+
}
1382+
else {
1383+
while (p != b)
1384+
if (*--p == value)
1385+
return int(p - b);
1386+
}
1387+
return -1;
1388+
}
13591389

13601390
#if EASTL_RESET_ENABLED
13611391
// This function name is deprecated; use reset_lose_memory instead.

Spore ModAPI/SourceCode/DLL/AddressesAnim.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ namespace Anim
1313
{
1414
DefineAddress(Get, SelectAddress(0x67CC70, 0x67CAE0));
1515
}
16+
17+
namespace Addresses(IAnimWorld)
18+
{
19+
DefineAddress(LoadCreature, SelectAddress(0xA0B1C0, 0xA0B1C0));
20+
}
1621
}
1722

1823
#endif

Spore ModAPI/SourceCode/DLL/AddressesEditors.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -298,14 +298,5 @@ namespace Editors
298298
DefineAddress(GetOverdrawColor, SelectAddress(0x47b640, 0x47efa0));
299299
DefineAddress(GetDefaultScale, SelectAddress(0x47b760, 0x47f0c0));
300300
}
301-
namespace Addresses(cSPEditorHandleBallConnector)
302-
{
303-
DefineAddress(Cast, SelectAddress(0x47c0f0, 0x47fa50));
304-
DefineAddress(GetTypeID, SelectAddress(0x47c080, 0x47f9e0));
305-
DefineAddress(PlaceHandle, SelectAddress(0x47c140, 0x47faa0));
306-
DefineAddress(InitBallConnector, SelectAddress(0x47c2c0, 0x47fc20));
307-
DefineAddress(GetHandlePosition, SelectAddress(0x47c500, 0x47fe60));
308-
DefineAddress(GetTuningFile, SelectAddress(0x47c580, 0x47fee0));
309-
}
310301
}
311302
#endif

Spore ModAPI/SourceCode/DLL/AddressesSimulator.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -846,7 +846,7 @@ namespace Simulator
846846
namespace Addresses(cScenarioPowerup)
847847
{
848848
DefineAddress(ReactToPowerup, SelectAddress(0xF23FD0, 0xF23BF0));
849-
//TODO DefineAddress(ApplyBoost, SelectAddress(0xF20670, 0xF20290));
849+
DefineAddress(ApplyBoost, SelectAddress(0xF20670, 0xF20290));
850850
DefineAddress(ActivateMedKit, SelectAddress(0xF229C0, 0xF225E0));
851851
DefineAddress(ActivateEnergyKit, SelectAddress(0xF22BE0, 0xF22800));
852852
DefineAddress(ActivateSpeedBoost, SelectAddress(0xF232B0, 0xF22ED0));
@@ -1190,6 +1190,7 @@ namespace Simulator
11901190
namespace Addresses(cBundleManager) {
11911191
DefineAddress(Get, SelectAddress(0xB3D210, 0xB3D3B0));
11921192
DefineAddress(CreateBundles, SelectAddress(0xAC7810, 0xAC79F0));
1193+
DefineAddress(RemoveBundles, SelectAddress(0xAC7A70, 0x00ac7c50));
11931194
}
11941195

11951196
namespace Addresses(cTribeInputStrategy) {

Spore ModAPI/SourceCode/Editors/EditorRequest.cpp

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -6,39 +6,39 @@ namespace Editors
66
{
77
EditorRequest::EditorRequest()
88
: mRefCount()
9-
, editorID(-1)
10-
, creationKey()
11-
, activeModeID(GameModeManager.GetActiveModeID())
12-
, field_20()
13-
, editableTests()
14-
, sporepediaCanSwitch()
15-
, disableNameEdit()
16-
, allowSporepedia()
17-
, hasSaveButton()
18-
, hasCreateNewButton()
19-
, hasExitButton(true)
20-
, hasPublishButton()
21-
, hasCancelButton(true)
9+
, mEditorName(-1)
10+
, mModelKey()
11+
, mCallingGameModeID(GameModeManager.GetActiveModeID())
12+
, mbIsFirstTimeInEditor()
13+
, mEditableTests()
14+
, mbSporepediaCanSwitch()
15+
, mbDisableNameEdit()
16+
, mbAllowSporepedia()
17+
, mShowSaveButton()
18+
, mShowNewButton()
19+
, mShowExitButton(true)
20+
, mShowPublishButton()
21+
, mShowCancelButton(true)
2222
, field_3C()
2323
, field_3D(true)
2424
, field_40()
2525
, field_50()
2626
, field_60()
2727
, field_64()
28-
, field_65()
28+
, mShowPlayButton()
2929
, field_66()
3030
, field_68()
3131
, field_6C()
3232
, field_6D(true)
3333
, field_6E(true)
3434
, field_6F()
35-
, field_70()
35+
, mConsequenceTraits()
3636
, field_84()
3737
, field_88()
3838
, field_8C()
3939
, field_90()
40-
, field_94(nullptr)
41-
, next(nullptr)
40+
, mpCollectableItems(nullptr)
41+
, mpNext(nullptr)
4242
{
4343
}
4444

Spore ModAPI/SourceCode/Simulator/SimulatorMisc.cpp

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,23 @@ namespace Simulator
247247
Args(float amount, cGameBundleContainer* container, int bundleType),
248248
Args(amount, container, bundleType));
249249

250+
251+
auto_METHOD(cBundleManager, float, RemoveBundles,
252+
Args(float amount, cGameBundleContainer* container, cGameBundle* bundle),
253+
Args(amount, container, bundle));
254+
255+
256+
cGameBundle* cBundleManager::CreateGroundBundles(float amount, int bundleType, const Vector3& position, const Quaternion& orientation) {
257+
cGameBundle* bundles = CreateBundles(amount, mpGroundContainer.get(), bundleType);
258+
if (bundles) bundles->Teleport(position, orientation);
259+
return bundles;
260+
}
261+
262+
263+
float cBundleManager::RemoveGroundBundles(float amount, cGameBundle* bundle) {
264+
return RemoveBundles(amount, mpGroundContainer.get(), bundle);
265+
}
266+
250267
/// GamePlantManager ///
251268

252269
auto_STATIC_METHOD_(cGamePlantManager, cGamePlantManager*, Get);

Spore ModAPI/SourceCode/Simulator/cSpatialObject.cpp

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,5 +50,13 @@ namespace Simulator
5050
// Apply the yaw rotation while maintaining the original pitch and roll
5151
return (yawRotation * GetOrientation());
5252
}
53+
54+
void cSpatialObject::Teleport(const Math::Vector3& position) {
55+
this->Teleport(position, mOrientation);
56+
}
57+
void cSpatialObject::Teleport(const cSpatialObjectPtr& refobj) {
58+
this->Teleport(refobj->GetPosition(), refobj->GetOrientation());
59+
}
60+
5361
}
5462
#endif

Spore ModAPI/SourceCode/Terrain/Terrain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,7 @@ namespace Terrain
175175
, field_61C()
176176
, field_620()
177177
, field_624()
178-
, field_7BC()
178+
, mbEnableAmbientEffects()
179179
{
180180
memset(field_628, 0, sizeof(field_628));
181181
memset(field_7C0, 0, sizeof(field_7C0));

Spore ModAPI/Spore/Anim/IAnimWorld.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,9 @@ namespace Anim
5050
/* 54h */ virtual bool func54h() = 0;
5151
/* 58h */ virtual bool func58h() = 0;
5252
};
53+
54+
namespace Addresses(IAnimWorld)
55+
{
56+
DeclareAddress(LoadCreature);
57+
}
5358
}

0 commit comments

Comments
 (0)