From 1c6a5fc3f739f8b03303eecea897dac43b422b9f Mon Sep 17 00:00:00 2001 From: Riamon Vincent Date: Tue, 5 Dec 2017 02:51:43 +0100 Subject: [PATCH 1/2] fix max Entitity --- include/EntityManager.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/EntityManager.hpp b/include/EntityManager.hpp index fb10970..888fc67 100644 --- a/include/EntityManager.hpp +++ b/include/EntityManager.hpp @@ -50,7 +50,7 @@ class EntityManager private: // for spawn zombie - static constexpr const int MaxEntities = 600; + static constexpr const int MaxEntities = 450; int rateOfSpawn; int frame; }; From 7f2068aada3edeb230feac474d26ebf752e070ab Mon Sep 17 00:00:00 2001 From: Matthias RIGAUD Date: Tue, 5 Dec 2017 02:53:14 +0100 Subject: [PATCH 2/2] year --- include/TextureHandler.hpp | 1 + resources/HighFive.bmp | Bin 0 -> 2518 bytes source/Display.cpp | 10 +++++++++- source/TextureHandler.cpp | 1 + 4 files changed, 11 insertions(+), 1 deletion(-) create mode 100644 resources/HighFive.bmp diff --git a/include/TextureHandler.hpp b/include/TextureHandler.hpp index ee67a4c..8f827a1 100644 --- a/include/TextureHandler.hpp +++ b/include/TextureHandler.hpp @@ -45,6 +45,7 @@ public : ZOMBIEHEAD, HUMANHEAD, SAVE_ME, + HIGH_FIVE }; static void initTextureHandler(); diff --git a/resources/HighFive.bmp b/resources/HighFive.bmp new file mode 100644 index 0000000000000000000000000000000000000000..2678e4616d4abe21bb98c3d3c465a8eed9aa1507 GIT binary patch literal 2518 zcmeHFF%H5o3^XtyCd3Dj_(>NQSolg;Uck>PG4q|^1YLBsoKjRGb!b)BcI@~rmp0ee zR?_p(?_KSrwpUxpQ8wx?T0iVQrYW8vl3!`gw-$x5em%BvLSN{*=Y;Kl-8vU83y=P_ zE_&3{BWgPrlMuq3E&YeYk#&o_d%4k73OUxJXR}yV7hCso@BzlR9DU3q#dK!N1Lx*- z;CP&PcB<34k@xmfJ@Xsj<6&YRxaPcYC$^q(f8YWh@T`v;o7t=r;xwz!H-v*4yo=A8 a7BIl0qzCFH9J_9Fmsce&E*5K0Ier84#4ASt literal 0 HcmV?d00001 diff --git a/source/Display.cpp b/source/Display.cpp index c43a698..0327ea1 100644 --- a/source/Display.cpp +++ b/source/Display.cpp @@ -416,7 +416,15 @@ void Display::copyRenderData(Logic const &logic) camera.zoom * static_cast(human.entity.fixture.radius * 2.0) * Vect<2u, float>{1.0f, 1.5f}, (pos[1] + 1.1f) * 0.4f }); - if (human.isRunningAway()) + if (human.isJumping) + displayInfo.renderables[TextureHandler::getInstance().getTexture(TextureHandler::TextureList::HIGH_FIVE)].push_back(Renderable{ + {0.0f, 0.0f}, + {1.0f, 1.0f}, + Vect<2, double>(pos[0], pos[1] + human.getOffset() + 0.1), + camera.zoom * Vect<2u, float>(0.3f, 0.15f), + (pos[1] + 1.1f) * 0.4f + }); + else if (human.isRunningAway()) displayInfo.renderables[TextureHandler::getInstance().getTexture(TextureHandler::TextureList::SAVE_ME)].push_back(Renderable{ {0.0f, 0.0f}, {1.0f, 1.0f}, diff --git a/source/TextureHandler.cpp b/source/TextureHandler.cpp index e3451c4..672fb93 100644 --- a/source/TextureHandler.cpp +++ b/source/TextureHandler.cpp @@ -43,6 +43,7 @@ void TextureHandler::initTextureHandler() _instance->addTexture(TextureList::ZOMBIEHEAD, "resources/ZombieHead.bmp"); _instance->addTexture(TextureList::HUMANHEAD, "resources/CitizenHead.bmp"); _instance->addTexture(TextureList::SAVE_ME, "resources/SaveMe.bmp"); + _instance->addTexture(TextureList::HIGH_FIVE, "resources/HighFive.bmp"); } TextureHandler& TextureHandler::getInstance()