diff options
author | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:27:35 +0100 |
---|---|---|
committer | Paul Oliver <contact@pauloliver.dev> | 2024-02-29 19:27:49 +0100 |
commit | 17909d029c6a8872b2fddf4e171d7925bbbe9c5c (patch) | |
tree | cbb08af84cd68d24acc362d593a2048b0fa79689 /Simulation/SimBase_Draw.cpp |
Diffstat (limited to 'Simulation/SimBase_Draw.cpp')
-rw-r--r-- | Simulation/SimBase_Draw.cpp | 40 |
1 files changed, 40 insertions, 0 deletions
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(); +} |