aboutsummaryrefslogtreecommitdiff
path: root/graphics/graphics.cpp
diff options
context:
space:
mode:
authorjacopograndi <jak.sk8@hotmail.it>2021-09-05 22:36:13 +0200
committerjacopograndi <jak.sk8@hotmail.it>2021-09-05 22:36:13 +0200
commit728abda9dc6fc8e65c7c0e0240a2e7d61a43a583 (patch)
tree545187ed3d634792af1082ce021665d3ef4934fc /graphics/graphics.cpp
parentc298eb988874bc2cf3adb39c2532419ec76a24bc (diff)
tech tostring, all sprites, heal and convert
Diffstat (limited to 'graphics/graphics.cpp')
-rw-r--r--graphics/graphics.cpp26
1 files changed, 22 insertions, 4 deletions
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 (