2018-10-07 03:42:33 +00:00
|
|
|
#pragma once
|
2017-04-02 03:03:37 +00:00
|
|
|
|
2017-04-07 05:35:09 +00:00
|
|
|
#include "RetroTypes.hpp"
|
|
|
|
#include "CHudInterface.hpp"
|
|
|
|
#include "zeus/CTransform.hpp"
|
|
|
|
|
2017-04-02 03:03:37 +00:00
|
|
|
namespace urde
|
|
|
|
{
|
|
|
|
class CGuiFrame;
|
2017-04-07 05:35:09 +00:00
|
|
|
class CGuiWidget;
|
|
|
|
class CGuiModel;
|
2017-04-02 03:03:37 +00:00
|
|
|
|
|
|
|
class IFreeLookInterface
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
virtual ~IFreeLookInterface() = default;
|
2017-04-03 01:39:23 +00:00
|
|
|
virtual void Update(float dt)=0;
|
2017-04-07 05:35:09 +00:00
|
|
|
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
|
|
|
};
|
|
|
|
|
2017-04-07 05:35:09 +00:00
|
|
|
class CHudFreeLookInterface : public IFreeLookInterface
|
2017-04-02 03:03:37 +00:00
|
|
|
{
|
2017-04-07 05:35:09 +00:00
|
|
|
EHudType x4_hudType;
|
|
|
|
zeus::CTransform x8_freeLookLeftXf;
|
|
|
|
zeus::CTransform x38_freeLookRightXf;
|
|
|
|
float x68_freeLookInterp = 0.f;
|
|
|
|
float x6c_lockOnInterp;
|
|
|
|
union
|
|
|
|
{
|
|
|
|
struct
|
|
|
|
{
|
|
|
|
bool x70_24_inFreeLook : 1;
|
|
|
|
bool x70_25_lookControlHeld : 1;
|
|
|
|
bool x70_26_lockedOnObj : 1;
|
|
|
|
bool x70_27_visibleDebug : 1;
|
|
|
|
bool x70_28_visibleGame : 1;
|
|
|
|
};
|
|
|
|
u16 _dummy = 0;
|
|
|
|
};
|
|
|
|
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:
|
2017-04-07 05:35:09 +00:00
|
|
|
CHudFreeLookInterface(CGuiFrame& selHud, EHudType hudType, bool inFreeLook,
|
|
|
|
bool lookControlHeld, bool lockedOnObj);
|
2017-04-03 01:39:23 +00:00
|
|
|
void Update(float dt);
|
2017-04-07 05:35:09 +00:00
|
|
|
void SetIsVisibleDebug(bool v);
|
|
|
|
void SetIsVisibleGame(bool v);
|
|
|
|
void SetFreeLookState(bool inFreeLook, bool lookControlHeld,
|
|
|
|
bool lockedOnObj, float vertLookAngle);
|
2017-04-02 03:03:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
class CHudFreeLookInterfaceXRay : public IFreeLookInterface
|
|
|
|
{
|
2017-04-07 05:35:09 +00:00
|
|
|
zeus::CVector3f x4_freeLookLeftPos;
|
|
|
|
zeus::CVector3f x10_freeLookRightPos;
|
|
|
|
float x1c_freeLookInterp = 0.f;
|
|
|
|
bool x20_inFreeLook;
|
|
|
|
bool x21_lookControlHeld;
|
2017-04-08 20:40:36 +00:00
|
|
|
bool x22_24_visibleDebug : 1;
|
|
|
|
bool x22_25_visibleGame : 1;
|
2017-04-07 05:35:09 +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:
|
2017-04-07 05:35:09 +00:00
|
|
|
CHudFreeLookInterfaceXRay(CGuiFrame& selHud, bool inFreeLook,
|
|
|
|
bool lookControlHeld, bool lockedOnObj);
|
2017-04-03 01:39:23 +00:00
|
|
|
void Update(float dt);
|
2017-04-07 05:35:09 +00:00
|
|
|
void SetIsVisibleDebug(bool v);
|
|
|
|
void SetIsVisibleGame(bool v);
|
|
|
|
void SetFreeLookState(bool inFreeLook, bool lookControlHeld,
|
|
|
|
bool lockedOnObj, float vertLookAngle);
|
2017-04-02 03:03:37 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
}
|
|
|
|
|