mirror of
https://github.com/isledecomp/isle.git
synced 2025-10-26 09:54:18 +00:00
Add initial .clang-tidy and fixes
This commit is contained in:
@@ -29,8 +29,9 @@ Lego3DView::~Lego3DView()
|
||||
BOOL Lego3DView::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Renderer* pRenderer)
|
||||
{
|
||||
double viewAngle = 45;
|
||||
if (rCreateStruct.m_isWideViewAngle)
|
||||
if (rCreateStruct.m_isWideViewAngle) {
|
||||
viewAngle = 90;
|
||||
}
|
||||
|
||||
float frontClippingDistance = 0.1;
|
||||
float backClippingDistance = 500;
|
||||
|
||||
@@ -13,10 +13,10 @@
|
||||
class Lego3DView : public LegoView1 {
|
||||
public:
|
||||
Lego3DView();
|
||||
virtual ~Lego3DView() override;
|
||||
~Lego3DView() override;
|
||||
|
||||
BOOL Create(const CreateStruct&, Tgl::Renderer*);
|
||||
virtual void Destroy() override; // vtable+0x08
|
||||
void Destroy() override; // vtable+0x08
|
||||
|
||||
BOOL Add(ViewROI&);
|
||||
BOOL Remove(ViewROI&);
|
||||
|
||||
@@ -42,8 +42,9 @@ LegoView::~LegoView()
|
||||
BOOL LegoView::Create(const TglSurface::CreateStruct& rCreateStruct, Tgl::Renderer* pRenderer)
|
||||
{
|
||||
float viewAngle = 45;
|
||||
if (rCreateStruct.m_isWideViewAngle)
|
||||
if (rCreateStruct.m_isWideViewAngle) {
|
||||
viewAngle = 90;
|
||||
}
|
||||
|
||||
float frontClippingDistance = 0.1;
|
||||
float backClippingDistance = 500;
|
||||
|
||||
@@ -18,16 +18,16 @@ class Camera;
|
||||
class LegoView : public TglSurface {
|
||||
public:
|
||||
LegoView();
|
||||
virtual ~LegoView() override;
|
||||
~LegoView() override;
|
||||
|
||||
BOOL Create(const CreateStruct&, Tgl::Renderer*);
|
||||
virtual void Destroy() override; // vtable+0x08
|
||||
void Destroy() override; // vtable+0x08
|
||||
|
||||
Tgl::Group* GetScene() const;
|
||||
Tgl::Camera* GetCamera() const;
|
||||
|
||||
protected:
|
||||
virtual Tgl::View* CreateView(Tgl::Renderer*, Tgl::Device*); // vtable+0x10
|
||||
Tgl::View* CreateView(Tgl::Renderer*, Tgl::Device*) override; // vtable+0x10
|
||||
|
||||
private:
|
||||
Tgl::Group* m_pScene; // 0x70
|
||||
@@ -58,11 +58,11 @@ inline Tgl::Camera* LegoView::GetCamera() const
|
||||
class LegoView1 : public LegoView {
|
||||
public:
|
||||
LegoView1();
|
||||
virtual ~LegoView1() override;
|
||||
~LegoView1() override;
|
||||
|
||||
BOOL AddLightsToViewport();
|
||||
BOOL Create(const TglSurface::CreateStruct&, Tgl::Renderer*);
|
||||
virtual void Destroy() override; // vtable+0x08
|
||||
void Destroy() override; // vtable+0x08
|
||||
|
||||
private:
|
||||
Tgl::Light* m_pSunLight; // 0x78
|
||||
|
||||
@@ -109,14 +109,17 @@ LegoResult LegoFile::Open(const char* p_name, LegoU32 p_mode)
|
||||
strcat(mode, "r");
|
||||
}
|
||||
if (p_mode & c_write) {
|
||||
if (m_mode != c_read)
|
||||
if (m_mode != c_read) {
|
||||
m_mode = c_write;
|
||||
}
|
||||
strcat(mode, "w");
|
||||
}
|
||||
if ((p_mode & c_text) != 0)
|
||||
if ((p_mode & c_text) != 0) {
|
||||
strcat(mode, "t");
|
||||
else
|
||||
}
|
||||
else {
|
||||
strcat(mode, "b");
|
||||
}
|
||||
|
||||
if (!(m_file = fopen(p_name, mode))) {
|
||||
return FAILURE;
|
||||
|
||||
@@ -44,10 +44,10 @@ protected:
|
||||
class LegoMemory : public LegoStorage {
|
||||
public:
|
||||
LegoMemory(void* p_buffer);
|
||||
virtual LegoResult Read(void* p_buffer, LegoU32 p_size);
|
||||
virtual LegoResult Write(const void* p_buffer, LegoU32 p_size);
|
||||
virtual LegoResult GetPosition(LegoU32& p_position);
|
||||
virtual LegoResult SetPosition(LegoU32 p_position);
|
||||
LegoResult Read(void* p_buffer, LegoU32 p_size) override;
|
||||
LegoResult Write(const void* p_buffer, LegoU32 p_size) override;
|
||||
LegoResult GetPosition(LegoU32& p_position) override;
|
||||
LegoResult SetPosition(LegoU32 p_position) override;
|
||||
|
||||
// SYNTHETIC: LEGO1 0x10045a80
|
||||
// LegoMemory::~LegoMemory
|
||||
@@ -65,11 +65,11 @@ protected:
|
||||
class LegoFile : public LegoStorage {
|
||||
public:
|
||||
LegoFile();
|
||||
virtual ~LegoFile() override;
|
||||
virtual LegoResult Read(void* p_buffer, LegoU32 p_size);
|
||||
virtual LegoResult Write(const void* p_buffer, LegoU32 p_size);
|
||||
virtual LegoResult GetPosition(LegoU32& p_position);
|
||||
virtual LegoResult SetPosition(LegoU32 p_position);
|
||||
~LegoFile() override;
|
||||
LegoResult Read(void* p_buffer, LegoU32 p_size) override;
|
||||
LegoResult Write(const void* p_buffer, LegoU32 p_size) override;
|
||||
LegoResult GetPosition(LegoU32& p_position) override;
|
||||
LegoResult SetPosition(LegoU32 p_position) override;
|
||||
LegoResult Open(const char* p_name, LegoU32 p_mode);
|
||||
|
||||
// FUNCTION: LEGO1 0x10006030
|
||||
|
||||
@@ -75,13 +75,15 @@ unsigned char LegoROI::CallTheHandlerFunction(
|
||||
)
|
||||
{
|
||||
// TODO
|
||||
if (p_param == NULL)
|
||||
if (p_param == NULL) {
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (g_someHandlerFunction) {
|
||||
char buf[32];
|
||||
if (g_someHandlerFunction(p_param, buf, 32))
|
||||
if (g_someHandlerFunction(p_param, buf, 32)) {
|
||||
p_param = buf;
|
||||
}
|
||||
}
|
||||
|
||||
return ColorAliasLookup(p_param, p_red, p_green, p_blue, p_other);
|
||||
|
||||
@@ -19,9 +19,9 @@ class LegoROI : public ViewROI {
|
||||
public:
|
||||
LegoROI(Tgl::Renderer* p_renderer, ViewLODList* p_lodList, int p_time);
|
||||
|
||||
virtual float IntrinsicImportance() const override; // vtable+0x04
|
||||
float IntrinsicImportance() const override; // vtable+0x04
|
||||
// Note: Actually part of parent class (doesn't exist yet)
|
||||
virtual void UpdateWorldBoundingVolumes() override; // vtable+0x18
|
||||
void UpdateWorldBoundingVolumes() override; // vtable+0x18
|
||||
|
||||
void SetDisplayBB(int p_displayBB);
|
||||
static void configureLegoROI(int p_roi);
|
||||
|
||||
Reference in New Issue
Block a user