From 38a6c26407a9ec14e49643ba3ebac15c9760736b Mon Sep 17 00:00:00 2001 From: Claudel-D-Roy <112507354+Claudel-D-Roy@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:51:36 -0500 Subject: [PATCH] Modif de booster --- SQCSim2021/booster.cpp | 4 ++-- SQCSim2021/booster.h | 2 +- SQCSim2021/engine.cpp | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/SQCSim2021/booster.cpp b/SQCSim2021/booster.cpp index cfef393..593e16e 100644 --- a/SQCSim2021/booster.cpp +++ b/SQCSim2021/booster.cpp @@ -1,6 +1,6 @@ #include "booster.h"; -void Booster::RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, TextureAtlas::TextureIndex idx, Shader& shader, Transformation tran) +void Booster::RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, Shader& shader, Transformation tran) { // //Vector3f playerToQuad = m_player.GetPosition() - m_position; @@ -31,7 +31,7 @@ void Booster::RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, Te //glDisable(GL_DEPTH_TEST); shader.Use(); textureAtlas.Bind(); - textureAtlas.TextureIndexToCoord(idx, u, v, w, h); + textureAtlas.TextureIndexToCoord(8, u, v, w, h); //glLoadIdentity(); glLoadMatrixf(tran.GetMatrix().GetInternalValues()); glBegin(GL_QUADS); diff --git a/SQCSim2021/booster.h b/SQCSim2021/booster.h index b9ff3b6..e06f2b4 100644 --- a/SQCSim2021/booster.h +++ b/SQCSim2021/booster.h @@ -9,6 +9,6 @@ class Booster { public: - void RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, TextureAtlas::TextureIndex idx, Shader& shader, Transformation tran); + void RenderBillboard(const Vector3f pos, TextureAtlas& textureAtlas, Shader& shader, Transformation tran); }; #endif diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index f70d1a7..f0e945d 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1202,7 +1202,7 @@ void Engine::Render(float elapsedTime) { m_world.Update(m_bullets, m_player.GetPosition(), m_blockinfo); m_renderer.UpdateMesh(&m_world, m_player.GetPosition(), m_blockinfo); m_remotePlayer.Render(m_animeAtlas, m_shader01, all, elapsedTime); - m_booster.RenderBillboard({ 120,20,120 }, m_textureAtlas, texBoostHeal, m_shader01, all); + m_booster.RenderBillboard({ 195,16,195 }, m_textureAtlas, m_shader01, all); if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas);