From 279ea6072f45bd906a585764e2a122b88c7551ee 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:19:12 -0500 Subject: [PATCH 1/4] :ambulance: --- SQCSim2021/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index 3ebf7c7..f70d1a7 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1201,7 +1201,7 @@ void Engine::Render(float elapsedTime) { //m_remotePlayer.ApplyTransformation(remotePlayer, false); m_world.Update(m_bullets, m_player.GetPosition(), m_blockinfo); m_renderer.UpdateMesh(&m_world, m_player.GetPosition(), m_blockinfo); - m_remotePlayer.Render(m_textureAtlas, m_shader01, all, elapsedTime); + m_remotePlayer.Render(m_animeAtlas, m_shader01, all, elapsedTime); m_booster.RenderBillboard({ 120,20,120 }, m_textureAtlas, texBoostHeal, m_shader01, all); if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas); From 14be450f094202499e62cd2faefa0f1d79b7ac5c Mon Sep 17 00:00:00 2001 From: MarcEricMartel Date: Mon, 20 Nov 2023 16:27:19 -0500 Subject: [PATCH 2/4] :notes: You spin me right round, baby, right round, like a record, baby, right round, round, round :notes: --- SQCSim2021/engine.cpp | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index f70d1a7..dc9b983 100644 --- a/SQCSim2021/engine.cpp +++ b/SQCSim2021/engine.cpp @@ -1091,6 +1091,7 @@ void Engine::Render(float elapsedTime) { static irrklang::ISound* step; // Pour les sons de pas. static float pollTime = 0; static float bulletTime = 0; + static float gameTime = 0; static BlockType bloc = 1; if (elapsedTime > 0.1f) return; @@ -1196,24 +1197,20 @@ void Engine::Render(float elapsedTime) { } } + gameTime += elapsedTime * 10; - m_remotePlayer.ApplyPhysics(Vector3f(0,0,0), &m_world, elapsedTime); - //m_remotePlayer.ApplyTransformation(remotePlayer, false); + Vector3f dance = Vector3f(sin(gameTime), 0, cos(-gameTime)); + dance.Normalize(); + m_remotePlayer.ApplyPhysics(dance, &m_world, 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); - if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas); - - //glClear(GL_DEPTH_BUFFER_BIT | GL_STENCIL_BUFFER_BIT); - //m_remotePlayer.Render(m_textureAtlas, m_shader01, all, elapsedTime); - + m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas); if (m_isSkybox) m_skybox.Render(skybox); - - DrawHud(elapsedTime, bloc); DisplayPovGun(); ProcessNotificationQueue(); From 49b90509b91d882929915632ffbcecda0b3ceaf5 Mon Sep 17 00:00:00 2001 From: Frederic Leger <57264593+freeedleger@users.noreply.github.com> Date: Mon, 20 Nov 2023 16:27:59 -0500 Subject: [PATCH 3/4] ajustement booster --- SQCSim2021/engine.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SQCSim2021/engine.cpp b/SQCSim2021/engine.cpp index f70d1a7..e13c2ae 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, texBoostHeal, m_shader01, all); if (m_isSkybox) m_renderer.RenderWorld(&m_world, m_renderCount, m_player.GetPosition(), m_player.GetDirection(), all, m_shader01, m_textureAtlas); 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 4/4] 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);