metaforce/Runtime/GameObjectLists.cpp

51 lines
1.9 KiB
C++
Raw Normal View History

#include "GameObjectLists.hpp"
#include "World/CGameLight.hpp"
#include "World/CScriptDoor.hpp"
#include "World/CScriptPlatform.hpp"
#include "World/CScriptCoverPoint.hpp"
#include "World/CScriptAiJumpPoint.hpp"
#include "World/CPatterned.hpp"
#include "Camera/CGameCamera.hpp"
#include "TCastTo.hpp" // Generated file, do not modify include path
2018-12-07 21:30:43 -08:00
namespace urde {
2018-12-07 21:30:43 -08:00
CActorList::CActorList() : CObjectList(EGameObjectList::Actor) {}
2018-12-07 21:30:43 -08:00
bool CActorList::IsQualified(const CEntity& ent) { return TCastToConstPtr<CActor>(ent); }
2018-12-07 21:30:43 -08:00
CPhysicsActorList::CPhysicsActorList() : CObjectList(EGameObjectList::PhysicsActor) {}
2018-12-07 21:30:43 -08:00
bool CPhysicsActorList::IsQualified(const CEntity& ent) { return TCastToConstPtr<CPhysicsActor>(ent); }
2018-12-07 21:30:43 -08:00
CGameCameraList::CGameCameraList() : CObjectList(EGameObjectList::GameCamera) {}
2018-12-07 21:30:43 -08:00
bool CGameCameraList::IsQualified(const CEntity& ent) { return TCastToConstPtr<CGameCamera>(ent); }
2018-12-07 21:30:43 -08:00
CListeningAiList::CListeningAiList() : CObjectList(EGameObjectList::ListeningAi) {}
2018-12-07 21:30:43 -08:00
bool CListeningAiList::IsQualified(const CEntity& ent) {
TCastToConstPtr<CAi> ai(ent);
return ai && ai->IsListening();
}
2018-12-07 21:30:43 -08:00
CAiWaypointList::CAiWaypointList() : CObjectList(EGameObjectList::AiWaypoint) {}
2018-12-07 21:30:43 -08:00
bool CAiWaypointList::IsQualified(const CEntity& ent) {
return TCastToConstPtr<CScriptCoverPoint>(ent) || TCastToConstPtr<CScriptAiJumpPoint>(ent);
}
2018-12-07 21:30:43 -08:00
CPlatformAndDoorList::CPlatformAndDoorList() : CObjectList(EGameObjectList::PlatformAndDoor) {}
2018-12-07 21:30:43 -08:00
bool CPlatformAndDoorList::IsQualified(const CEntity& ent) { return IsDoor(ent) || IsPlatform(ent); }
2018-12-07 21:30:43 -08:00
bool CPlatformAndDoorList::IsDoor(const CEntity& ent) { return TCastToConstPtr<CScriptDoor>(ent); }
2018-12-07 21:30:43 -08:00
bool CPlatformAndDoorList::IsPlatform(const CEntity& ent) { return TCastToConstPtr<CScriptPlatform>(ent); }
2018-12-07 21:30:43 -08:00
CGameLightList::CGameLightList() : CObjectList(EGameObjectList::GameLight) {}
2018-12-07 21:30:43 -08:00
bool CGameLightList::IsQualified(const CEntity& lt) { return TCastToConstPtr<CGameLight>(lt); }
2018-12-07 21:30:43 -08:00
} // namespace urde