mirror of https://github.com/PrimeDecomp/prime.git
parent
70ea57613e
commit
9d3a5c7670
2
Makefile
2
Makefile
|
@ -58,7 +58,7 @@ DEPENDS += $(MAKECMDGOALS:.o=.d)
|
|||
# Tools
|
||||
#-------------------------------------------------------------------------------
|
||||
|
||||
MWCC_VERSION := 2.7
|
||||
MWCC_VERSION := 1.3.2
|
||||
MWLD_VERSION := 2.6
|
||||
|
||||
# Programs
|
||||
|
|
|
@ -9,72 +9,70 @@ class CCallStack;
|
|||
|
||||
class IAllocator {
|
||||
public:
|
||||
enum EHint {
|
||||
kHI_Unk = (1 << 0),
|
||||
kHI_RoundUpLen = (1 << 1),
|
||||
};
|
||||
enum EScope {
|
||||
kSC_Unk0,
|
||||
};
|
||||
enum EType {
|
||||
kTP_Unk0
|
||||
};
|
||||
enum EHint {
|
||||
kHI_Unk = (1 << 0),
|
||||
kHI_RoundUpLen = (1 << 1),
|
||||
};
|
||||
enum EScope {
|
||||
kSC_Unk0,
|
||||
};
|
||||
enum EType { kTP_Unk0 };
|
||||
|
||||
struct SMetrics {
|
||||
u32 x0_heapSize;
|
||||
u32 x4_;
|
||||
u32 x8_;
|
||||
u32 xc_;
|
||||
u32 x10_;
|
||||
u32 x14_heapSize2; // Remaining heap size?
|
||||
u32 x18_;
|
||||
u32 x1c_;
|
||||
u32 x20_;
|
||||
u32 x24_;
|
||||
u32 x28_;
|
||||
u32 x2c_smallNumAllocs;
|
||||
u32 x30_smallAllocatedSize;
|
||||
u32 x34_smallRemainingSize;
|
||||
u32 x38_mediumNumAllocs;
|
||||
u32 x3c_mediumAllocatedSize;
|
||||
u32 x40_mediumBlocksAvailable;
|
||||
u32 x44_;
|
||||
u32 x48_;
|
||||
u32 x4c_;
|
||||
u32 x50_mediumTotalAllocated;
|
||||
u32 x54_fakeStatics;
|
||||
SMetrics(u32 heapSize, u32 unk1, u32 unk2, u32 unk3, u32 unk4, u32 heapSize2, u32 unk5, u32 unk6, u32 unk7,
|
||||
u32 unk8, u32 unk9, u32 smallAllocNumAllocs, u32 smallAllocAllocatedSize, u32 smallAllocRemainingSize,
|
||||
u32 mediumAllocNumAllocs, u32 mediumAllocAllocatedSize, u32 mediumAllocBlocksAvailable, u32 unk10, u32 unk11, u32 unk12,
|
||||
u32 mediumAllocTotalAllocated, u32 fakeStatics);
|
||||
};
|
||||
struct SMetrics {
|
||||
u32 x0_heapSize;
|
||||
u32 x4_;
|
||||
u32 x8_;
|
||||
u32 xc_;
|
||||
u32 x10_;
|
||||
u32 x14_heapSize2; // Remaining heap size?
|
||||
u32 x18_;
|
||||
u32 x1c_;
|
||||
u32 x20_;
|
||||
u32 x24_;
|
||||
u32 x28_;
|
||||
u32 x2c_smallNumAllocs;
|
||||
u32 x30_smallAllocatedSize;
|
||||
u32 x34_smallRemainingSize;
|
||||
u32 x38_mediumNumAllocs;
|
||||
u32 x3c_mediumAllocatedSize;
|
||||
u32 x40_mediumBlocksAvailable;
|
||||
u32 x44_;
|
||||
u32 x48_;
|
||||
u32 x4c_;
|
||||
u32 x50_mediumTotalAllocated;
|
||||
u32 x54_fakeStatics;
|
||||
SMetrics(u32 heapSize, u32 unk1, u32 unk2, u32 unk3, u32 unk4, u32 heapSize2, u32 unk5, u32 unk6, u32 unk7, u32 unk8, u32 unk9,
|
||||
u32 smallAllocNumAllocs, u32 smallAllocAllocatedSize, u32 smallAllocRemainingSize, u32 mediumAllocNumAllocs,
|
||||
u32 mediumAllocAllocatedSize, u32 mediumAllocBlocksAvailable, u32 unk10, u32 unk11, u32 unk12, u32 mediumAllocTotalAllocated,
|
||||
u32 fakeStatics);
|
||||
};
|
||||
|
||||
struct SAllocInfo {
|
||||
void* x0_infoPtr;
|
||||
u32 x4_len;
|
||||
bool x8_hasPrevious;
|
||||
bool x9_;
|
||||
const char* xc_fileAndLne;
|
||||
const char* x10_type;
|
||||
};
|
||||
struct SAllocInfo {
|
||||
void* x0_infoPtr;
|
||||
u32 x4_len;
|
||||
bool x8_hasPrevious;
|
||||
bool x9_;
|
||||
const char* xc_fileAndLne;
|
||||
const char* x10_type;
|
||||
};
|
||||
|
||||
typedef const bool (*FOutOfMemoryCb)(void*, u32);
|
||||
typedef const bool (*FEnumAllocationsCb)(const SAllocInfo& info, const void* ptr);
|
||||
virtual ~IAllocator();
|
||||
typedef const bool (*FOutOfMemoryCb)(void*, u32);
|
||||
typedef const bool (*FEnumAllocationsCb)(const SAllocInfo& info, const void* ptr);
|
||||
virtual ~IAllocator();
|
||||
|
||||
virtual bool Initialize(COsContext& ctx) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
virtual void* Alloc(unsigned long size, EHint hint, EScope scope, EType type, const CCallStack& cs) = 0;
|
||||
virtual void Free(const void* ptr) = 0;
|
||||
virtual void ReleaseAll() = 0;
|
||||
virtual void* AllocSecondary(unsigned long size, EHint hint, EScope scope, EType type, const CCallStack& cs) = 0;
|
||||
virtual void FreeSecondary(const void* ptr) = 0;
|
||||
virtual void ReleaseAllSecondary() = 0;
|
||||
virtual void SetOutOfMemoryCallback(FOutOfMemoryCb cb, const void* data) = 0;
|
||||
virtual void EnumAllocations(FEnumAllocationsCb func, const void* ptr, bool b) const = 0;
|
||||
virtual SAllocInfo GetAllocInfo(const void* ptr) const = 0;
|
||||
virtual void OffsetFakeStatics(s32 offset) = 0;
|
||||
virtual SMetrics GetMetrics() const = 0;
|
||||
virtual bool Initialize(COsContext& ctx) = 0;
|
||||
virtual void Shutdown() = 0;
|
||||
virtual void* Alloc(unsigned long size, EHint hint, EScope scope, EType type, const CCallStack& cs) = 0;
|
||||
virtual void Free(const void* ptr) = 0;
|
||||
virtual void ReleaseAll() = 0;
|
||||
virtual void* AllocSecondary(unsigned long size, EHint hint, EScope scope, EType type, const CCallStack& cs) = 0;
|
||||
virtual void FreeSecondary(const void* ptr) = 0;
|
||||
virtual void ReleaseAllSecondary() = 0;
|
||||
virtual void SetOutOfMemoryCallback(FOutOfMemoryCb cb, const void* data) = 0;
|
||||
virtual void EnumAllocations(FEnumAllocationsCb func, const void* ptr, bool b) const = 0;
|
||||
virtual SAllocInfo GetAllocInfo(const void* ptr) const = 0;
|
||||
virtual void OffsetFakeStatics(s32 offset) = 0;
|
||||
virtual SMetrics GetMetrics() const = 0;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "CToken.hpp"
|
||||
#include "IObjectStore.hpp"
|
||||
#include "Streams/CInputStream.hpp"
|
||||
#include "Kyoto/CToken.hpp"
|
||||
#include "Kyoto/IObjectStore.hpp"
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
|
||||
class CFactoryMgr {
|
||||
public:
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
#include "rstl/auto_ptr.hpp"
|
||||
#include "rstl/string.hpp"
|
||||
|
||||
#include "CDvdFile.hpp"
|
||||
#include "CResLoader.hpp"
|
||||
#include "IObjectStore.hpp"
|
||||
#include "Kyoto/CDvdFile.hpp"
|
||||
#include "Kyoto/CResLoader.hpp"
|
||||
#include "Kyoto/IObjectStore.hpp"
|
||||
|
||||
class CPakFile : CDvdFile {
|
||||
public:
|
||||
|
|
|
@ -5,8 +5,8 @@
|
|||
|
||||
#include "rstl/list.hpp"
|
||||
|
||||
#include "CFactoryMgr.hpp"
|
||||
#include "CResLoader.hpp"
|
||||
#include "Kyoto/CFactoryMgr.hpp"
|
||||
#include "Kyoto/CResLoader.hpp"
|
||||
|
||||
class CResFactory {
|
||||
public:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "rstl/list.hpp"
|
||||
#include "rstl/string.hpp"
|
||||
|
||||
#include "IObjectStore.hpp"
|
||||
#include "Kyoto/IObjectStore.hpp"
|
||||
|
||||
class CPakFile;
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
|
||||
#include "rstl/map.hpp"
|
||||
|
||||
#include "IObjectStore.hpp"
|
||||
#include "Kyoto/IObjectStore.hpp"
|
||||
|
||||
class CSimplePool {
|
||||
public:
|
||||
|
|
|
@ -3,9 +3,9 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "rstl/auto_ptr.hpp"
|
||||
#include "Kyoto/IObjectStore.hpp"
|
||||
|
||||
#include "IObjectStore.hpp"
|
||||
#include "rstl/auto_ptr.hpp"
|
||||
|
||||
class CToken {
|
||||
public:
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
#include "Kyoto/Math/CColor.hpp"
|
||||
#include "Kyoto/Math/CVector3f.hpp"
|
||||
|
||||
#include "CTevCombiners.hpp"
|
||||
#include "Kyoto/Graphics/CTevCombiners.hpp"
|
||||
|
||||
enum ERglTevStage {
|
||||
kTS_Stage0,
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "CVector3f.hpp"
|
||||
#include "Kyoto/Math/CVector3f.hpp"
|
||||
|
||||
class CTransform4f {
|
||||
public:
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "CVector2f.hpp"
|
||||
#include "CVector3f.hpp"
|
||||
#include "Kyoto/Math/CVector2f.hpp"
|
||||
#include "Kyoto/Math/CVector3f.hpp"
|
||||
|
||||
static bool close_enough(const CVector2f& a, const CVector2f& b, f32 epsilon = 0.001f);
|
||||
static bool close_enough(const CVector3f& a, const CVector3f& b, f32 epsilon = 0.001f);
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef _CENTITY_HPP
|
||||
#define _CENTITY_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "MetroidPrime/CEntityInfo.hpp"
|
||||
#include "MetroidPrime/CStateManager.hpp"
|
||||
#include "MetroidPrime/TCastTo.hpp"
|
||||
#include "MetroidPrime/TGameTypes.hpp"
|
||||
|
||||
#include "rstl/string.hpp"
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
class CEntity {
|
||||
public:
|
||||
virtual ~CEntity();
|
||||
virtual void Accept(IVisitor& visitor) = 0;
|
||||
virtual void PreThink(float dt, CStateManager& mgr);
|
||||
virtual void Think(float dt, CStateManager& mgr);
|
||||
virtual void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr);
|
||||
virtual void SetActive(bool active);
|
||||
|
||||
CEntity(TUniqueId id, const CEntityInfo& info, bool active, const rstl::string& name);
|
||||
|
||||
static rstl::vector<SConnection> NullConnectionList;
|
||||
|
||||
protected:
|
||||
TAreaId x4_areaId;
|
||||
TUniqueId x8_uid;
|
||||
TEditorId xc_editorId;
|
||||
rstl::string x10_name;
|
||||
rstl::vector<SConnection> x20_conns;
|
||||
bool x30_24_active : 1;
|
||||
bool x30_25_inGraveyard : 1;
|
||||
bool x30_26_scriptingBlocked : 1;
|
||||
bool x30_27_inUse : 1;
|
||||
};
|
||||
|
||||
#endif
|
|
@ -0,0 +1,249 @@
|
|||
#ifndef _CENTITY_INFO_HPP
|
||||
#define _CENTITY_INFO_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
#include "MetroidPrime/TGameTypes.hpp"
|
||||
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
enum EScriptObjectType {
|
||||
kST_Actor = 0x00,
|
||||
kST_Waypoint = 0x02,
|
||||
kST_Door = 0x03,
|
||||
kST_Trigger = 0x04,
|
||||
kST_Timer = 0x05,
|
||||
kST_Counter = 0x06,
|
||||
kST_Effect = 0x07,
|
||||
kST_Platform = 0x08,
|
||||
kST_Sound = 0x09,
|
||||
kST_Generator = 0x0A,
|
||||
kST_Dock = 0x0B,
|
||||
kST_Camera = 0x0C,
|
||||
kST_CameraWaypoint = 0x0D,
|
||||
kST_NewIntroBoss = 0x0E,
|
||||
kST_SpawnPoint = 0x0F,
|
||||
kST_CameraHint = 0x10,
|
||||
kST_Pickup = 0x11,
|
||||
kST_MemoryRelay = 0x13,
|
||||
kST_RandomRelay = 0x14,
|
||||
kST_Relay = 0x15,
|
||||
kST_Beetle = 0x16,
|
||||
kST_HUDMemo = 0x17,
|
||||
kST_CameraFilterKeyframe = 0x18,
|
||||
kST_CameraBlurKeyframe = 0x19,
|
||||
kST_DamageableTrigger = 0x1A,
|
||||
kST_Debris = 0x1B,
|
||||
kST_CameraShaker = 0x1C,
|
||||
kST_ActorKeyframe = 0x1D,
|
||||
kST_Water = 0x20,
|
||||
kST_Warwasp = 0x21,
|
||||
kST_SpacePirate = 0x24,
|
||||
kST_FlyingPirate = 0x25,
|
||||
kST_ElitePirate = 0x26,
|
||||
kST_MetroidBeta = 0x27,
|
||||
kST_ChozoGhost = 0x28,
|
||||
kST_CoverPoint = 0x2A,
|
||||
kST_SpiderBallWaypoint = 0x2C,
|
||||
kST_BloodFlower = 0x2D,
|
||||
kST_FlickerBat = 0x2E,
|
||||
kST_PathCamera = 0x2F,
|
||||
kST_GrapplePoint = 0x30,
|
||||
kST_PuddleSpore = 0x31,
|
||||
kST_DebugCameraWaypoint = 0x32,
|
||||
kST_SpiderBallAttractionSurface = 0x33,
|
||||
kST_PuddleToadGamma = 0x34,
|
||||
kST_DistanceFog = 0x35,
|
||||
kST_FireFlea = 0x36,
|
||||
kST_Metaree = 0x37,
|
||||
kST_DockAreaChange = 0x38,
|
||||
kST_ActorRotate = 0x39,
|
||||
kST_SpecialFunction = 0x3A,
|
||||
kST_SpankWeed = 0x3B,
|
||||
kST_Parasite = 0x3D,
|
||||
kST_PlayerHint = 0x3E,
|
||||
kST_Ripper = 0x3F,
|
||||
kST_PickupGenerator = 0x40,
|
||||
kST_AIKeyframe = 0x41,
|
||||
kST_PointOfInterest = 0x42,
|
||||
kST_Drone = 0x43,
|
||||
kST_Metroid = 0x44,
|
||||
kST_DebrisExtended = 0x45,
|
||||
kST_Steam = 0x46,
|
||||
kST_Ripple = 0x47,
|
||||
kST_BallTrigger = 0x48,
|
||||
kST_TargetingPoint = 0x49,
|
||||
kST_EMPulse = 0x4A,
|
||||
kST_IceSheegoth = 0x4B,
|
||||
kST_PlayerActor = 0x4C,
|
||||
kST_Flaahgra = 0x4D,
|
||||
kST_AreaAttributes = 0x4E,
|
||||
kST_FishCloud = 0x4F,
|
||||
kST_FishCloudModifier = 0x50,
|
||||
kST_VisorFlare = 0x51,
|
||||
kST_WorldTeleporter = 0x52,
|
||||
kST_VisorGoo = 0x53,
|
||||
kST_JellyZap = 0x54,
|
||||
kST_ControllerAction = 0x55,
|
||||
kST_Switch = 0x56,
|
||||
kST_PlayerStateChange = 0x57,
|
||||
kST_Thardus = 0x58,
|
||||
kST_WallCrawlerSwarm = 0x5A,
|
||||
kST_AIJumpPoint = 0x5B,
|
||||
kST_FlaahgraTentacle = 0x5C,
|
||||
kST_RoomAcoustics = 0x5D,
|
||||
kST_ColorModulate = 0x5E,
|
||||
kST_ThardusRockProjectile = 0x5F,
|
||||
kST_Midi = 0x60,
|
||||
kST_StreamedAudio = 0x61,
|
||||
kST_WorldTeleporterToo = 0x62,
|
||||
kST_Repulsor = 0x63,
|
||||
kST_GunTurret = 0x64,
|
||||
kST_FogVolume = 0x65,
|
||||
kST_Babygoth = 0x66,
|
||||
kST_Eyeball = 0x67,
|
||||
kST_RadialDamage = 0x68,
|
||||
kST_CameraPitchVolume = 0x69,
|
||||
kST_EnvFxDensityController = 0x6A,
|
||||
kST_Magdolite = 0x6B,
|
||||
kST_TeamAIMgr = 0x6C,
|
||||
kST_SnakeWeedSwarm = 0x6D,
|
||||
kST_ActorContraption = 0x6E,
|
||||
kST_Oculus = 0x6F,
|
||||
kST_Geemer = 0x70,
|
||||
kST_SpindleCamera = 0x71,
|
||||
kST_AtomicAlpha = 0x72,
|
||||
kST_CameraHintTrigger = 0x73,
|
||||
kST_RumbleEffect = 0x74,
|
||||
kST_AmbientAI = 0x75,
|
||||
kST_AtomicBeta = 0x77,
|
||||
kST_IceZoomer = 0x78,
|
||||
kST_Puffer = 0x79,
|
||||
kST_Tryclops = 0x7A,
|
||||
kST_Ridley = 0x7B,
|
||||
kST_Seedling = 0x7C,
|
||||
kST_ThermalHeatFader = 0x7D,
|
||||
kST_Burrower = 0x7F,
|
||||
kST_ScriptBeam = 0x81,
|
||||
kST_WorldLightFader = 0x82,
|
||||
kST_MetroidPrimeStage2 = 0x83,
|
||||
kST_MetroidPrimeStage1 = 0x84,
|
||||
kST_MazeNode = 0x85,
|
||||
kST_OmegaPirate = 0x86,
|
||||
kST_PhazonPool = 0x87,
|
||||
kST_PhazonHealingNodule = 0x88,
|
||||
kST_NewCameraShaker = 0x89,
|
||||
kST_ShadowProjector = 0x8A,
|
||||
kST_EnergyBall = 0x8B,
|
||||
kST_MAX
|
||||
};
|
||||
|
||||
enum EScriptObjectState {
|
||||
kSS_Any = -1,
|
||||
kSS_Active = 0,
|
||||
kSS_Arrived = 1,
|
||||
kSS_Closed = 2,
|
||||
kSS_Entered = 3,
|
||||
kSS_Exited = 4,
|
||||
kSS_Inactive = 5,
|
||||
kSS_Inside = 6,
|
||||
kSS_MaxReached = 7,
|
||||
kSS_Open = 8,
|
||||
kSS_Zero = 9,
|
||||
kSS_Attack = 10,
|
||||
kSS_CloseIn = 11,
|
||||
kSS_Retreat = 12,
|
||||
kSS_Patrol = 13,
|
||||
kSS_Dead = 14,
|
||||
kSS_CameraPath = 15,
|
||||
kSS_CameraTarget = 16,
|
||||
kSS_DeactivateState = 17,
|
||||
kSS_Play = 18,
|
||||
kSS_MassiveDeath = 19,
|
||||
kSS_DeathRattle = 20,
|
||||
kSS_AboutToMassivelyDie = 21,
|
||||
kSS_Damage = 22,
|
||||
kSS_InvulnDamage = 23,
|
||||
kSS_MassiveFrozenDeath = 24,
|
||||
kSS_Modify = 25,
|
||||
kSS_ScanStart = 26,
|
||||
kSS_ScanProcessing = 27,
|
||||
kSS_ScanDone = 28,
|
||||
kSS_UnFrozen = 29,
|
||||
kSS_Default = 30,
|
||||
kSS_ReflectedDamage = 31,
|
||||
InheritBounds = 32
|
||||
};
|
||||
|
||||
enum EScriptObjectMessage {
|
||||
kSM_None = -1,
|
||||
kSM_UNKM0 = 0,
|
||||
kSM_Activate = 1,
|
||||
kSM_Arrived = 2,
|
||||
kSM_Close = 3,
|
||||
kSM_Deactivate = 4,
|
||||
kSM_Decrement = 5,
|
||||
kSM_Follow = 6,
|
||||
kSM_Increment = 7,
|
||||
kSM_Next = 8,
|
||||
kSM_Open = 9,
|
||||
kSM_Reset = 10,
|
||||
kSM_ResetAndStart = 11,
|
||||
kSM_SetToMax = 12,
|
||||
kSM_SetToZero = 13,
|
||||
kSM_Start = 14,
|
||||
kSM_Stop = 15,
|
||||
kSM_StopAndReset = 16,
|
||||
kSM_ToggleActive = 17,
|
||||
kSM_UNKM18 = 18,
|
||||
kSM_Action = 19,
|
||||
kSM_Play = 20,
|
||||
kSM_Alert = 21,
|
||||
kSM_InternalMessage00 = 22,
|
||||
kSM_OnFloor = 23,
|
||||
kSM_InternalMessage02 = 24,
|
||||
kSM_InternalMessage03 = 25,
|
||||
kSM_Falling = 26,
|
||||
kSM_OnIceSurface = 27,
|
||||
kSM_OnMudSlowSurface = 28,
|
||||
kSM_OnNormalSurface = 29,
|
||||
kSM_Touched = 30,
|
||||
kSM_AddPlatformRider = 31,
|
||||
kSM_LandOnNotFloor = 32,
|
||||
kSM_Registered = 33,
|
||||
kSM_Deleted = 34,
|
||||
kSM_InitializedInArea = 35,
|
||||
kSM_WorldInitialized = 36,
|
||||
kSM_AddSplashInhabitant = 37,
|
||||
kSM_UpdateSplashInhabitant = 38,
|
||||
kSM_RemoveSplashInhabitant = 39,
|
||||
kSM_Jumped = 40,
|
||||
kSM_Damage = 41,
|
||||
kSM_InvulnDamage = 42,
|
||||
kSM_ProjectileCollide = 43,
|
||||
kSM_InSnakeWeed = 44,
|
||||
kSM_AddPhazonPoolInhabitant = 45,
|
||||
kSM_UpdatePhazonPoolInhabitant = 46,
|
||||
kSM_RemovePhazonPoolInhabitant = 47,
|
||||
kSM_SuspendedMove = 48
|
||||
};
|
||||
|
||||
struct SConnection {
|
||||
EScriptObjectState x0_state;
|
||||
EScriptObjectMessage x4_msg;
|
||||
TEditorId x8_objId;
|
||||
};
|
||||
|
||||
class CEntityInfo {
|
||||
TAreaId x0_areaId;
|
||||
rstl::vector<SConnection> x4_conns;
|
||||
TEditorId x14_editorId;
|
||||
|
||||
public:
|
||||
CEntityInfo(TAreaId aid, const rstl::vector< SConnection >& conns, TEditorId eid = kInvalidEditorId);
|
||||
TAreaId GetAreaId() const { return x0_areaId; }
|
||||
const rstl::vector<SConnection>& GetConnectionList() const { return x4_conns; }
|
||||
TEditorId GetEditorId() const { return x14_editorId; }
|
||||
};
|
||||
|
||||
#endif
|
|
@ -3,10 +3,10 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "CIOWinManager.hpp"
|
||||
#include "Kyoto/Basics/COsContext.hpp"
|
||||
#include "Kyoto/Basics/CStopwatch.hpp"
|
||||
#include "Kyoto/TOneStatic.hpp"
|
||||
#include "MetroidPrime/CIOWinManager.hpp"
|
||||
|
||||
class CGameArchitectureSupport : public TOneStatic< CGameArchitectureSupport > {
|
||||
public:
|
||||
|
|
|
@ -6,9 +6,6 @@
|
|||
#include "rstl/optional_object.hpp"
|
||||
#include "rstl/single_ptr.hpp"
|
||||
|
||||
#include "CInGameTweakManager.hpp"
|
||||
#include "Enemies/CAiFuncMap.hpp"
|
||||
#include "Factories/CCharacterFactoryBuilder.hpp"
|
||||
#include "Kyoto/Basics/COsContext.hpp"
|
||||
#include "Kyoto/CMemoryCardSys.hpp"
|
||||
#include "Kyoto/CMemorySys.hpp"
|
||||
|
@ -18,7 +15,10 @@
|
|||
#include "Kyoto/Graphics/CGraphicsSys.hpp"
|
||||
#include "Kyoto/Text/CRasterFont.hpp"
|
||||
#include "Kyoto/TOneStatic.hpp"
|
||||
#include "Player/CGameState.hpp"
|
||||
#include "MetroidPrime/CInGameTweakManager.hpp"
|
||||
#include "MetroidPrime/Enemies/CAiFuncMap.hpp"
|
||||
#include "MetroidPrime/Factories/CCharacterFactoryBuilder.hpp"
|
||||
#include "MetroidPrime/Player/CGameState.hpp"
|
||||
|
||||
class CGameGlobalObjects : public TOneStatic< CGameGlobalObjects > {
|
||||
public:
|
||||
|
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
#include "rstl/reserved_vector.hpp"
|
||||
|
||||
#include "CGameArchitectureSupport.hpp"
|
||||
#include "CGameGlobalObjects.hpp"
|
||||
#include "Kyoto/Basics/COsContext.hpp"
|
||||
#include "Kyoto/Basics/CStopwatch.hpp"
|
||||
#include "Kyoto/CMemorySys.hpp"
|
||||
#include "Kyoto/Streams/CInputStream.hpp"
|
||||
#include "Kyoto/TReservedAverage.hpp"
|
||||
#include "MetroidPrime/CGameArchitectureSupport.hpp"
|
||||
#include "MetroidPrime/CGameGlobalObjects.hpp"
|
||||
#include "MetroidPrime/TGameTypes.hpp"
|
||||
#include "MetroidPrime/Tweaks/CTweaks.hpp"
|
||||
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
#ifndef _CSTATEMANAGER_HPP
|
||||
#define _CSTATEMANAGER_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class CStateManager {};
|
||||
|
||||
#endif
|
|
@ -7,12 +7,12 @@
|
|||
#include "rstl/reserved_vector.hpp"
|
||||
#include "rstl/vector.hpp"
|
||||
|
||||
#include "CGameOptions.hpp"
|
||||
#include "CHintOptions.hpp"
|
||||
#include "CPlayerState.hpp"
|
||||
#include "CSystemOptions.hpp"
|
||||
#include "CWorldState.hpp"
|
||||
#include "CWorldTransManager.hpp"
|
||||
#include "MetroidPrime/Player/CGameOptions.hpp"
|
||||
#include "MetroidPrime/Player/CHintOptions.hpp"
|
||||
#include "MetroidPrime/Player/CPlayerState.hpp"
|
||||
#include "MetroidPrime/Player/CSystemOptions.hpp"
|
||||
#include "MetroidPrime/Player/CWorldState.hpp"
|
||||
#include "MetroidPrime/Player/CWorldTransManager.hpp"
|
||||
#include "MetroidPrime/TGameTypes.hpp"
|
||||
|
||||
class CGameState {
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
#ifndef _TCASTTO_HPP
|
||||
#define _TCASTTO_HPP
|
||||
|
||||
#include "types.h"
|
||||
|
||||
class IVisitor {
|
||||
|
||||
};
|
||||
|
||||
#endif
|
|
@ -3,12 +3,35 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
typedef s32 TAreaId;
|
||||
typedef s32 TEditorId;
|
||||
typedef u16 TUniqueId;
|
||||
struct TAreaId;
|
||||
struct TEditorId;
|
||||
struct TUniqueId;
|
||||
|
||||
extern TAreaId kInvalidAreaId;
|
||||
extern TEditorId kInvalidEditorId;
|
||||
extern TUniqueId kInvalidUniqueId;
|
||||
|
||||
struct TAreaId {
|
||||
s32 value;
|
||||
|
||||
TAreaId() : value(-1) {}
|
||||
TAreaId(s32 value) : value(value) {}
|
||||
s32 Value() const { return value; }
|
||||
|
||||
bool operator==(const TAreaId& other) const { return value == other.value; }
|
||||
bool operator!=(const TAreaId& other) const { return value != other.value; }
|
||||
};
|
||||
struct TEditorId {
|
||||
u32 value;
|
||||
|
||||
TEditorId() : value(-1) {}
|
||||
TEditorId(u32 value) : value(value) {}
|
||||
};
|
||||
struct TUniqueId {
|
||||
u16 value;
|
||||
|
||||
TUniqueId() : value(-1) {}
|
||||
TUniqueId(u16 value) : value(value) {}
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "rmemory_allocator.hpp"
|
||||
#include "rstl/rmemory_allocator.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename T, typename Alloc = rmemory_allocator >
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "rmemory_allocator.hpp"
|
||||
#include "rstl/rmemory_allocator.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename K, typename V, typename Alloc = rmemory_allocator >
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "construct.hpp"
|
||||
#include "rstl/construct.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename T >
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "construct.hpp"
|
||||
#include "rstl/construct.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename T, typename Vec, typename Alloc >
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "construct.hpp"
|
||||
#include "pointer_iterator.hpp"
|
||||
#include "rstl/construct.hpp"
|
||||
#include "rstl/pointer_iterator.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename T, size_t N >
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "rmemory_allocator.hpp"
|
||||
#include "rstl/rmemory_allocator.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename _CharTp >
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
|
||||
#include "types.h"
|
||||
|
||||
#include "pointer_iterator.hpp"
|
||||
#include "rmemory_allocator.hpp"
|
||||
#include "rstl/pointer_iterator.hpp"
|
||||
#include "rstl/rmemory_allocator.hpp"
|
||||
|
||||
namespace rstl {
|
||||
template < typename T, typename Alloc = rmemory_allocator >
|
||||
|
@ -27,7 +27,7 @@ public:
|
|||
vector(const vector& other) {
|
||||
x4_count = other.x4_count;
|
||||
x8_capacity = other.x8_capacity;
|
||||
if (x4_count == 0 && x8_capacity == 0) {
|
||||
if (other.x4_count == 0 && other.x8_capacity == 0) {
|
||||
xc_items = NULL;
|
||||
} else {
|
||||
size_t sz = x8_capacity * sizeof(T);
|
||||
|
|
Loading…
Reference in New Issue