Add all entities to ImGuiEntitySupport

This commit is contained in:
Luke Street 2021-05-26 10:00:57 -04:00
parent 0841bd4ab2
commit 4740ca0c43
120 changed files with 474 additions and 15 deletions

View File

@ -53,6 +53,7 @@ public:
class CBallCamera : public CGameCamera {
public:
DEFINE_ENTITY
enum class EBallCameraState { Default, One, Chase, Boost, ToBall, FromBall };
enum class EBallCameraBehaviour {
Default,

View File

@ -42,6 +42,7 @@ class CCinematicCamera : public CGameCamera {
void CalculateWaypoints(CStateManager& mgr);
public:
DEFINE_ENTITY
CCinematicCamera(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
bool active, float shotDuration, float fovy, float znear, float zfar, float aspect, u32 flags);

View File

@ -19,6 +19,7 @@ class CFirstPersonCamera : public CGameCamera {
float x1d4_closeInTimer = 0.f;
void _fovListener(hecl::CVar* cv);
public:
DEFINE_ENTITY
CFirstPersonCamera(TUniqueId, const zeus::CTransform& xf, TUniqueId, float orbitCameraSpeed, float fov,
float nearplane, float farplane, float aspect);

View File

@ -31,6 +31,7 @@ protected:
float x184_perspInterpEndFov;
public:
DEFINE_ENTITY
CGameCamera(TUniqueId, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
float fov, float nearz, float farz, float aspect, TUniqueId watchedId, bool disableInput,
u32 controllerIdx);

View File

@ -26,6 +26,7 @@ class CInterpolationCamera : public CGameCamera {
float maxTime, float curTime);
public:
DEFINE_ENTITY
explicit CInterpolationCamera(TUniqueId uid, const zeus::CTransform& xf);
void Accept(IVisitor& visitor) override;
void AcceptScriptMsg(EScriptObjectMessage, TUniqueId, CStateManager&) override;

View File

@ -22,6 +22,7 @@ private:
float x1f4_maxEaseDist;
public:
DEFINE_ENTITY
CPathCamera(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, bool active,
float lengthExtent, float filterMag, float filterProportion, float minEaseDist, float maxEaseDist,
u32 flags, EInitialSplinePosition initPos);

View File

@ -35,6 +35,7 @@ class CCollisionActor : public CPhysicsActor {
CAABoxShader m_aabox;
public:
DEFINE_ENTITY
CCollisionActor(TUniqueId uid, TAreaId areaId, TUniqueId owner, const zeus::CVector3f& extent,
const zeus::CVector3f& center, bool active, float mass, std::string_view name);
CCollisionActor(TUniqueId uid, TAreaId areaId, TUniqueId owner, const zeus::CVector3f& boxSize, bool active,

View File

@ -90,12 +90,17 @@ static void Warp(const CAssetId worldId, TAreaId aId) {
}
}
static bool stepFrame = false;
static void ShowMenuGame() {
static bool paused;
paused = g_Main->IsPaused();
if (ImGui::MenuItem("Paused", nullptr, &paused)) {
g_Main->SetPaused(paused);
}
if (ImGui::MenuItem("Step", nullptr, &stepFrame, paused)) {
g_Main->SetPaused(false);
}
if (ImGui::BeginMenu("Warp", g_StateManager != nullptr && g_ResFactory != nullptr &&
g_ResFactory->GetResLoader() != nullptr)) {
for (const auto& world : ListWorlds()) {
@ -235,7 +240,13 @@ static void ShowAppMainMenuBar() {
}
}
void ImGuiConsole::proc() { ShowAppMainMenuBar(); }
void ImGuiConsole::proc() {
if (stepFrame) {
g_Main->SetPaused(true);
stepFrame = false;
}
ShowAppMainMenuBar();
}
ImGuiConsole::~ImGuiConsole() {
dummyWorlds.clear();

View File

@ -1,8 +1,157 @@
#include "Runtime/World/CEntity.hpp"
#include "Runtime/World/CActor.hpp"
#include "Runtime/World/CAi.hpp"
#include "Runtime/World/CAmbientAI.hpp"
#include "Runtime/World/CDestroyableRock.hpp"
#include "Runtime/World/CEffect.hpp"
#include "Runtime/World/CEntity.hpp"
#include "Runtime/World/CExplosion.hpp"
#include "Runtime/World/CFire.hpp"
#include "Runtime/World/CFishCloud.hpp"
#include "Runtime/World/CFishCloudModifier.hpp"
#include "Runtime/World/CGameLight.hpp"
#include "Runtime/World/CHUDBillboardEffect.hpp"
#include "Runtime/World/CIceImpact.hpp"
#include "Runtime/World/CPatterned.hpp"
#include "Runtime/World/CPlayer.hpp"
#include "Runtime/World/CRepulsor.hpp"
#include "Runtime/World/CScriptActor.hpp"
#include "Runtime/World/CScriptActorKeyframe.hpp"
#include "Runtime/World/CScriptActorRotate.hpp"
#include "Runtime/World/CScriptAiJumpPoint.hpp"
#include "Runtime/World/CScriptAreaAttributes.hpp"
#include "Runtime/World/CScriptBallTrigger.hpp"
#include "Runtime/World/CScriptBeam.hpp"
#include "Runtime/World/CScriptCameraBlurKeyframe.hpp"
#include "Runtime/World/CScriptCameraFilterKeyframe.hpp"
#include "Runtime/World/CScriptCameraHint.hpp"
#include "Runtime/World/CScriptCameraHintTrigger.hpp"
#include "Runtime/World/CScriptCameraPitchVolume.hpp"
#include "Runtime/World/CScriptCameraShaker.hpp"
#include "Runtime/World/CScriptCameraWaypoint.hpp"
#include "Runtime/World/CScriptColorModulate.hpp"
#include "Runtime/World/CScriptControllerAction.hpp"
#include "Runtime/World/CScriptCounter.hpp"
#include "Runtime/World/CScriptCoverPoint.hpp"
#include "Runtime/World/CScriptDamageableTrigger.hpp"
#include "Runtime/World/CScriptDebris.hpp"
#include "Runtime/World/CScriptDebugCameraWaypoint.hpp"
#include "Runtime/World/CScriptDistanceFog.hpp"
#include "Runtime/World/CScriptDock.hpp"
#include "Runtime/World/CScriptDockAreaChange.hpp"
#include "Runtime/World/CScriptDoor.hpp"
#include "Runtime/World/CScriptEMPulse.hpp"
#include "Runtime/World/CScriptEffect.hpp"
#include "Runtime/World/CScriptGenerator.hpp"
#include "Runtime/World/CScriptGrapplePoint.hpp"
#include "Runtime/World/CScriptGunTurret.hpp"
#include "Runtime/World/CScriptHUDMemo.hpp"
#include "Runtime/World/CScriptMazeNode.hpp"
#include "Runtime/World/CScriptMemoryRelay.hpp"
#include "Runtime/World/CScriptMidi.hpp"
#include "Runtime/World/CScriptPickup.hpp"
#include "Runtime/World/CScriptPickupGenerator.hpp"
#include "Runtime/World/CScriptPlatform.hpp"
#include "Runtime/World/CScriptPlayerActor.hpp"
#include "Runtime/World/CScriptPlayerHint.hpp"
#include "Runtime/World/CScriptPlayerStateChange.hpp"
#include "Runtime/World/CScriptPointOfInterest.hpp"
#include "Runtime/World/CScriptRandomRelay.hpp"
#include "Runtime/World/CScriptRelay.hpp"
#include "Runtime/World/CScriptRipple.hpp"
#include "Runtime/World/CScriptRoomAcoustics.hpp"
#include "Runtime/World/CScriptShadowProjector.hpp"
#include "Runtime/World/CScriptSound.hpp"
#include "Runtime/World/CScriptSpawnPoint.hpp"
#include "Runtime/World/CScriptSpecialFunction.hpp"
#include "Runtime/World/CScriptSpiderBallAttractionSurface.hpp"
#include "Runtime/World/CScriptSpiderBallWaypoint.hpp"
#include "Runtime/World/CScriptSpindleCamera.hpp"
#include "Runtime/World/CScriptSteam.hpp"
#include "Runtime/World/CScriptStreamedMusic.hpp"
#include "Runtime/World/CScriptSwitch.hpp"
#include "Runtime/World/CScriptTargetingPoint.hpp"
#include "Runtime/World/CScriptTimer.hpp"
#include "Runtime/World/CScriptTrigger.hpp"
#include "Runtime/World/CScriptVisorFlare.hpp"
#include "Runtime/World/CScriptVisorGoo.hpp"
#include "Runtime/World/CScriptWater.hpp"
#include "Runtime/World/CScriptWaypoint.hpp"
#include "Runtime/World/CScriptWorldTeleporter.hpp"
#include "Runtime/World/CSnakeWeedSwarm.hpp"
#include "Runtime/World/CTeamAiMgr.hpp"
#include "Runtime/World/CWallCrawlerSwarm.hpp"
#include "Runtime/World/CWallWalker.hpp"
#include "Runtime/Camera/CGameCamera.hpp"
#include "Runtime/Camera/CCinematicCamera.hpp"
#include "Runtime/Camera/CFirstPersonCamera.hpp"
#include "Runtime/Camera/CInterpolationCamera.hpp"
#include "Runtime/Camera/CPathCamera.hpp"
#include "Runtime/Collision/CCollisionActor.hpp"
#include "Runtime/Weapon/CWeapon.hpp"
#include "Runtime/Weapon/CBeamProjectile.hpp"
#include "Runtime/Weapon/CBomb.hpp"
#include "Runtime/Weapon/CElectricBeamProjectile.hpp"
#include "Runtime/Weapon/CFlameThrower.hpp"
#include "Runtime/Weapon/CGameProjectile.hpp"
#include "Runtime/Weapon/CNewFlameThrower.hpp"
#include "Runtime/Weapon/CPlasmaProjectile.hpp"
#include "Runtime/Weapon/CPowerBomb.hpp"
#include "Runtime/Weapon/CTargetableProjectile.hpp"
#include "Runtime/Weapon/CWaveBuster.hpp"
#include "Runtime/MP1/World/CActorContraption.hpp"
#include "Runtime/MP1/World/CAtomicAlpha.hpp"
#include "Runtime/MP1/World/CAtomicBeta.hpp"
#include "Runtime/MP1/World/CBabygoth.hpp"
#include "Runtime/MP1/World/CBeetle.hpp"
#include "Runtime/MP1/World/CBloodFlower.hpp"
#include "Runtime/MP1/World/CBouncyGrenade.hpp"
#include "Runtime/MP1/World/CBurrower.hpp"
#include "Runtime/MP1/World/CChozoGhost.hpp"
#include "Runtime/MP1/World/CDrone.hpp"
#include "Runtime/MP1/World/CDroneLaser.hpp"
#include "Runtime/MP1/World/CElitePirate.hpp"
#include "Runtime/MP1/World/CEnergyBall.hpp"
#include "Runtime/MP1/World/CEyeball.hpp"
#include "Runtime/MP1/World/CFireFlea.hpp"
#include "Runtime/MP1/World/CFlaahgra.hpp"
#include "Runtime/MP1/World/CFlaahgraProjectile.hpp"
#include "Runtime/MP1/World/CFlaahgraTentacle.hpp"
#include "Runtime/MP1/World/CFlickerBat.hpp"
#include "Runtime/MP1/World/CFlyingPirate.hpp"
#include "Runtime/MP1/World/CGrenadeLauncher.hpp"
#include "Runtime/MP1/World/CIceAttackProjectile.hpp"
#include "Runtime/MP1/World/CIceSheegoth.hpp"
#include "Runtime/MP1/World/CJellyZap.hpp"
#include "Runtime/MP1/World/CMagdolite.hpp"
#include "Runtime/MP1/World/CMetaree.hpp"
#include "Runtime/MP1/World/CMetroid.hpp"
#include "Runtime/MP1/World/CMetroidBeta.hpp"
#include "Runtime/MP1/World/CMetroidPrimeEssence.hpp"
#include "Runtime/MP1/World/CMetroidPrimeExo.hpp"
#include "Runtime/MP1/World/CMetroidPrimeProjectile.hpp"
#include "Runtime/MP1/World/CMetroidPrimeRelay.hpp"
#include "Runtime/MP1/World/CNewIntroBoss.hpp"
#include "Runtime/MP1/World/COmegaPirate.hpp"
#include "Runtime/MP1/World/CParasite.hpp"
#include "Runtime/MP1/World/CPhazonHealingNodule.hpp"
#include "Runtime/MP1/World/CPhazonPool.hpp"
#include "Runtime/MP1/World/CPuddleSpore.hpp"
#include "Runtime/MP1/World/CPuddleToadGamma.hpp"
#include "Runtime/MP1/World/CPuffer.hpp"
#include "Runtime/MP1/World/CRidley.hpp"
#include "Runtime/MP1/World/CRipper.hpp"
#include "Runtime/MP1/World/CSeedling.hpp"
#include "Runtime/MP1/World/CShockWave.hpp"
#include "Runtime/MP1/World/CSpacePirate.hpp"
#include "Runtime/MP1/World/CSpankWeed.hpp"
#include "Runtime/MP1/World/CThardus.hpp"
#include "Runtime/MP1/World/CThardusRockProjectile.hpp"
#include "Runtime/MP1/World/CTryclops.hpp"
#include "Runtime/MP1/World/CWarWasp.hpp"
#include "imgui.h"
@ -14,6 +163,14 @@
BLOCK \
}
#define BITFIELD_CHECKBOX(label, bf) \
{ \
bool b = (bf); \
ImGui::Checkbox(label, &b); \
if (b != (bf)) \
(bf) = b; \
}
namespace metaforce {
std::string_view CEntity::ImGuiType() { return "Entity"; }
@ -21,16 +178,196 @@ void CEntity::ImGuiInspect() {
if (ImGui::CollapsingHeader("Entity", ImGuiTreeNodeFlags_DefaultOpen)) {
ImGui::Text("ID: %x", x8_uid.Value());
ImGui::Text("Name: %s", x10_name.c_str());
BITFIELD_CHECKBOX("Active", x30_24_active);
}
}
// <- CEntity
IMGUI_ENTITY_INSPECT(CActor, CEntity, Actor, {
const zeus::CVector3f& pos = GetTranslation();
ImGui::Text("Position: %f, %f, %f", pos.x(), pos.y(), pos.z());
})
IMGUI_ENTITY_INSPECT(CPhysicsActor, CActor, Physics Actor, {})
IMGUI_ENTITY_INSPECT(MP1::CFireFlea::CDeathCameraEffect, CEntity, FireFleaDeathCameraEffect, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroidPrimeRelay, CEntity, MetroidPrimeRelay, {})
IMGUI_ENTITY_INSPECT(CScriptActorKeyframe, CEntity, ScriptActorKeyframe, {})
IMGUI_ENTITY_INSPECT(CScriptActorRotate, CEntity, ScriptActorRotate, {})
IMGUI_ENTITY_INSPECT(CScriptAreaAttributes, CEntity, ScriptAreaAttributes, {})
IMGUI_ENTITY_INSPECT(CScriptCameraBlurKeyframe, CEntity, ScriptCameraBlurKeyframe, {})
IMGUI_ENTITY_INSPECT(CScriptCameraFilterKeyframe, CEntity, ScriptCameraFilterKeyframe, {})
IMGUI_ENTITY_INSPECT(CScriptCameraShaker, CEntity, ScriptCameraShaker, {})
IMGUI_ENTITY_INSPECT(CScriptColorModulate, CEntity, ScriptColorModulate, {})
IMGUI_ENTITY_INSPECT(CScriptControllerAction, CEntity, ScriptControllerAction, {})
IMGUI_ENTITY_INSPECT(CScriptCounter, CEntity, ScriptCounter, {})
IMGUI_ENTITY_INSPECT(CScriptDistanceFog, CEntity, ScriptDistanceFog, {})
IMGUI_ENTITY_INSPECT(CScriptDockAreaChange, CEntity, ScriptDockAreaChange, {})
IMGUI_ENTITY_INSPECT(CScriptGenerator, CEntity, ScriptGenerator, {})
IMGUI_ENTITY_INSPECT(CScriptHUDMemo, CEntity, ScriptHUDMemo, {})
IMGUI_ENTITY_INSPECT(CScriptMemoryRelay, CEntity, ScriptMemoryRelay, {})
IMGUI_ENTITY_INSPECT(CScriptMidi, CEntity, ScriptMidi, {})
IMGUI_ENTITY_INSPECT(CScriptPickupGenerator, CEntity, ScriptPickupGenerator, {})
IMGUI_ENTITY_INSPECT(CScriptPlayerStateChange, CEntity, ScriptPlayerStateChange, {})
IMGUI_ENTITY_INSPECT(CScriptRandomRelay, CEntity, ScriptRandomRelay, {})
IMGUI_ENTITY_INSPECT(CScriptRelay, CEntity, ScriptRelay, {})
IMGUI_ENTITY_INSPECT(CScriptRipple, CEntity, ScripleRipple, {})
IMGUI_ENTITY_INSPECT(CScriptRoomAcoustics, CEntity, ScriptRoomAcoustics, {})
IMGUI_ENTITY_INSPECT(CScriptSpawnPoint, CEntity, ScriptSpawnPoint, {})
IMGUI_ENTITY_INSPECT(CScriptStreamedMusic, CEntity, ScriptStreamedMusic, {})
IMGUI_ENTITY_INSPECT(CScriptSwitch, CEntity, ScriptSwitch, {})
IMGUI_ENTITY_INSPECT(CScriptTimer, CEntity, ScriptTimer, {})
IMGUI_ENTITY_INSPECT(CScriptWorldTeleporter, CEntity, ScriptWorldTeleporter, {})
IMGUI_ENTITY_INSPECT(CTeamAiMgr, CEntity, TeamAiMgr, {})
// <- CActor
IMGUI_ENTITY_INSPECT(CPhysicsActor, CActor, PhysicsActor, {})
IMGUI_ENTITY_INSPECT(MP1::CDroneLaser, CActor, DroneLaser, {})
IMGUI_ENTITY_INSPECT(CEffect, CActor, Effect, {})
IMGUI_ENTITY_INSPECT(CFire, CActor, Fire, {})
IMGUI_ENTITY_INSPECT(CFishCloud, CActor, FishCloud, {})
IMGUI_ENTITY_INSPECT(CFishCloudModifier, CActor, FishCloudModifier, {})
IMGUI_ENTITY_INSPECT(MP1::CFlaahgraPlants, CActor, FlaahgraPlants, {})
IMGUI_ENTITY_INSPECT(MP1::CFlaahgraRenderer, CActor, FlaahgraRenderer, {})
IMGUI_ENTITY_INSPECT(MP1::COmegaPirate::CFlash, CActor, OmegaPirateFlash, {})
IMGUI_ENTITY_INSPECT(CGameCamera, CActor, GameCamera, {})
IMGUI_ENTITY_INSPECT(CGameLight, CActor, GameLight, {})
IMGUI_ENTITY_INSPECT(MP1::CIceAttackProjectile, CActor, IceAttackProjectile, {})
IMGUI_ENTITY_INSPECT(CRepulsor, CActor, Repulsor, {})
IMGUI_ENTITY_INSPECT(CScriptAiJumpPoint, CActor, ScriptAIJumpPoint, {})
IMGUI_ENTITY_INSPECT(CScriptBeam, CActor, ScriptBeam, {})
IMGUI_ENTITY_INSPECT(CScriptCameraHint, CActor, ScriptCameraHint, {})
IMGUI_ENTITY_INSPECT(CScriptCameraHintTrigger, CActor, ScriptCameraHintTrigger, {})
IMGUI_ENTITY_INSPECT(CScriptCameraPitchVolume, CActor, ScriptCameraPitchVolume, {})
IMGUI_ENTITY_INSPECT(CScriptCameraWaypoint, CActor, ScriptCameraWaypoint, {})
IMGUI_ENTITY_INSPECT(CScriptCoverPoint, CActor, ScriptCoverPoint, {})
IMGUI_ENTITY_INSPECT(CScriptDamageableTrigger, CActor, ScriptDamageableTrigger, {})
IMGUI_ENTITY_INSPECT(CScriptDebugCameraWaypoint, CActor, ScriptDebugCameraWaypoint, {})
IMGUI_ENTITY_INSPECT(CScriptEffect, CActor, ScriptEffect, {})
IMGUI_ENTITY_INSPECT(CScriptEMPulse, CActor, ScriptEMPulse, {})
IMGUI_ENTITY_INSPECT(CScriptGrapplePoint, CActor, ScriptGrapplePoint, {})
IMGUI_ENTITY_INSPECT(CScriptMazeNode, CActor, ScriptMazeNode, {})
IMGUI_ENTITY_INSPECT(CScriptPlayerHint, CActor, ScriptPlayerHint, {})
IMGUI_ENTITY_INSPECT(CScriptPointOfInterest, CActor, ScriptPointOfInterest, {})
IMGUI_ENTITY_INSPECT(CScriptShadowProjector, CActor, ScriptShadowProjector, {})
IMGUI_ENTITY_INSPECT(CScriptSound, CActor, ScriptSound, {})
IMGUI_ENTITY_INSPECT(CScriptSpecialFunction, CActor, ScriptSpecialFunction, {})
IMGUI_ENTITY_INSPECT(CScriptSpiderBallAttractionSurface, CActor, ScriptSpiderballAttractionSurface, {})
IMGUI_ENTITY_INSPECT(CScriptSpiderBallWaypoint, CActor, ScriptSpiderBallWaypoint, {})
IMGUI_ENTITY_INSPECT(CScriptTargetingPoint, CActor, ScriptTargetingPoint, {})
IMGUI_ENTITY_INSPECT(CScriptTrigger, CActor, ScriptTrigger, {})
IMGUI_ENTITY_INSPECT(CScriptVisorFlare, CActor, ScriptVisorFlare, {})
IMGUI_ENTITY_INSPECT(CScriptVisorGoo, CActor, ScriptVisorGoo, {})
IMGUI_ENTITY_INSPECT(CScriptWaypoint, CActor, ScriptWaypoint, {})
IMGUI_ENTITY_INSPECT(MP1::CShockWave, CActor, ShockWave, {})
IMGUI_ENTITY_INSPECT(CSnakeWeedSwarm, CActor, SnakeWeedSwarm, {})
IMGUI_ENTITY_INSPECT(CWallCrawlerSwarm, CActor, WallCrawlerSwarm, {})
IMGUI_ENTITY_INSPECT(CWeapon, CActor, Weapon, {})
// <- CEffect
IMGUI_ENTITY_INSPECT(CExplosion, CEffect, Explosion, {})
IMGUI_ENTITY_INSPECT(CHUDBillboardEffect, CEffect, HUDBillboardEffect, {})
IMGUI_ENTITY_INSPECT(CIceImpact, CEffect, IceImpact, {})
// <- CGameCamera
IMGUI_ENTITY_INSPECT(CBallCamera, CGameCamera, BallCamera, {})
IMGUI_ENTITY_INSPECT(CCinematicCamera, CGameCamera, CinematicCamera, {})
IMGUI_ENTITY_INSPECT(CFirstPersonCamera, CGameCamera, FirstPersonCamera, {})
IMGUI_ENTITY_INSPECT(CInterpolationCamera, CGameCamera, InterpolationCamera, {})
IMGUI_ENTITY_INSPECT(CPathCamera, CGameCamera, PathCamera, {})
IMGUI_ENTITY_INSPECT(CScriptSpindleCamera, CGameCamera, ScriptSpindleCamera, {})
// <- CScriptTrigger
IMGUI_ENTITY_INSPECT(MP1::CPhazonPool, CScriptTrigger, PhazonPool, {})
IMGUI_ENTITY_INSPECT(CScriptBallTrigger, CScriptTrigger, ScriptBallTrigger, {})
IMGUI_ENTITY_INSPECT(CScriptSteam, CScriptTrigger, ScriptSteam, {})
IMGUI_ENTITY_INSPECT(CScriptWater, CScriptTrigger, ScriptWater, {})
// <- CWeapon
IMGUI_ENTITY_INSPECT(CBomb, CWeapon, Bomb, {})
IMGUI_ENTITY_INSPECT(CGameProjectile, CWeapon, GameProjectile, {})
IMGUI_ENTITY_INSPECT(CPowerBomb, CWeapon, PowerBomb, {})
// <- CGameProjectile
IMGUI_ENTITY_INSPECT(CBeamProjectile, CGameProjectile, BeamProjectile, {})
IMGUI_ENTITY_INSPECT(CEnergyProjectile, CGameProjectile, EnergyProjectile, {})
IMGUI_ENTITY_INSPECT(CFlameThrower, CGameProjectile, FlameThrower, {})
IMGUI_ENTITY_INSPECT(CNewFlameThrower, CGameProjectile, NewFlameThrower, {})
IMGUI_ENTITY_INSPECT(CWaveBuster, CGameProjectile, WaveBuster, {})
// <- CBeamProjectile
IMGUI_ENTITY_INSPECT(CElectricBeamProjectile, CBeamProjectile, ElectricBeamProjectile, {})
IMGUI_ENTITY_INSPECT(CPlasmaProjectile, CBeamProjectile, PlasmaProjectile, {})
// <- CEnergyProjectile
IMGUI_ENTITY_INSPECT(MP1::CFlaahgraProjectile, CEnergyProjectile, FlaahgraProjectile, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroidPrimeProjectile, CEnergyProjectile, MetroidPrimeProjectile, {})
IMGUI_ENTITY_INSPECT(CTargetableProjectile, CEnergyProjectile, TargetableProjectile, {})
// <- CPhysicsActor
IMGUI_ENTITY_INSPECT(CAi, CPhysicsActor, AI, {})
IMGUI_ENTITY_INSPECT(CAmbientAI, CPhysicsActor, AmbientAI, {})
IMGUI_ENTITY_INSPECT(MP1::CBouncyGrenade, CPhysicsActor, BouncyGrenade, {})
IMGUI_ENTITY_INSPECT(CCollisionActor, CPhysicsActor, CollisionActor, {})
IMGUI_ENTITY_INSPECT(MP1::CGrenadeLauncher, CPhysicsActor, GrenadeLauncher, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroidPrimeExo::CPhysicsDummy, CPhysicsActor, MetroidPrimeExoPhysicsDummy, {})
IMGUI_ENTITY_INSPECT(CPlayer, CPhysicsActor, Player, {})
IMGUI_ENTITY_INSPECT(CScriptActor, CPhysicsActor, ScriptActor, {})
IMGUI_ENTITY_INSPECT(CScriptDebris, CPhysicsActor, ScriptDebris, {})
IMGUI_ENTITY_INSPECT(CScriptDock, CPhysicsActor, ScriptDock, {})
IMGUI_ENTITY_INSPECT(CScriptDoor, CPhysicsActor, ScriptDoor, {})
IMGUI_ENTITY_INSPECT(CScriptGunTurret, CPhysicsActor, ScriptGunTurret, {})
IMGUI_ENTITY_INSPECT(CScriptPickup, CPhysicsActor, ScriptPickup, {})
IMGUI_ENTITY_INSPECT(CScriptPlatform, CPhysicsActor, ScriptPlatform, {})
// <- CScriptActor
IMGUI_ENTITY_INSPECT(MP1::CActorContraption, CScriptActor, ActorContraption, {})
IMGUI_ENTITY_INSPECT(CScriptPlayerActor, CScriptActor, PlayerActor, {})
// <- CScriptPlatform
IMGUI_ENTITY_INSPECT(MP1::CRipperControlledPlatform, CScriptPlatform, RipperControlledPlatform, {})
// <- CAi
IMGUI_ENTITY_INSPECT(CDestroyableRock, CAi, DestroyableRock, {})
IMGUI_ENTITY_INSPECT(CPatterned, CAi, Patterned, {})
IMGUI_ENTITY_INSPECT(CPlayer, CPhysicsActor, Player, {})
// <- CPatterned
IMGUI_ENTITY_INSPECT(MP1::CAtomicAlpha, CPatterned, AtomicAlpha, {})
IMGUI_ENTITY_INSPECT(MP1::CAtomicBeta, CPatterned, AtomicBeta, {})
IMGUI_ENTITY_INSPECT(MP1::CBabygoth, CPatterned, Babygoth, {})
IMGUI_ENTITY_INSPECT(MP1::CBeetle, CPatterned, Beetle, {})
IMGUI_ENTITY_INSPECT(MP1::CBloodFlower, CPatterned, BloodFlower, {})
IMGUI_ENTITY_INSPECT(MP1::CBurrower, CPatterned, Burrower, {})
IMGUI_ENTITY_INSPECT(MP1::CChozoGhost, CPatterned, ChozoGhost, {})
IMGUI_ENTITY_INSPECT(MP1::CDrone, CPatterned, Drone, {})
IMGUI_ENTITY_INSPECT(MP1::CElitePirate, CPatterned, ElitePirate, {})
IMGUI_ENTITY_INSPECT(MP1::CEnergyBall, CPatterned, EnergyBall, {})
IMGUI_ENTITY_INSPECT(MP1::CEyeball, CPatterned, EyeBall, {})
IMGUI_ENTITY_INSPECT(MP1::CFireFlea, CPatterned, FireFlea, {})
IMGUI_ENTITY_INSPECT(MP1::CFlaahgra, CPatterned, Flaahgra, {})
IMGUI_ENTITY_INSPECT(MP1::CFlaahgraTentacle, CPatterned, FlaahgraTentacle, {})
IMGUI_ENTITY_INSPECT(MP1::CFlickerBat, CPatterned, FlickerBat, {})
IMGUI_ENTITY_INSPECT(MP1::CFlyingPirate, CPatterned, FlyingPirate, {})
IMGUI_ENTITY_INSPECT(MP1::CIceSheegoth, CPatterned, IceSheegoth, {})
IMGUI_ENTITY_INSPECT(MP1::CJellyZap, CPatterned, JellyZap, {})
IMGUI_ENTITY_INSPECT(MP1::CMagdolite, CPatterned, Magdolite, {})
IMGUI_ENTITY_INSPECT(MP1::CMetaree, CPatterned, Metaree, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroid, CPatterned, Metroid, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroidBeta, CPatterned, MetroidBeta, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroidPrimeEssence, CPatterned, MetroidPrimeEssence, {})
IMGUI_ENTITY_INSPECT(MP1::CMetroidPrimeExo, CPatterned, MetroidPrimeExo, {})
IMGUI_ENTITY_INSPECT(MP1::CNewIntroBoss, CPatterned, NewIntroBoss, {})
IMGUI_ENTITY_INSPECT(MP1::CPhazonHealingNodule, CPatterned, PhazonHealingNodule, {})
IMGUI_ENTITY_INSPECT(MP1::CPuddleSpore, CPatterned, PuddleSpore, {})
IMGUI_ENTITY_INSPECT(MP1::CPuddleToadGamma, CPatterned, PuddleToadGamma, {})
IMGUI_ENTITY_INSPECT(MP1::CPuffer, CPatterned, Puffer, {})
IMGUI_ENTITY_INSPECT(MP1::CRidley, CPatterned, Ridley, {})
IMGUI_ENTITY_INSPECT(MP1::CRipper, CPatterned, Ripper, {})
IMGUI_ENTITY_INSPECT(MP1::CSpacePirate, CPatterned, SpacePirate, {})
IMGUI_ENTITY_INSPECT(MP1::CSpankWeed, CPatterned, SpankWeed, {})
IMGUI_ENTITY_INSPECT(MP1::CThardus, CPatterned, Thardus, {})
IMGUI_ENTITY_INSPECT(MP1::CThardusRockProjectile, CPatterned, ThardusRockProjectile, {})
IMGUI_ENTITY_INSPECT(MP1::CTryclops, CPatterned, Tryclops, {})
IMGUI_ENTITY_INSPECT(CWallWalker, CPatterned, WallWalker, {})
IMGUI_ENTITY_INSPECT(MP1::CParasite, CWallWalker, Parasite, {})
IMGUI_ENTITY_INSPECT(MP1::CSeedling, CWallWalker, Seedling, {})
IMGUI_ENTITY_INSPECT(MP1::CWarWasp, CPatterned, WarWasp, {})
IMGUI_ENTITY_INSPECT(MP1::COmegaPirate, MP1::CElitePirate, OmegaPirate, {})
} // namespace metaforce

View File

@ -18,6 +18,7 @@ class CActorContraption : public CScriptActor {
CDamageInfo x30c_dInfo;
public:
DEFINE_ENTITY
CActorContraption(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const zeus::CAABox& aabox, const CMaterialList& matList, float mass,
float zMomentum, const CHealthInfo& hInfo, const CDamageVulnerability& dVuln,

View File

@ -73,6 +73,7 @@ private:
bool x2b4_25_ : 1 = false;
public:
DEFINE_ENTITY
CBouncyGrenade(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CActorParameters& actParams, TUniqueId parentId,
const SBouncyGrenadeData& data, float velocity, float explodePlayerDistance);

View File

@ -14,6 +14,7 @@ class CDroneLaser : public CActor {
void RenderBeam(u32 w, float f, const zeus::CColor& col, bool) const;
public:
DEFINE_ENTITY
CDroneLaser(TUniqueId uid, TAreaId aId, const zeus::CTransform& xf, CAssetId particle);
void Accept(IVisitor& visitor) override;
void Think(float dt, CStateManager& mgr) override;

View File

@ -18,6 +18,7 @@ class CFireFlea : public CPatterned {
u32 x44_ = 0;
public:
DEFINE_ENTITY
static zeus::CColor sCurrentFadeColor;
CDeathCameraEffect(TUniqueId, TAreaId, std::string_view);

View File

@ -58,6 +58,7 @@ class CFlaahgraRenderer : public CActor {
TUniqueId xe8_owner;
public:
DEFINE_ENTITY
CFlaahgraRenderer(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&);
void AddToRenderer(const zeus::CFrustum& frustum, CStateManager& mgr) override;
@ -75,6 +76,7 @@ class CFlaahgraPlants : public CActor {
TUniqueId x16c_colAct = kInvalidUniqueId;
public:
DEFINE_ENTITY
CFlaahgraPlants(const TToken<CGenDescription>&, const CActorParameters&, TUniqueId, TAreaId, TUniqueId,
const zeus::CTransform&, const CDamageInfo&, const zeus::CVector3f&);

View File

@ -8,6 +8,7 @@ class CFlaahgraProjectile : public CEnergyProjectile {
bool x3d8_bigStrike;
public:
DEFINE_ENTITY
CFlaahgraProjectile(bool bigStrike, const TToken<CWeaponDescription>& desc, const zeus::CTransform& xf,
const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner);

View File

@ -91,6 +91,7 @@ private:
bool x3fe_followPlayer = true;
public:
DEFINE_ENTITY
CGrenadeLauncher(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const zeus::CAABox& bounds, const CHealthInfo& healthInfo,
const CDamageVulnerability& vulnerability, const CActorParameters& actParams, TUniqueId parentId,

View File

@ -31,6 +31,7 @@ class CIceAttackProjectile : public CActor {
int x194_ = 0;
public:
DEFINE_ENTITY
CIceAttackProjectile(const TToken<CGenDescription>& gen1, const TToken<CGenDescription>& gen2,
const TToken<CGenDescription>& gen3, TUniqueId uid, TAreaId areaId, TUniqueId owner, bool active,
const zeus::CTransform& xf, const CDamageInfo& dInfo, const zeus::CAABox& bounds, float f1,

View File

@ -92,6 +92,7 @@ struct SPrimeExoRoomParameters {
class CMetroidPrimeExo : public CPatterned {
class CPhysicsDummy : public CPhysicsActor {
public:
DEFINE_ENTITY
CPhysicsDummy(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info)
: CPhysicsActor(uid, active, name, info, {}, CModelData::CModelDataNull(),
CMaterialList(EMaterialTypes::Target, EMaterialTypes::ExcludeFromRadar), zeus::CAABox{-1.f, 1.f},

View File

@ -24,6 +24,7 @@ class CMetroidPrimeProjectile : public CEnergyProjectile {
SPrimeProjectileInfo x3d8_auxData;
public:
DEFINE_ENTITY
CMetroidPrimeProjectile(bool active, const TToken<CWeaponDescription>& desc, EWeaponType type,
const zeus::CTransform& xf, EMaterialTypes materials, const CDamageInfo& damage,
TUniqueId uid, TAreaId aid, TUniqueId owner, const SPrimeProjectileInfo& auxData,

View File

@ -31,6 +31,7 @@ class CMetroidPrimeRelay : public CEntity {
void ForwardMessageToMetroidPrimeExo(EScriptObjectMessage msg, CStateManager& mgr);
void GetOrBuildMetroidPrimeExo(CStateManager& mgr);
public:
DEFINE_ENTITY
CMetroidPrimeRelay(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active,
const zeus::CTransform& xf, const zeus::CVector3f& scale, SPrimeExoParameters&& parms, float f1,
float f2, float f3, u32 w1, bool b1, u32 w2, const CHealthInfo& hInfo1, const CHealthInfo& hInfo2,

View File

@ -17,6 +17,7 @@ private:
CTexturedQuadFilter m_thermalSpotSubtract;
public:
DEFINE_ENTITY
CFlash(TUniqueId uid, const CEntityInfo& info, const zeus::CVector3f& pos, TLockedToken<CTexture>& thermalSpot,
float delay);
@ -120,6 +121,7 @@ private:
float xb8c_avoidStaticCollisionTime = 0.f; // not initialized in ctr
public:
DEFINE_ENTITY
COmegaPirate(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CPatternedInfo& pInfo, const CActorParameters& actParms, CElitePirateData data,
CAssetId skeletonModelId, CAssetId skeletonSkinRulesId, CAssetId skeletonLayoutInfoId);

View File

@ -35,6 +35,7 @@ private:
bool x1e0_25_ : 1 = false;
public:
DEFINE_ENTITY
CPhazonPool(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
const zeus::CVector3f& scale, bool active, CAssetId w1, CAssetId w2, CAssetId w3, CAssetId w4, u32 p11,
const CDamageInfo& dInfo, const zeus::CVector3f& orientedForce, ETriggerFlags triggerFlags, bool p15,

View File

@ -44,6 +44,7 @@ class CRipperControlledPlatform : public CScriptPlatform {
float x35c_yaw;
public:
DEFINE_ENTITY
CRipperControlledPlatform(TUniqueId, TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&,
const zeus::CAABox&, bool, const std::optional<TLockedToken<CCollidableOBBTreeGroup>>&);

View File

@ -57,6 +57,7 @@ private:
TUniqueId x980_id2 = kInvalidUniqueId;
public:
DEFINE_ENTITY
CShockWave(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
TUniqueId parent, const SShockWaveData& data, float minActiveTime, float knockback);

View File

@ -40,6 +40,7 @@ private:
void SetCollisionResultData(EDamageType dType, CRayCastResult& res, TUniqueId id);
public:
DEFINE_ENTITY
CBeamProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
const zeus::CTransform& xf, s32 maxLength, float beamRadius, float travelSpeed,
EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,

View File

@ -27,6 +27,7 @@ class CBomb : public CWeapon {
bool x190_26_disableFuse : 1 = false;
public:
DEFINE_ENTITY
CBomb(const TCachedToken<CGenDescription>& particle1, const TCachedToken<CGenDescription>& particle2, TUniqueId uid,
TAreaId aid, TUniqueId playerId, float f1, const zeus::CTransform& xf, const CDamageInfo& dInfo);

View File

@ -26,6 +26,7 @@ class CElectricBeamProjectile : public CBeamProjectile {
bool x48c_ = false;
public:
DEFINE_ENTITY
CElectricBeamProjectile(const TToken<CWeaponDescription>&, EWeaponType, const SElectricBeamInfo&,
const zeus::CTransform&, EMaterialTypes, const CDamageInfo&, TUniqueId, TAreaId, TUniqueId,
EProjectileAttrib);

View File

@ -18,6 +18,7 @@ class CEnergyProjectile : public CGameProjectile {
void StopProjectile(CStateManager& mgr);
public:
DEFINE_ENTITY
CEnergyProjectile(bool active, const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
EMaterialTypes excludeMat, const CDamageInfo& damage, TUniqueId uid, TAreaId aid, TUniqueId owner,
TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater, const zeus::CVector3f& scale,

View File

@ -42,6 +42,7 @@ private:
CRayCastResult DoCollisionCheck(TUniqueId& idOut, const zeus::CAABox& aabb, CStateManager& mgr);
void ApplyDamageToActor(CStateManager& mgr, TUniqueId id, float dt);
public:
DEFINE_ENTITY
CFlameThrower(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
const CFlameInfo& flameInfo, const zeus::CTransform& xf, EMaterialTypes matType,
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aId, TUniqueId owner, EProjectileAttrib attribs,

View File

@ -55,6 +55,7 @@ protected:
bool x2e4_28_sendProjectileCollideMsg : 1;
public:
DEFINE_ENTITY
CGameProjectile(bool active, const TToken<CWeaponDescription>&, std::string_view name, EWeaponType wType,
const zeus::CTransform& xf, EMaterialTypes excludeMat, const CDamageInfo& dInfo, TUniqueId uid,
TAreaId aid, TUniqueId owner, TUniqueId homingTarget, EProjectileAttrib attribs, bool underwater,

View File

@ -99,6 +99,7 @@ public:
// NFTSecondaryFire
// NFTSecondarySparks
// <invalid>
DEFINE_ENTITY
CNewFlameThrower(const TToken<CWeaponDescription>& desc, std::string_view name, EWeaponType wType,
const std::array<CAssetId, 8>& resInfo, const zeus::CTransform& xf, EMaterialTypes matType,
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner, EProjectileAttrib attribs);

View File

@ -116,6 +116,7 @@ private:
std::string_view name, CStateManager& mgr);
void UpdatePlayerEffects(float dt, CStateManager& mgr);
public:
DEFINE_ENTITY
CPlasmaProjectile(const TToken<CWeaponDescription>& wDesc, std::string_view name, EWeaponType wType,
const CBeamInfo& bInfo, const zeus::CTransform& xf, EMaterialTypes matType,
const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,

View File

@ -21,6 +21,7 @@ class CPowerBomb : public CWeapon {
float x16c_radius;
public:
DEFINE_ENTITY
CPowerBomb(const TToken<CGenDescription>& particle, TUniqueId uid, TAreaId aid, TUniqueId playerId,
const zeus::CTransform& xf, const CDamageInfo& dInfo);

View File

@ -12,6 +12,7 @@ class CTargetableProjectile : public CEnergyProjectile {
CDamageInfo x3e0_damage;
public:
DEFINE_ENTITY
CTargetableProjectile(const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
EMaterialTypes materials, const CDamageInfo& damage, const CDamageInfo& damage2, TUniqueId uid,
TAreaId aid, TUniqueId owner, const TLockedToken<CWeaponDescription>& weapDesc,

View File

@ -47,6 +47,7 @@ class CWaveBuster : public CGameProjectile {
bool x3d0_28_ : 1 = true;
public:
DEFINE_ENTITY
CWaveBuster(const TToken<CWeaponDescription>& desc, EWeaponType type, const zeus::CTransform& xf,
EMaterialTypes matType, const CDamageInfo& dInfo, TUniqueId uid, TAreaId aid, TUniqueId owner,
TUniqueId homingTarget, EProjectileAttrib attrib);

View File

@ -23,6 +23,7 @@ protected:
float x154_interferenceDuration = 0.f;
public:
DEFINE_ENTITY
CWeapon(TUniqueId uid, TAreaId aid, bool active, TUniqueId owner, EWeaponType type, std::string_view name,
const zeus::CTransform& xf, const CMaterialFilter& filter, const CMaterialList& mList, const CDamageInfo&,
EProjectileAttrib attribs, CModelData&& mData);

View File

@ -91,6 +91,7 @@ public:
Done,
};
DEFINE_ENTITY
CActor(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform&,
CModelData&& mData, const CMaterialList& list, const CActorParameters& params, TUniqueId otherUid);
@ -195,7 +196,5 @@ public:
void MoveScannableObjectInfoToActor(CActor*, CStateManager&);
const zeus::CAABox& GetRenderBounds() const { return x9c_renderBounds; }
void SetNotInSortedLists(bool notIn) { xe4_27_notInSortedLists = notIn; }
IMGUI_ENTITY_PROTOTYPES
};
} // namespace metaforce

View File

@ -31,6 +31,7 @@ protected:
TLockedToken<CStateMachine> x2c8_stateMachine;
public:
DEFINE_ENTITY
CAi(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const zeus::CAABox& box, float mass, const CHealthInfo& hInfo, const CDamageVulnerability&,
const CMaterialList& list, CAssetId fsm, const CActorParameters&, float f1, float f2);
@ -185,8 +186,6 @@ public:
virtual bool FixedRandom(CStateManager&, float) { return false; }
virtual bool IsDizzy(CStateManager&, float) { return false; }
virtual bool ShouldCallForBackup(CStateManager&, float) { return false; }
IMGUI_ENTITY_PROTOTYPES
};
} // namespace metaforce

View File

@ -30,6 +30,7 @@ class CAmbientAI : public CPhysicsActor {
bool x2e8_25_animating : 1 = false;
public:
DEFINE_ENTITY
CAmbientAI(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, CModelData&&,
const zeus::CAABox&, const CMaterialList&, float, const CHealthInfo&, const CDamageVulnerability&,
const CActorParameters&, float, float, s32, s32, bool);

View File

@ -21,6 +21,7 @@ class CDestroyableRock : public CAi {
bool x341_;
public:
DEFINE_ENTITY
CDestroyableRock(TUniqueId id, bool active, std::string_view name, const CEntityInfo& info,
const zeus::CTransform& xf, CModelData&& modelData, float mass, const CHealthInfo& health,
const CDamageVulnerability& vulnerability, const CMaterialList& matList, CAssetId fsm,

View File

@ -6,6 +6,7 @@ namespace metaforce {
class CEffect : public CActor {
public:
DEFINE_ENTITY
CEffect(TUniqueId uid, const CEntityInfo& info, bool active, std::string_view name, const zeus::CTransform& xf);
void AddToRenderer(const zeus::CFrustum&, CStateManager&) override {}

View File

@ -19,6 +19,8 @@
#define IMGUI_ENTITY_PROTOTYPES
#endif
#define DEFINE_ENTITY IMGUI_ENTITY_PROTOTYPES
namespace metaforce {
class CStateManager;
class IVisitor;

View File

@ -22,6 +22,7 @@ class CExplosion : public CEffect {
float xf8_time = 0.f;
public:
DEFINE_ENTITY
CExplosion(const TLockedToken<CGenDescription>& particle, TUniqueId uid, bool active, const CEntityInfo& info,
std::string_view name, const zeus::CTransform& xf, u32, const zeus::CVector3f& scale,
const zeus::CColor& color);

View File

@ -28,6 +28,7 @@ class CFire : public CActor {
float x15c_ = 0.f;
public:
DEFINE_ENTITY
CFire(TToken<CGenDescription>, TUniqueId, TAreaId, bool, TUniqueId, const zeus::CTransform&, const CDamageInfo&,
const zeus::CAABox&, const zeus::CVector3f&, bool, CAssetId, bool, bool, bool, float, float, float, float);

View File

@ -126,6 +126,7 @@ class CFishCloud : public CActor {
void RenderBoid(int idx, const CBoid& boid, u32& drawMask, bool thermalHot, const CModelFlags& flags) const;
public:
DEFINE_ENTITY
CFishCloud(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info,
const zeus::CVector3f& scale, const zeus::CTransform& xf, CModelData&& mData,
const CAnimRes& aRes, u32 numBoids, float speed, float separationRadius, float cohesionMagnitude,

View File

@ -10,6 +10,7 @@ class CFishCloudModifier : public CActor {
bool xf1_swirl;
public:
DEFINE_ENTITY
CFishCloudModifier(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& eInfo,
const zeus::CVector3f& pos, bool isRepulsor, bool swirl, float radius,
float priority);

View File

@ -18,6 +18,7 @@ class CGameLight : public CActor {
std::optional<CStaticRes> m_debugRes;
std::unique_ptr<CModelData> m_debugModel;
public:
DEFINE_ENTITY
CGameLight(TUniqueId uid, TAreaId aid, bool active, std::string_view name, const zeus::CTransform& xf,
TUniqueId parentId, const CLight& light, u32 sourceId, u32 priority, float lifeTime);

View File

@ -30,6 +30,7 @@ class CHUDBillboardEffect : public CEffect {
static float CalcGenRate();
public:
DEFINE_ENTITY
CHUDBillboardEffect(const std::optional<TToken<CGenDescription>>& particle,
const std::optional<TToken<CElectricDescription>>& electric, TUniqueId uid,
bool active, std::string_view name, float dist, const zeus::CVector3f& scale0,

View File

@ -6,6 +6,7 @@ namespace metaforce {
class CIceImpact : public CEffect {
public:
DEFINE_ENTITY
CIceImpact(const TLockedToken<CGenDescription>& particle, TUniqueId uid, TAreaId aid, bool active,
std::string_view name, const zeus::CTransform& xf, u32 flags, const zeus::CVector3f& scale,
const zeus::CColor& color);

View File

@ -19,7 +19,7 @@
#include <zeus/CVector3f.hpp>
#ifndef DEFINE_PATTERNED
#define DEFINE_PATTERNED(type) static constexpr ECharacter CharacterType = ECharacter::type
#define DEFINE_PATTERNED(type) DEFINE_ENTITY static constexpr ECharacter CharacterType = ECharacter::type
#endif
namespace metaforce {
@ -247,6 +247,7 @@ protected:
float GetAnimationDistance(const CPASAnimParmData& data) const;
public:
DEFINE_ENTITY
CPatterned(ECharacter character, TUniqueId uid, std::string_view name, EFlavorType flavor, const CEntityInfo& info,
const zeus::CTransform& xf, CModelData&& mData, const CPatternedInfo& pinfo,
CPatterned::EMovementType movement, EColliderType collider, EBodyType body, const CActorParameters& params,
@ -419,7 +420,5 @@ public:
static void Initialize();
// endregion
IMGUI_ENTITY_PROTOTYPES
};
} // namespace metaforce

View File

@ -112,6 +112,7 @@ protected:
u32 x250_numTicksPartialUpdate = 0;
public:
DEFINE_ENTITY
CPhysicsActor(TUniqueId uid, bool active, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CMaterialList& matList, const zeus::CAABox& box, const SMoverData& moverData,
const CActorParameters& actorParms, float stepUp, float stepDown);
@ -208,7 +209,5 @@ public:
void UseCollisionImpulses();
static constexpr float GravityConstant() { return 9.81f * 2.5f; } /* 9.81 m/s ^ 2 is normal acceleration under earth gravity, Tallon 4 is 2.5 times that */
IMGUI_ENTITY_PROTOTYPES
};
} // namespace metaforce

View File

@ -346,6 +346,7 @@ private:
float CalculateOrbitMinDistance(EPlayerOrbitType type) const;
public:
DEFINE_ENTITY
CPlayer(TUniqueId uid, const zeus::CTransform& xf, const zeus::CAABox& aabb, CAssetId resId,
const zeus::CVector3f& playerScale, float mass, float stepUp, float stepDown, float ballRadius,
const CMaterialList& ml);
@ -622,7 +623,5 @@ public:
bool IsInWaterMovement() const { return x9c4_31_inWaterMovement; }
void SetNoDamageLoopSfx(bool val) { x9c7_24_noDamageLoopSfx = val; }
void SetAccelerationChangeTimer(float time) { x2d4_accelerationChangeTimer = time; }
IMGUI_ENTITY_PROTOTYPES
};
} // namespace metaforce

View File

@ -8,6 +8,7 @@ class CRepulsor : public CActor {
float xe8_affectRadius;
public:
DEFINE_ENTITY
CRepulsor(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&, float);
void Accept(IVisitor& visitor) override;

View File

@ -28,6 +28,7 @@ protected:
bool x2e3_24_isPlayerActor : 1 = false;
public:
DEFINE_ENTITY
CScriptActor(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const zeus::CAABox& aabb, float mass, float zMomentum, const CMaterialList& matList,
const CHealthInfo& hInfo, const CDamageVulnerability& dVuln, const CActorParameters& actParms,

View File

@ -20,6 +20,7 @@ private:
bool x44_29_ : 1 = false;
public:
DEFINE_ENTITY
CScriptActorKeyframe(TUniqueId uid, std::string_view name, const CEntityInfo& info, s32 animId, bool looping,
float lifetime, bool isPassive, u32 fadeOut, bool active, float totalPlayback);

View File

@ -29,6 +29,7 @@ class CScriptActorRotate : public CEntity {
void UpdatePlatformRiders(std::vector<SRiders>&, CScriptPlatform&, const zeus::CTransform&, CStateManager&);
public:
DEFINE_ENTITY
CScriptActorRotate(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, float, bool, bool, bool);
void Accept(IVisitor& visitor) override;

View File

@ -19,6 +19,7 @@ private:
float x110_timeRemaining = 0.f;
public:
DEFINE_ENTITY
CScriptAiJumpPoint(TUniqueId, std::string_view, const CEntityInfo&, zeus::CTransform&, bool, float);
void Accept(IVisitor& visitor) override;

View File

@ -15,6 +15,7 @@ class CScriptAreaAttributes : public CEntity {
EPhazonType x50_phazon;
public:
DEFINE_ENTITY
CScriptAreaAttributes(TUniqueId uid, const CEntityInfo& info, bool showSkybox, EEnvFxType fxType, float envFxDensity,
float thermalHeat, float xrayFogDistance, float worldLightingLevel, CAssetId skybox,
EPhazonType phazonType);

View File

@ -16,6 +16,7 @@ class CScriptBallTrigger : public CScriptTrigger {
bool x168_25_stopPlayer : 1;
public:
DEFINE_ENTITY
CScriptBallTrigger(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, const zeus::CVector3f&,
bool, float, float, float, const zeus::CVector3f&, bool);

View File

@ -15,6 +15,7 @@ class CScriptBeam : public CActor {
TUniqueId x154_projectileId;
public:
DEFINE_ENTITY
CScriptBeam(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool,
const TToken<CWeaponDescription>&, const CBeamInfo&, const CDamageInfo&);

View File

@ -15,6 +15,7 @@ class CScriptCameraBlurKeyframe : public CEntity {
float x44_timeOut;
public:
DEFINE_ENTITY
CScriptCameraBlurKeyframe(TUniqueId uid, std::string_view name, const CEntityInfo& info, EBlurType type, float amount,
u32 unk, float timeIn, float timeOut, bool active);

View File

@ -20,6 +20,7 @@ class CScriptCameraFilterKeyframe : public CEntity {
CAssetId x50_txtr;
public:
DEFINE_ENTITY
CScriptCameraFilterKeyframe(TUniqueId uid, std::string_view name, const CEntityInfo& info, EFilterType type,
EFilterShape shape, u32 filterIdx, u32 unk, const zeus::CColor& color, float timeIn,
float timeOut, CAssetId txtr, bool active);

View File

@ -89,6 +89,7 @@ class CScriptCameraHint : public CActor {
void RemoveHelper(TUniqueId id);
public:
DEFINE_ENTITY
CScriptCameraHint(TUniqueId, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, bool active,
s32 priority, CBallCamera::EBallCameraBehaviour behaviour, u32 overrideFlags, float minDist,
float maxDist, float backwardsDist, const zeus::CVector3f& lookAtOffset,

View File

@ -18,6 +18,7 @@ class CScriptCameraHintTrigger : public CActor {
bool x130_27_playerWasInside : 1 = false;
public:
DEFINE_ENTITY
CScriptCameraHintTrigger(TUniqueId uid, bool active, std::string_view name,
const CEntityInfo& info, const zeus::CVector3f& scale,
const zeus::CTransform& xf, bool deactivateOnEnter,

View File

@ -21,6 +21,7 @@ class CScriptCameraPitchVolume : public CActor {
bool x13c_25_occupied : 1 = false;
public:
DEFINE_ENTITY
CScriptCameraPitchVolume(TUniqueId, bool, std::string_view, const CEntityInfo&, const zeus::CVector3f&,
const zeus::CTransform&, const zeus::CRelAngle&, const zeus::CRelAngle&, float);

View File

@ -11,6 +11,7 @@ class CScriptCameraShaker : public CEntity {
CCameraShakeData x34_shakeData;
public:
DEFINE_ENTITY
CScriptCameraShaker(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active,
const CCameraShakeData& shakeData);
void Accept(IVisitor& visitor) override;

View File

@ -12,6 +12,7 @@ class CScriptCameraWaypoint : public CActor {
u32 xec_;
public:
DEFINE_ENTITY
CScriptCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
bool active, float hfov, u32);

View File

@ -41,6 +41,7 @@ private:
bool x55_24_isFadeOutHelper : 1 = false;
public:
DEFINE_ENTITY
CScriptColorModulate(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CColor& colorA,
const zeus::CColor& colorB, EBlendMode blendMode, float timeA2B, float timeB2A, bool doReverse,
bool resetTargetWhenDone, bool depthCompare, bool depthUpdate, bool depthBackwards, bool active);

View File

@ -16,6 +16,7 @@ class CScriptControllerAction : public CEntity {
bool x3c_26_pressed : 1 = false;
public:
DEFINE_ENTITY
CScriptControllerAction(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active,
ControlMapper::ECommands command, bool b1, u32 w1, bool b2);
void Accept(IVisitor& visitor) override;

View File

@ -14,6 +14,7 @@ class CScriptCounter : public CEntity {
bool x40_autoReset;
public:
DEFINE_ENTITY
CScriptCounter(TUniqueId, std::string_view name, const CEntityInfo& info, s32, s32, bool, bool);
void Accept(IVisitor& visitor) override;

View File

@ -27,6 +27,7 @@ class CScriptCoverPoint : public CActor {
float x11c_timeLeft = 0.f;
public:
DEFINE_ENTITY
CScriptCoverPoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, zeus::CTransform xf, bool active,
u32 flags, bool crouch, float horizontalAngle, float verticalAngle, float coverTime);

View File

@ -45,6 +45,7 @@ public:
Orbit,
};
DEFINE_ENTITY
CScriptDamageableTrigger(TUniqueId uid, std::string_view name, const CEntityInfo& info,
const zeus::CVector3f& position, const zeus::CVector3f& extent, const CHealthInfo& hInfo,
const CDamageVulnerability& dVuln, u32 faceFlag, CAssetId patternTex1, CAssetId patternTex2,

View File

@ -55,6 +55,7 @@ private:
TReservedAverage<float, 8> x2e0_speedAvg;
public:
DEFINE_ENTITY
CScriptDebris(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CActorParameters& aParams, CAssetId particleId,
const zeus::CVector3f& particleScale, float zImpulse, const zeus::CVector3f& velocity,

View File

@ -11,6 +11,7 @@ class CScriptDebugCameraWaypoint : public CActor {
u32 xe8_w1;
public:
DEFINE_ENTITY
CScriptDebugCameraWaypoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
u32 w1);

View File

@ -23,6 +23,7 @@ class CScriptDistanceFog : public CEntity {
bool x61_nonZero;
public:
DEFINE_ENTITY
CScriptDistanceFog(TUniqueId, std::string_view, const CEntityInfo&, ERglFogMode, const zeus::CColor&,
const zeus::CVector2f&, float, const zeus::CVector2f&, bool, bool, float, float, float, float);

View File

@ -20,6 +20,7 @@ class CScriptDock : public CPhysicsActor {
bool x268_26_areaPostConstructed : 1 = false;
public:
DEFINE_ENTITY
CScriptDock(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CVector3f& position,
const zeus::CVector3f& extent, s32 dock, TAreaId area, bool active, s32 dockReferenceCount,
bool loadConnected);

View File

@ -10,6 +10,7 @@ class CScriptDockAreaChange : public CEntity {
s32 x34_dockReference;
public:
DEFINE_ENTITY
CScriptDockAreaChange(TUniqueId, std::string_view, const CEntityInfo&, s32, bool);
void Accept(IVisitor& visitor) override;

View File

@ -43,6 +43,7 @@ public:
bool x2a8_30_doClose : 1 = false;
public:
DEFINE_ENTITY
CScriptDoor(TUniqueId, std::string_view name, const CEntityInfo& info, const zeus::CTransform&, CModelData&&,
const CActorParameters&, const zeus::CVector3f&, const zeus::CAABox&, bool active, bool open, bool, float,
bool ballDoor);

View File

@ -21,6 +21,7 @@ class CScriptEMPulse : public CActor {
zeus::CAABox CalculateBoundingBox() const;
public:
DEFINE_ENTITY
CScriptEMPulse(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool, float, float, float,
float, float, float, float, CAssetId);

View File

@ -44,6 +44,7 @@ class CScriptEffect : public CActor {
float x140_destroyDelayTimer = 0.f;
public:
DEFINE_ENTITY
CScriptEffect(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
const zeus::CVector3f& scale, CAssetId partId, CAssetId elscId, bool hotInThermal,
bool noTimerUnlessAreaOccluded, bool rebuildSystemsOnActivate, bool active, bool useRateInverseCamDist,

View File

@ -18,6 +18,7 @@ class CScriptGenerator : public CEntity {
float x4c_maxScale;
public:
DEFINE_ENTITY
CScriptGenerator(TUniqueId uid, std::string_view name, const CEntityInfo& info, u32 spawnCount, bool noReuseFollowers,
const zeus::CVector3f& vec1, bool noInheritXf, bool active, float minScale, float maxScale);

View File

@ -13,6 +13,7 @@ class CScriptGrapplePoint : public CActor {
CGrappleParameters x100_parameters;
public:
DEFINE_ENTITY
CScriptGrapplePoint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& transform,
bool active, const CGrappleParameters& params);

View File

@ -212,6 +212,7 @@ private:
bool IsInsignificantRotation(float) const;
public:
DEFINE_ENTITY
CScriptGunTurret(TUniqueId uid, std::string_view name, ETurretComponent comp, const CEntityInfo& info,
const zeus::CTransform& xf, CModelData&& mData, const zeus::CAABox& aabb, const CHealthInfo& hInfo,
const CDamageVulnerability& dVuln, const CActorParameters& aParms,

View File

@ -23,6 +23,7 @@ public:
private:
public:
DEFINE_ENTITY
CScriptHUDMemo(TUniqueId, std::string_view, const CEntityInfo&, const CHUDMemoParms&, CScriptHUDMemo::EDisplayType,
CAssetId, bool);

View File

@ -99,6 +99,7 @@ class CScriptMazeNode : public CActor {
bool x13c_26_gateActive : 1 = true;
public:
DEFINE_ENTITY
CScriptMazeNode(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
bool active, s32 col, s32 row, s32 side, const zeus::CVector3f& actorPos,
const zeus::CVector3f& triggerPos, const zeus::CVector3f& effectPos);

View File

@ -12,6 +12,7 @@ class CScriptMemoryRelay : public CEntity {
bool x34_26_ignoreMessages;
public:
DEFINE_ENTITY
CScriptMemoryRelay(TUniqueId, std::string_view name, const CEntityInfo&, bool, bool, bool);
void Accept(IVisitor& visitor) override;
void AcceptScriptMsg(EScriptObjectMessage msg, TUniqueId objId, CStateManager& stateMgr) override;

View File

@ -19,6 +19,7 @@ class CScriptMidi : public CEntity {
void StopInternal(float fadeTime);
public:
DEFINE_ENTITY
CScriptMidi(TUniqueId id, const CEntityInfo& info, std::string_view name, bool active, CAssetId csng, float, float,
s32);

View File

@ -24,6 +24,7 @@ class CScriptPickup : public CPhysicsActor {
bool x28c_26_enableTractorTest : 1 = false;
public:
DEFINE_ENTITY
CScriptPickup(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CActorParameters& aParams, const zeus::CAABox& aabb,
CPlayerState::EItemType itemType, s32 amount, s32 capacity, CAssetId pickupEffect,

View File

@ -17,6 +17,7 @@ class CScriptPickupGenerator : public CEntity {
void GeneratePickup(CStateManager& mgr, TEditorId templateId, TUniqueId generatorId) const;
public:
DEFINE_ENTITY
CScriptPickupGenerator(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, float, bool);
void Accept(IVisitor& visitor) override;

View File

@ -75,6 +75,7 @@ class CScriptPlatform : public CPhysicsActor {
std::optional<CAABoxShader> m_boxFilter;
public:
DEFINE_ENTITY
CScriptPlatform(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
CModelData&& mData, const CActorParameters& actParms, const zeus::CAABox& aabb, float speed,
bool detectCollision, float xrayAlpha, bool active, const CHealthInfo& hInfo,

View File

@ -52,6 +52,7 @@ class CScriptPlayerActor : public CScriptActor {
void TouchModels_Internal(const CStateManager& mgr) const;
public:
DEFINE_ENTITY
CScriptPlayerActor(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
const CAnimRes& animRes, CModelData&& mData, const zeus::CAABox& aabox, bool setBoundingBox,
const CMaterialList& list, float mass, float zMomentum, const CHealthInfo& hInfo,

View File

@ -18,6 +18,7 @@ class CScriptPlayerHint : public CActor {
void RemoveFromObjectList(TUniqueId uid);
public:
DEFINE_ENTITY
CScriptPlayerHint(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf,
bool active, u32 priority, u32 overrideFlags);
void Accept(IVisitor& visit) override;

View File

@ -19,6 +19,7 @@ private:
EControlCommandOption x44_ctrlCmdOpt;
public:
DEFINE_ENTITY
CScriptPlayerStateChange(TUniqueId, std::string_view, const CEntityInfo&, bool, u32, u32, u32, EControl,
EControlCommandOption);
void Accept(IVisitor& visit) override;

View File

@ -11,6 +11,7 @@ private:
float xe8_pointSize;
public:
DEFINE_ENTITY
CScriptPointOfInterest(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool,
const CScannableParameters&, float);

View File

@ -12,6 +12,7 @@ class CScriptRandomRelay : public CEntity {
bool x3c_percentSize;
public:
DEFINE_ENTITY
CScriptRandomRelay(TUniqueId uid, std::string_view name, const CEntityInfo& info, s32 sendSetSize,
s32 sendSetVariance, bool percentSize, bool active);

View File

@ -11,6 +11,7 @@ class CScriptRelay : public CEntity {
u32 x38_sendCount = 0;
public:
DEFINE_ENTITY
CScriptRelay(TUniqueId, std::string_view, const CEntityInfo&, bool);
void Accept(IVisitor& visitor) override;

View File

@ -12,6 +12,7 @@ class CScriptRipple : public CEntity {
zeus::CVector3f x38_center;
public:
DEFINE_ENTITY
CScriptRipple(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CVector3f&, bool, float);
void Accept(IVisitor&) override;

View File

@ -27,6 +27,7 @@ class CScriptRoomAcoustics : public CEntity {
amuse::EffectDelayInfo x80_delayInfo;
public:
DEFINE_ENTITY
CScriptRoomAcoustics(TUniqueId uid, std::string_view name, const CEntityInfo& info, bool active, u32 volScale,
bool revHi, bool revHiDis, float revHiColoration, float revHiMix, float revHiTime,
float revHiDamping, float revHiPreDelay, float revHiCrosstalk, bool chorus, float baseDelay,

View File

@ -24,6 +24,7 @@ class CScriptShadowProjector : public CActor {
bool x110_25_shadowInvalidated : 1 = false;
public:
DEFINE_ENTITY
CScriptShadowProjector(TUniqueId, std::string_view, const CEntityInfo&, const zeus::CTransform&, bool,
const zeus::CVector3f&, bool, float, float, float, float, s32);

View File

@ -42,6 +42,7 @@ class CScriptSound : public CActor {
static float GetOccludedVolumeAmount(const zeus::CVector3f& pos, const CStateManager& mgr);
public:
DEFINE_ENTITY
CScriptSound(TUniqueId uid, std::string_view name, const CEntityInfo& info, const zeus::CTransform& xf, u16 soundId,
bool active, float maxDist, float distComp, float startDelay, u32 minVol, u32 vol, u32 w3, u32 prio,
u32 pan, u32 w6, bool looped, bool nonEmitter, bool autoStart, bool occlusionTest, bool acoustics,

Some files were not shown because too many files have changed in this diff Show More