diff --git a/Spore ModAPI/Spore/Editors/Editor.h b/Spore ModAPI/Spore/Editors/Editor.h index 136696c2..99e4af96 100644 --- a/Spore ModAPI/Spore/Editors/Editor.h +++ b/Spore ModAPI/Spore/Editors/Editor.h @@ -32,6 +32,7 @@ #include #include #include +#include #include #include #include @@ -39,6 +40,7 @@ #include #include #include +#include #include #include diff --git a/Spore ModAPI/Spore/Simulator.h b/Spore ModAPI/Spore/Simulator.h index f13251a2..44a08e71 100644 --- a/Spore ModAPI/Spore/Simulator.h +++ b/Spore ModAPI/Spore/Simulator.h @@ -60,6 +60,7 @@ #include #include #include +#include #include #include #include diff --git a/Spore ModAPI/Spore/Simulator/SimulatorEnums.h b/Spore ModAPI/Spore/Simulator/SimulatorEnums.h index 62c68991..952c1b45 100644 --- a/Spore ModAPI/Spore/Simulator/SimulatorEnums.h +++ b/Spore ModAPI/Spore/Simulator/SimulatorEnums.h @@ -354,7 +354,7 @@ namespace Simulator enum SpaceToolTarget { /* shr 0 */ kTargetAnimal = 1, - /* shr 1 */ kTargetA13ABC9F = 2, + /* shr 1 */ kTargetCitizen = 2, /* shr 2 */ kTargetUFO = 4, /* shr 3 */ kTargetVehicle = 8, /* shr 4 */ kTargetTurret = 0x10, @@ -362,8 +362,8 @@ namespace Simulator /* shr 6 */ kTargetBuilding = 0x40, /* shr 7 */ kTargetWorld = 0x80, /* shr 8 */ kTargetAir = 0x100, - /* shr 9 */ kTargetA6663355 = 0x200, - /* shr 10 */ //4BF0FA5A = 0x400 + /* shr 9 */ kTargetEnemyOnly = 0x200, + /* shr 10 */ kTargetColonyObject = 0x400 }; /// Different types of actions that a tribe can carry, used by Simulator::cTribePlanner. diff --git a/Spore ModAPI/Spore/Simulator/SubSystem/GamePlantManager.h b/Spore ModAPI/Spore/Simulator/SubSystem/GamePlantManager.h index 0c3791f4..5bffc12c 100644 --- a/Spore ModAPI/Spore/Simulator/SubSystem/GamePlantManager.h +++ b/Spore ModAPI/Spore/Simulator/SubSystem/GamePlantManager.h @@ -16,91 +16,38 @@ namespace Simulator public: static cGamePlantManager* Get(); + struct PlantSlot + { + /* 00h */ ResourceKey plantKey; + /* 0Ch */ uint32_t mModelIDLOD0; + /* 10h */ uint32_t mModelIDLOD1; + /* 14h */ uint32_t mModelIDLOD2; + /* 18h */ uint32_t mModelIDLOD3; + }; + public: - /* 20h */ int field_20; + /* 20h */ int field_20;// bool? /* 24h */ float field_24; /* 28h */ int field_28; /* 2Ch */ int field_2C; /* 30h */ int mInitializationType; - /* 34h */ int field_34; - /* 38h */ int field_38; + /* 34h */ bool IsPlanetExisted; + /* 38h */ int field_38;//Property? Ptr of smh /* 3Ch */ ObjectPtr field_3C; /* 40h */ ObjectPtr field_40; - /* 44h */ int field_44; - /* 48h */ int field_48; - /* 4Ch */ int field_4C; - /* 50h */ int field_50; - /* 54h */ int field_54; - /* 58h */ int field_58; - /* 5Ch */ int field_5C; - /* 60h */ int field_60; - /* 64h */ int field_64; - /* 68h */ int field_68; - /* 6Ch */ int field_6C; - /* 70h */ int field_70; - /* 74h */ int field_74; - /* 78h */ int field_78; - /* 7Ch */ int field_7C; - /* 80h */ int field_80; - /* 84h */ int field_84; - /* 88h */ int field_88; - /* 8Ch */ int field_8C; - /* 90h */ int field_90; - /* 94h */ int field_94; - /* 98h */ int field_98; - /* 9Ch */ int field_9C; - /* A0h */ int field_A0; - /* A4h */ int field_A4; - /* A8h */ int field_A8; - /* ACh */ int field_AC; - /* B0h */ int field_B0; - /* B4h */ int field_B4; - /* B8h */ int field_B8; - /* BCh */ int field_BC; - /* C0h */ int field_C0; - /* C4h */ int field_C4; - /* C8h */ int field_C8; - /* CCh */ int field_CC; - /* D0h */ int field_D0; - /* D4h */ int field_D4; - /* D8h */ int field_D8; - /* DCh */ int field_DC; - /* E0h */ int field_E0; - /* E4h */ int field_E4; - /* E8h */ int field_E8; - /* ECh */ int field_EC; - /* F0h */ int field_F0; - /* F4h */ int field_F4; - /* F8h */ int field_F8; - /* FCh */ int field_FC; - /* 100h */ int field_100; - /* 104h */ int field_104; - /* 108h */ int field_108; - /* 10Ch */ int field_10C; - /* 110h */ int field_110; - /* 114h */ int field_114; - /* 118h */ int field_118; - /* 11Ch */ int field_11C; - /* 120h */ int field_120; - /* 124h */ int field_124; - /* 128h */ int field_128; - /* 12Ch */ int field_12C; - /* 130h */ int field_130; - /* 134h */ int field_134; - /* 138h */ int field_138; - /* 13Ch */ int field_13C; + /* 44h */ PlantSlot Plants[9]; /* 140h */ int field_140; /* 144h */ int field_144; /* 148h */ int field_148; /* 14Ch */ int field_14C; /* 150h */ int field_150; /* 154h */ int field_154; - /* 158h */ int field_158; + /* 158h */ uint32_t GameModeID; /* 15Ch */ eastl::vector field_15C; /* 170h */ int field_170; /* 174h */ int field_174; /* 178h */ int field_178; - /* 17Ch */ int field_17C; + /* 17Ch */ int field_17C; //Simulator::cPlanetRecord* ? or cPlanetRecordPtr /* 180h */ int field_180; /* 184h */ int field_184; /* 188h */ int field_188; @@ -113,7 +60,7 @@ namespace Simulator /* 1BCh */ int field_1BC; /* 1C0h */ int field_1C0; /* 1C4h */ int field_1C4; - /* 1C8h */ int field_1C8; + /* 1C8h */ int field_1C8; //? /* 1CCh */ int field_1CC; /* 1D0h */ int field_1D0; /* 1D4h */ int field_1D4; diff --git a/Spore ModAPI/Spore/Simulator/SubSystem/TerraformingManager.h b/Spore ModAPI/Spore/Simulator/SubSystem/TerraformingManager.h index 236d2346..c4611c9f 100644 --- a/Spore ModAPI/Spore/Simulator/SubSystem/TerraformingManager.h +++ b/Spore ModAPI/Spore/Simulator/SubSystem/TerraformingManager.h @@ -43,17 +43,13 @@ namespace Simulator public: /* 1Ch */ eastl::hash_map field_1C; /* 3Ch */ bool field_3C; // true - /* 40h */ int field_40; // -1 + /* 40h */ uint32_t mGameModeID; // -1 /* 44h */ bool field_44; /* 48h */ eastl::map field_48; /* 64h */ int field_64; /* 68h */ eastl::vector mCommodityNodes; - /* 7Ch */ int field_7C; - /* 80h */ int field_80; - /* 84h */ int field_84; - /* 88h */ int field_88; - /* 8Ch */ int field_8C; - /* 90h */ int field_90; + /* 7Ch */ ResourceKey SelectedTerraformingSlot; + /* 88h */ ResourceKey field_88; public: static cTerraformingManager* Get(); diff --git a/Spore ModAPI/Spore/Simulator/cCreatureAbility.h b/Spore ModAPI/Spore/Simulator/cCreatureAbility.h index a3ea5228..627dd07c 100644 --- a/Spore ModAPI/Spore/Simulator/cCreatureAbility.h +++ b/Spore ModAPI/Spore/Simulator/cCreatureAbility.h @@ -36,6 +36,79 @@ namespace Simulator static bool Parse(cCreatureAbility* pAbility, App::PropertyList* pPropList); + enum AbilityTypes + { + kTribeHorn = 5, + kTribeMaraca = 6, + kTribeDidgeridoo = 7, + kAutoAttack = 8, + kStealth = 13, + kSpeed = 14, + kBlock = 15, + kMatingCall = 16, + kJump = 17, + kGlide = 18, + kGrasper = 19, + kRation = 27, + kScan = 29, + kBite = 30, + kCharge = 31, + kSpit = 32, + kStrike = 33, + kDance = 34, + kPose = 35, + kCharm = 36, + kSing = 37, + kSprint = 39, + kSight = 40, + kStomp = 41, + kTribeAttackUnk = 42, + kTribeSpear = 43, + kTribeAttack = 44, + kTribeSocial = 45, + kTribeArmor = 46, + kTribeGathering = 47, + kTribeFishing = 48, + kCRG_SuperPower_Carnivore = 49, + kCRG_SuperPower_Herbivore = 50, + kCRG_SuperPower_Omnivore = 51, + kTRG_SuperPower_Carnivore = 52, + kTRG_SuperPower_Herbivore = 53, + kTRG_SuperPower_Omnivore = 54, + kTRG_SuperPower_Aggressive = 55, + kTRG_SuperPower_Social = 56, + kTRG_SuperPower_Versatile = 57, + kTribeTorch = 58, + kTribeAxe = 59, + kEnergyRegen = 60, + kMissile = 61, + kEnergyBlade = 62, + kShieldGenerator = 63, + kHoloCharm = 64, + kLightningSword = 65, + kPulseGun = 66, + kBattleArmor = 67, + kPoweredArmor = 68, + kEnergyAbsorption = 69, + kHealthRegen = 70, + kSummonSwarm = 72, + kMindMeld = 73, + kPoisonBlade = 74, + kFreeze = 75, + kGracefulWaltz = 76, + kHarmoniousSong = 77, + kRoyalCharm = 78, + kRadiantPose = 79, + kSprintBurst = 80, + kHover = 81, + kStealthField = 82, + kJumpJet = 83, + kInspiringSong = 84, + kStunningDance = 85, + kConfettiPose = 86, + kEnergyStorage = 87, + }; + //PLACEHOLDER loc_D1E9D0 uses ability type? /// Returns the animation ID at the given index, or 0x4330667 if there are no animation IDs in this ability or diff --git a/Spore ModAPI/Spore/Simulator/cObstacle.h b/Spore ModAPI/Spore/Simulator/cObstacle.h index dbfe7305..16961d29 100644 --- a/Spore ModAPI/Spore/Simulator/cObstacle.h +++ b/Spore ModAPI/Spore/Simulator/cObstacle.h @@ -14,10 +14,21 @@ namespace Simulator static const uint32_t TYPE = 0x3ED590D; static const uint32_t NOUN_ID = 0x3ED8573; + using Object::AddRef; + using Object::Release; + using Object::Cast; + + enum PlantType + { + kLargeSpecies = 0, + kMediumSpecies = 1, + kSmallSpecies = 2, + }; + public: /* 34h */ int field_34; - /* 38h */ Math::Vector3 field_38; - /* 44h */ float field_44; + /* 38h */ Math::Vector3 mPosition; + /* 44h */ float mObstacleBaseCollisionRadius; /* 48h */ float mObstacleCanopyCollisionRadius; /* 4Ch */ float mObstacleCollisionHeight; /* 50h */ int field_50; // -1 @@ -31,8 +42,8 @@ namespace Simulator /* 70h */ ModelPtr mModel; /* 74h */ int field_74; /* 78h */ int field_78; - /* 7Ch */ ResourceKey field_7C; - /* 88h */ int field_88; + /* 7Ch */ ResourceKey mSpeciesKey; + /* 88h */ PlantType mPlantType; }; ASSERT_SIZE(cObstacle, 0x8C); } \ No newline at end of file diff --git a/Spore ModAPI/Spore/Simulator/cPlantCargoInfo.h b/Spore ModAPI/Spore/Simulator/cPlantCargoInfo.h index ba3310c1..05cf5f21 100644 --- a/Spore ModAPI/Spore/Simulator/cPlantCargoInfo.h +++ b/Spore ModAPI/Spore/Simulator/cPlantCargoInfo.h @@ -20,11 +20,11 @@ namespace Simulator /* 84h */ uint32_t mModelIDLOD2; /* 88h */ uint32_t mModelIDLOD3; /* 8Ch */ uint32_t mAlphaModel; - /* 90h */ float field_90; // 2.0 + /* 90h */ float mFloraImposterScale; /* 94h */ float mBaseRadius; /* 98h */ float mCanopyRadius; /* 9Ch */ float mHeight; - /* A0h */ int field_A0; //species profile? //TODO what is this type? + /* A0h */ cSpeciesProfile* mSpeciesProfile; //species profile? //TODO what is this type? }; ASSERT_SIZE(cPlantCargoInfo, 0xA4); } \ No newline at end of file diff --git a/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h b/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h index 0d61fbfb..6af589fb 100644 --- a/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h +++ b/Spore ModAPI/Spore/Simulator/cSpeciesProfile.h @@ -50,111 +50,120 @@ namespace Simulator ASSERT_SIZE(UnkStructPool, 0x4E0); /* 00h */ UnkStructPool field_0; - /* 4E0h */ ResourceKey field_4E0[3]; - /* 504h */ ResourceKey mSpeciesKey; //TODO this is the main key? - /* 510h */ ResourceKey field_510; + /* 4E0h */ ResourceKey field_4E0[3]; //what is this? + /* 504h */ ResourceKey mSpeciesKey; + /* 510h */ ResourceKey mBabyKey; /* 51Ch */ eastl::string16 mName; /* 52Ch */ eastl::string16 field_52C; - /* 53Ch */ ResourceKey mProfileSeq; - /* 548h */ float field_548; - /* 54Ch */ float field_54C; - /* 550h */ float field_550; - /* 554h */ char padding_554[0x56C - 0x554]; - /* 56Ch */ float field_56C; // 100.0 + /* 53Ch */ int field_53C; + /* 540h */ int mCost; + /* 544h */ int field_544; + /* 548h */ float mCreatureAbilityJumping; + /* 54Ch */ float mCreatureAbilityGliding; + /* 550h */ float mCreatureAbilityFlapping; + /* 554h */ Math::Vector3 mBoundingBoxUpper; + /* 560h */ Math::Vector3 mBoundingBoxLower; + /* 56Ch */ float mAdditionalHealth; // 100.0 /* 570h */ float field_570; // 200.0 - /* 574h */ float field_574; - /* 578h */ bool field_578; - /* 57Ch */ int field_57C; + /* 574h */ float field_574; //CreatureSize? + /* 578h */ bool mHasPlantRoot; + /* 57Ch */ ModelTypes mModelType; /* 580h */ int field_580; // not initialized /* 584h */ int field_584; // not initialized /* 588h */ int field_588; // 1 - /* 58Ch */ float field_58C; - /* 590h */ float field_590; - /* 594h */ float field_594; - /* 598h */ float field_598; - /* 59Ch */ float field_59C; - /* 5A0h */ float field_5A0; - /* 5A4h */ float field_5A4; + /* 58Ch */ float mNumFoot; + /* 590h */ float mNumGrasper; + /* 594h */ float mNumMouth; + /* 598h */ float mNumEar; + /* 59Ch */ float mNumEye; + /* 5A0h */ float mCuteness1; + /* 5A4h */ float mCuteness2; /* 5A8h */ float field_5A8; - /* 5ACh */ float field_5AC; - /* 5B0h */ float field_5B0; - /* 5B4h */ float field_5B4; - /* 5B8h */ float field_5B8; - /* 5BCh */ float field_5BC; - /* 5C0h */ float field_5C0; - /* 5C4h */ float field_5C4; - /* 5C8h */ int field_5C8; // 5000 - /* 5CCh */ float field_5CC; // 1.0 - /* 5D0h */ int field_5D0; // 2 - /* 5D4h */ int field_5D4; - /* 5D8h */ int field_5D8; - /* 5DCh */ int field_5DC; - /* 5E0h */ int field_5E0; - /* 5E4h */ int field_5E4; - /* 5E8h */ int field_5E8; - /* 5ECh */ int field_5EC; - /* 5F0h */ int field_5F0; - /* 5F4h */ int field_5F4; + /* 5ACh */ float mSocialSum; + /* 5B0h */ float mAttackSum; + /* 5B4h */ float mAttackMaxLevel; + /* 5B8h */ float mSocialMaxLevel; + /* 5BCh */ float mMeanness; + /* 5C0h */ float field_5C0; //itemUnlockLevel? + /* 5C4h */ float field_5C4; //itemUnlockLevel? + /* 5C8h */ int mDuration; // 5000 + /* 5CCh */ float mRefillAbilityBars; // 1.0 cCreatureAbility->mDuration / cCreatureAbility->mRecharge + /* 5D0h */ int mSprintBuff; // 2 + /* 5D4h */ int mBiteLevel; + /* 5D8h */ int mChargeLevel; + /* 5DCh */ int mSpitLevel; + /* 5E0h */ int mStrikeLevel; + /* 5E4h */ int mSingLevel; + /* 5E8h */ int mDanceLevel; + /* 5ECh */ int mCharmLevel; + /* 5F0h */ int mPoseLevel; + /* 5F4h */ int mStealthLevel; /* 5F8h */ int field_5F8; - /* 5FCh */ int field_5FC; - /* 600h */ int field_600; - /* 604h */ int field_604; - /* 608h */ int field_608; - /* 60Ch */ int field_60C; - /* 610h */ int field_610; - /* 614h */ int field_614; - /* 618h */ int field_618; // not initialized - /* 61Ch */ int field_61C; // flight level? - /* 620h */ char padding_620[0x640 - 0x620]; + /* 5FCh */ int mMatingCall; + /* 600h */ int mCreatureSpeedLevel; + /* 604h */ int mHealthLevel; + /* 608h */ int mMouthCarnivorous; + /* 60Ch */ int mMouthHerbivorous; + /* 610h */ int mJumpLevel; + /* 614h */ int mSprintLevel; + /* 618h */ int mSight; //Sense + /* 61Ch */ int mGlideLevel; + /* 620h */ int field_620; + /* 624h */ int field_624; + /* 628h */ int mTribeAttackLevel; + /* 62Ch */ int mTribeSocialLevel; + /* 630h */ int mTribeArmorLevel; + /* 634h */ int mTribeGatherLevel; + /* 638h */ int mTribeFishingLevel; + /* 63Ch */ float mDamage; /* 640h */ float mEnergyRecoveryRate; /* 644h */ float mMaxEnergy; - /* 648h */ int field_648; - /* 64Ch */ int field_64C; - /* 650h */ int field_650; - /* 654h */ int field_654; - /* 658h */ int field_658; - /* 65Ch */ int field_65C; - /* 660h */ int field_660; - /* 664h */ int field_664; - /* 668h */ int field_668; + /* 648h */ int mShieldGenerator; + /* 64Ch */ int mMissileLevel; + /* 650h */ int mEnergyBladeLevel; + /* 654h */ int mHoloCharmLevel; + /* 658h */ int mLightningSwordLevel; + /* 65Ch */ int mPulseGunLevel; + /* 660h */ int mBattleArmor; + /* 664h */ int mPoweredArmor; + /* 668h */ int mAbsorptionShield; /* 66Ch */ float mHealthRecoveryRate; - /* 670h */ int field_670; - /* 674h */ int field_674; - /* 678h */ int field_678; - /* 67Ch */ int field_67C; - /* 680h */ int field_680; - /* 684h */ int field_684; - /* 688h */ int field_688; - /* 68Ch */ int field_68C; - /* 690h */ int field_690; - /* 694h */ int field_694; - /* 698h */ int field_698; - /* 69Ch */ int field_69C; - /* 6A0h */ int field_6A0; - /* 6A4h */ int field_6A4; - /* 6A8h */ int field_6A8; - /* 6ACh */ int field_6AC; - /* 6B0h */ float field_6B0; + /* 670h */ int mBonusHealth; + /* 674h */ int mSummonSwarm; + /* 678h */ int mMindMeld; + /* 67Ch */ int mPoisonBlade; + /* 680h */ int mFreeze; + /* 684h */ int mGracefulWaltz; + /* 688h */ int mHarmoniousSong; + /* 68Ch */ int mRoyalCharm; + /* 690h */ int mRadiantPose; + /* 694h */ int mSprintBurst; + /* 698h */ int mHover; + /* 69Ch */ int mStealthField; + /* 6A0h */ int mJumpJet; + /* 6A4h */ int mInspiringSongLevel; + /* 6A8h */ int mStunningDanceLevel; + /* 6ACh */ int mConfettiPoseLevel; + /* 6B0h */ float mAdventurerEnergyCost; /* 6B4h */ int field_6B4; - /* 6B8h */ eastl::vector field_6B8; - /* 6CCh */ bool field_6CC; - /* 6D0h */ int field_6D0; - /* 6D4h */ eastl::fixed_vector mAbilities; //TODO abilities - /* 73Ch */ eastl::fixed_vector field_73C; // maybe food-related abilities? - /* 7A4h */ eastl::fixed_vector field_7A4; + /* 6B8h */ eastl::vector mFruits; //unk type + /* 6CCh */ bool mIsGameMode; //true if cSpeciesProfile was called in gameMode, false otherwise + /* 6D0h */ uint32_t mFootWeaponOrMouthType; + /* 6D4h */ eastl::fixed_vector mActiveAbilities; //TODO abilities + /* 73Ch */ eastl::fixed_vector mPassiveAbilities; + /* 7A4h */ eastl::fixed_vector mSocialAbilityIndexes; /* 80Ch */ bool field_80C; /* 80Dh */ bool field_80D; - /* 810h */ eastl::fixed_vector field_810; - /* 878h */ eastl::fixed_vector field_878; - /* 8E0h */ eastl::fixed_vector field_8E0; - /* 948h */ eastl::fixed_vector field_948; - /* 9B0h */ eastl::fixed_vector field_9B0; + /* 810h */ eastl::fixed_vector mFruitIndexes; + /* 878h */ eastl::fixed_vector mMouthIndexes; + /* 8E0h */ eastl::fixed_vector mGraspersIndexes; + /* 948h */ eastl::fixed_vector mMouthsIndexes2; + /* 9B0h */ eastl::fixed_vector mGraspersIndexes2; }; ASSERT_SIZE(cSpeciesProfile, 0xA18); namespace Addresses(cSpeciesProfile) { DeclareAddress(GetSpeciesName); // 0x4DA1C0 0x4DA390 - DeclareAddress(GetSpeciesName); // 0x4DA1C0 0x4DA390 } } \ No newline at end of file