From 08314e8a0a622743f5e951b7e019ada1240d6e2b Mon Sep 17 00:00:00 2001 From: Brent <43089001+BrentDaMage@users.noreply.github.com> Date: Wed, 9 Aug 2023 07:30:28 -0500 Subject: [PATCH] Cleanup render functions (#38) * Remove renderHorrible * Remove renderRollable Co-authored-by: Brent Da Mage --- source/client/model/Cube.cpp | 55 --------------------------- source/client/model/Cube.hpp | 2 - source/client/model/HumanoidModel.cpp | 12 ------ source/client/model/HumanoidModel.hpp | 1 - source/client/model/Model.cpp | 5 --- source/client/model/Model.hpp | 1 - 6 files changed, 76 deletions(-) diff --git a/source/client/model/Cube.cpp b/source/client/model/Cube.cpp index 5f7f232..38e231b 100644 --- a/source/client/model/Cube.cpp +++ b/source/client/model/Cube.cpp @@ -148,61 +148,6 @@ void Cube::render(float f) glPopMatrix(); } -void Cube::renderRollable(float f) -{ - if (field_1A) - return; - - if (!field_19) - return; - - if (!m_bCompiled) - compile(f); - - glPushMatrix(); - - glTranslatef(m_posX * f, m_posY * f, m_posZ * f); - if (field_14 != 0.0f) glRotatef(field_14 * c, 0.0f, 0.0f, 1.0f); - if (field_10 != 0.0f) glRotatef(field_10 * c, 0.0f, 1.0f, 0.0f); - if (field_C != 0.0f) glRotatef(field_C * c, 1.0f, 0.0f, 0.0f); - draw(); - - glPopMatrix(); -} - -void Cube::renderHorrible(float f) -{ - if (field_1A) - return; - - if (!field_19) - return; - - if (field_C == 0.0f && field_10 == 0.0f && field_14 == 0.0f) - { - if (m_posX == 0.0f && m_posY == 0 && m_posZ == 0) - { - drawSlow(f); - return; - } - - glTranslatef( m_posX * f, m_posY * f, m_posZ * f); - drawSlow(f); - glTranslatef(-m_posX * f, -m_posY * f, -m_posZ * f); - return; - } - - glPushMatrix(); - - glTranslatef(m_posX * f, m_posY * f, m_posZ * f); - if (field_14 != 0.0f) glRotatef(field_14 * c, 0.0f, 0.0f, 1.0f); - if (field_10 != 0.0f) glRotatef(field_10 * c, 0.0f, 1.0f, 0.0f); - if (field_C != 0.0f) glRotatef(field_C * c, 1.0f, 0.0f, 0.0f); - drawSlow(f); - - glPopMatrix(); -} - void Cube::translateTo(float f) { if (field_1A) diff --git a/source/client/model/Cube.hpp b/source/client/model/Cube.hpp index 866b4fd..cea887f 100644 --- a/source/client/model/Cube.hpp +++ b/source/client/model/Cube.hpp @@ -22,8 +22,6 @@ public: void draw(); void drawSlow(float f); void render(float f); - void renderHorrible(float f); - void renderRollable(float f); void setPos(float x, float y, float z); void setTexOffs(int a, int b); void translateTo(float f); diff --git a/source/client/model/HumanoidModel.cpp b/source/client/model/HumanoidModel.cpp index 75bacd6..3d0d84b 100644 --- a/source/client/model/HumanoidModel.cpp +++ b/source/client/model/HumanoidModel.cpp @@ -70,18 +70,6 @@ void HumanoidModel::render(float a, float b, float c, float d, float e, float f) _logGraphics(); } -void HumanoidModel::renderHorrible(float a, float b, float c, float d, float e, float f) -{ - setupAnim(a, b, c, d, e, f); - m_head.renderHorrible(f); - m_body.renderHorrible(f); - m_armL.renderHorrible(f); - m_armR.renderHorrible(f); - m_legL.renderHorrible(f); - m_legR.renderHorrible(f); - _logGraphics(); -} - void HumanoidModel::setupAnim(float a2, float a3, float a4, float a5, float a6, float a7) { //a6 = pitch, a5 = yaw-ish diff --git a/source/client/model/HumanoidModel.hpp b/source/client/model/HumanoidModel.hpp index e547191..18479b6 100644 --- a/source/client/model/HumanoidModel.hpp +++ b/source/client/model/HumanoidModel.hpp @@ -19,7 +19,6 @@ public: void onGraphicsReset() override; void render(float, float, float, float, float, float) override; - void renderHorrible(float, float, float, float, float, float) override; void setupAnim(float, float, float, float, float, float) override; void setBrightness(float) override; diff --git a/source/client/model/Model.cpp b/source/client/model/Model.cpp index 17d3486..afcbf44 100644 --- a/source/client/model/Model.cpp +++ b/source/client/model/Model.cpp @@ -29,11 +29,6 @@ void Model::render(float, float, float, float, float, float) } -void Model::renderHorrible(float, float, float, float, float, float) -{ - -} - void Model::setupAnim(float, float, float, float, float, float) { diff --git a/source/client/model/Model.hpp b/source/client/model/Model.hpp index 11ed188..79b9a09 100644 --- a/source/client/model/Model.hpp +++ b/source/client/model/Model.hpp @@ -19,7 +19,6 @@ public: virtual void onGraphicsReset(); virtual void prepareMobModel(Mob*, float, float, float); virtual void render(float, float, float, float, float, float); - virtual void renderHorrible(float, float, float, float, float, float); virtual void setupAnim(float, float, float, float, float, float); virtual void setBrightness(float);