From 728abda9dc6fc8e65c7c0e0240a2e7d61a43a583 Mon Sep 17 00:00:00 2001 From: jacopograndi Date: Sun, 5 Sep 2021 22:36:13 +0200 Subject: tech tostring, all sprites, heal and convert --- graphics/graphics.cpp | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) (limited to 'graphics/graphics.cpp') diff --git a/graphics/graphics.cpp b/graphics/graphics.cpp index e485fb4..f14a328 100644 --- a/graphics/graphics.cpp +++ b/graphics/graphics.cpp @@ -529,8 +529,7 @@ void Graphics::render (Gst &gst, View &view) if (view.moves.size() > 0) { for (int m : view.moves) { - int x = m % gr.sizex; - int y = m / gr.sizex; + int x = m % gr.sizex; int y = m / gr.sizex; backend.render_rect( 0, 120, 255, 100, (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 @@ -540,8 +539,7 @@ void Graphics::render (Gst &gst, View &view) if (view.attacks.size() > 0) { for (int m : view.attacks) { - int x = m % gr.sizex; - int y = m / gr.sizex; + int x = m % gr.sizex; int y = m / gr.sizex; backend.render_rect( 255, 120, 0, 100, (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 @@ -549,6 +547,26 @@ void Graphics::render (Gst &gst, View &view) } } + if (view.heals.size() > 0) { + for (int m : view.heals) { + int x = m % gr.sizex; int y = m / gr.sizex; + backend.render_rect( + 0, 200, 0, 100, + (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 + ); + } + } + + if (view.converts.size() > 0) { + for (int m : view.converts) { + int x = m % gr.sizex; int y = m / gr.sizex; + backend.render_rect( + 200, 0, 200, 100, + (int)cam.pos.x + x*32, (int)cam.pos.y + y*32, 32, 32 + ); + } + } + // top bar vec2 pos { 0,0 }; backend.render_rect ( -- cgit v1.2.3-54-g00ecf