From 17909d029c6a8872b2fddf4e171d7925bbbe9c5c Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Thu, 29 Feb 2024 19:27:35 +0100 Subject: Initial commit --- Simulation/SimBase_Draw.cpp | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 Simulation/SimBase_Draw.cpp (limited to 'Simulation/SimBase_Draw.cpp') diff --git a/Simulation/SimBase_Draw.cpp b/Simulation/SimBase_Draw.cpp new file mode 100644 index 0000000..0bfe915 --- /dev/null +++ b/Simulation/SimBase_Draw.cpp @@ -0,0 +1,40 @@ +#include "SimBase.hpp" + +void SimBase::draw() +{ + window.clear(prms.clearColor); + + camera.update(); + + if (gfx) + { + tank.draw(); + + for (auto &i : zappers) + { + i.draw(); + } + + for (auto &i : pellets) + { + i.draw(); + } + + for (auto &i : guppies) + { + i.draw(); + } + + for (auto &i : corpses) + { + i.draw(); + } + } + + if (displayText) + { + text.print(); + } + + window.display(); +} -- cgit v1.2.1