2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 23:47:42 +00:00

New code style refactor

This commit is contained in:
Jack Andersen
2018-12-07 19:30:43 -10:00
parent 41ae32be31
commit 636c82a568
1451 changed files with 171430 additions and 203303 deletions

View File

@@ -8,75 +8,43 @@
#include "Camera/CGameCamera.hpp"
#include "TCastTo.hpp"
namespace urde
{
namespace urde {
CActorList::CActorList()
: CObjectList(EGameObjectList::Actor) {}
CActorList::CActorList() : CObjectList(EGameObjectList::Actor) {}
bool CActorList::IsQualified(const CEntity& ent)
{
return TCastToConstPtr<CActor>(ent);
bool CActorList::IsQualified(const CEntity& ent) { return TCastToConstPtr<CActor>(ent); }
CPhysicsActorList::CPhysicsActorList() : CObjectList(EGameObjectList::PhysicsActor) {}
bool CPhysicsActorList::IsQualified(const CEntity& ent) { return TCastToConstPtr<CPhysicsActor>(ent); }
CGameCameraList::CGameCameraList() : CObjectList(EGameObjectList::GameCamera) {}
bool CGameCameraList::IsQualified(const CEntity& ent) { return TCastToConstPtr<CGameCamera>(ent); }
CListeningAiList::CListeningAiList() : CObjectList(EGameObjectList::ListeningAi) {}
bool CListeningAiList::IsQualified(const CEntity& ent) {
TCastToConstPtr<CAi> ai(ent);
return ai && ai->IsListening();
}
CPhysicsActorList::CPhysicsActorList()
: CObjectList(EGameObjectList::PhysicsActor) {}
CAiWaypointList::CAiWaypointList() : CObjectList(EGameObjectList::AiWaypoint) {}
bool CPhysicsActorList::IsQualified(const CEntity& ent)
{
return TCastToConstPtr<CPhysicsActor>(ent);
bool CAiWaypointList::IsQualified(const CEntity& ent) {
return TCastToConstPtr<CScriptCoverPoint>(ent) || TCastToConstPtr<CScriptAiJumpPoint>(ent);
}
CGameCameraList::CGameCameraList()
: CObjectList(EGameObjectList::GameCamera) {}
CPlatformAndDoorList::CPlatformAndDoorList() : CObjectList(EGameObjectList::PlatformAndDoor) {}
bool CGameCameraList::IsQualified(const CEntity& ent)
{
return TCastToConstPtr<CGameCamera>(ent);
}
bool CPlatformAndDoorList::IsQualified(const CEntity& ent) { return IsDoor(ent) || IsPlatform(ent); }
CListeningAiList::CListeningAiList()
: CObjectList(EGameObjectList::ListeningAi) {}
bool CPlatformAndDoorList::IsDoor(const CEntity& ent) { return TCastToConstPtr<CScriptDoor>(ent); }
bool CListeningAiList::IsQualified(const CEntity& ent)
{
TCastToConstPtr<CAi> ai(ent);
return ai && ai->IsListening();
}
bool CPlatformAndDoorList::IsPlatform(const CEntity& ent) { return TCastToConstPtr<CScriptPlatform>(ent); }
CAiWaypointList::CAiWaypointList()
: CObjectList(EGameObjectList::AiWaypoint) {}
CGameLightList::CGameLightList() : CObjectList(EGameObjectList::GameLight) {}
bool CAiWaypointList::IsQualified(const CEntity& ent)
{
return TCastToConstPtr<CScriptCoverPoint>(ent) ||
TCastToConstPtr<CScriptAiJumpPoint>(ent);
}
bool CGameLightList::IsQualified(const CEntity& lt) { return TCastToConstPtr<CGameLight>(lt); }
CPlatformAndDoorList::CPlatformAndDoorList()
: CObjectList(EGameObjectList::PlatformAndDoor) {}
bool CPlatformAndDoorList::IsQualified(const CEntity& ent)
{
return IsDoor(ent) || IsPlatform(ent);
}
bool CPlatformAndDoorList::IsDoor(const CEntity& ent)
{
return TCastToConstPtr<CScriptDoor>(ent);
}
bool CPlatformAndDoorList::IsPlatform(const CEntity& ent)
{
return TCastToConstPtr<CScriptPlatform>(ent);
}
CGameLightList::CGameLightList()
: CObjectList(EGameObjectList::GameLight) {}
bool CGameLightList::IsQualified(const CEntity& lt)
{
return TCastToConstPtr<CGameLight>(lt);
}
}
} // namespace urde