metaforce/Runtime/Camera/CCameraManager.hpp

53 lines
1.5 KiB
C++
Raw Normal View History

#ifndef __URDE_CCAMERAMANAGER_HPP__
#define __URDE_CCAMERAMANAGER_HPP__
#include "RetroTypes.hpp"
#include "zeus/CVector3f.hpp"
2016-04-16 23:48:29 +00:00
#include "World/CGameArea.hpp"
namespace urde
{
class CFirstPersonCamera;
class CBallCamera;
class CStateManager;
2016-04-16 23:48:29 +00:00
class CGameCamera;
class CCameraShakeData;
class CCameraManager
{
2016-04-16 23:48:29 +00:00
TUniqueId x0_curCameraId;
std::vector<TUniqueId> x4_cineCameras;
2016-04-16 23:48:29 +00:00
std::list<CCameraShakeData> x18_shakers;
zeus::CVector3f x30_;
CFirstPersonCamera* x7c_fpCamera;
CBallCamera* x80_ballCamera;
public:
2016-04-16 23:48:29 +00:00
CCameraManager(TUniqueId curCameraId);
void SetSpecialCameras(CFirstPersonCamera& fp, CBallCamera& ball)
{
x7c_fpCamera = &fp;
x80_ballCamera = &ball;
}
bool IsInCinematicCamera() const {return x4_cineCameras.size() != 0;}
zeus::CVector3f GetGlobalCameraTranslation(const CStateManager& stateMgr) const;
zeus::CTransform GetGlobalCameraTransform(const CStateManager& stateMgr) const;
void RemoveCameraShaker(int);
void AddCinemaCamera(TUniqueId, CStateManager& stateMgr);
void SetInsideFluid(bool, TUniqueId);
void Update(float dt, CStateManager& stateMgr);
2016-04-16 23:48:29 +00:00
CGameCamera* GetCurrentCamera(CStateManager& stateMgr) const;
const CGameCamera* GetCurrentCamera(const CStateManager& stateMgr) const;
void SetCurrentCameraId(TUniqueId id, CStateManager& stateMgr);
TUniqueId GetCurrentCameraId() const
{
if (x4_cineCameras.size())
return x4_cineCameras.back();
return x0_curCameraId;
}
};
}
#endif // __URDE_CCAMERAMANAGER_HPP__