metaforce/Runtime/GuiSys/CHudFreeLookInterface.hpp

72 lines
2.4 KiB
C++
Raw Permalink Normal View History

2018-10-07 03:42:33 +00:00
#pragma once
2017-04-02 03:03:37 +00:00
#include "Runtime/RetroTypes.hpp"
#include "Runtime/GuiSys/CHudInterface.hpp"
#include <zeus/CTransform.hpp>
2017-04-07 05:35:09 +00:00
2021-04-10 08:42:06 +00:00
namespace metaforce {
2017-04-02 03:03:37 +00:00
class CGuiFrame;
2017-04-07 05:35:09 +00:00
class CGuiModel;
class CGuiWidget;
2017-04-02 03:03:37 +00:00
2018-12-08 05:30:43 +00:00
class IFreeLookInterface {
2017-04-02 03:03:37 +00:00
public:
2018-12-08 05:30:43 +00:00
virtual ~IFreeLookInterface() = default;
virtual void Update(float dt) = 0;
virtual void SetIsVisibleDebug(bool v) = 0;
virtual void SetIsVisibleGame(bool v) = 0;
virtual void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle) = 0;
2017-04-02 03:03:37 +00:00
};
2018-12-08 05:30:43 +00:00
class CHudFreeLookInterface : public IFreeLookInterface {
EHudType x4_hudType;
zeus::CTransform x8_freeLookLeftXf;
zeus::CTransform x38_freeLookRightXf;
float x68_freeLookInterp = 0.f;
float x6c_lockOnInterp;
bool x70_24_inFreeLook : 1;
bool x70_25_lookControlHeld : 1;
bool x70_26_lockedOnObj : 1;
bool x70_27_visibleDebug : 1 = true;
bool x70_28_visibleGame : 1 = true;
2018-12-08 05:30:43 +00:00
CGuiWidget* x74_basewidget_freelookleft;
CGuiModel* x78_model_shieldleft;
CGuiModel* x7c_model_freelookleft;
CGuiWidget* x80_basewidget_freelookright;
CGuiModel* x84_model_shieldright;
CGuiModel* x88_model_freelookright;
CGuiWidget* x8c_basewidget_outlinesb;
void UpdateVisibility();
2017-04-02 03:03:37 +00:00
public:
2018-12-08 05:30:43 +00:00
CHudFreeLookInterface(CGuiFrame& selHud, EHudType hudType, bool inFreeLook, bool lookControlHeld, bool lockedOnObj);
void Update(float dt) override;
void SetIsVisibleDebug(bool v) override;
void SetIsVisibleGame(bool v) override;
void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle) override;
2017-04-02 03:03:37 +00:00
};
2018-12-08 05:30:43 +00:00
class CHudFreeLookInterfaceXRay : public IFreeLookInterface {
zeus::CVector3f x4_freeLookLeftPos;
zeus::CVector3f x10_freeLookRightPos;
float x1c_freeLookInterp = 0.f;
bool x20_inFreeLook;
bool x21_lookControlHeld;
bool x22_24_visibleDebug : 1 = true;
bool x22_25_visibleGame : 1 = true;
2018-12-08 05:30:43 +00:00
CGuiWidget* x24_basewidget_freelook;
CGuiModel* x28_model_shield;
CGuiModel* x2c_model_freelookleft;
CGuiModel* x30_model_freelookright;
void UpdateVisibility();
2017-04-02 03:03:37 +00:00
public:
2018-12-08 05:30:43 +00:00
CHudFreeLookInterfaceXRay(CGuiFrame& selHud, bool inFreeLook, bool lookControlHeld, bool lockedOnObj);
void Update(float dt) override;
void SetIsVisibleDebug(bool v) override;
void SetIsVisibleGame(bool v) override;
void SetFreeLookState(bool inFreeLook, bool lookControlHeld, bool lockedOnObj, float vertLookAngle) override;
2017-04-02 03:03:37 +00:00
};
2021-04-10 08:42:06 +00:00
} // namespace metaforce