From dfe78c51d05e7a0da30de3ab53ced64e650c6c11 Mon Sep 17 00:00:00 2001 From: Zeno Rogue Date: Mon, 8 Jun 2020 01:50:09 +0200 Subject: [PATCH] draw using hooks_fram not hooks_drawcell --- rogueviz/magmahep.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/rogueviz/magmahep.cpp b/rogueviz/magmahep.cpp index 8f574a58..b2031aee 100644 --- a/rogueviz/magmahep.cpp +++ b/rogueviz/magmahep.cpp @@ -151,9 +151,11 @@ void draw_at(transmatrix T, color_t col) { } -bool may_set_cell(cell *c, const transmatrix& V) { - if(c == cwt.at && magmashape) { +void draw_magma() { + if() { if(heps.empty()) make(); + transmatrix V = ggmatrix(currentmap.gamestart()); + println(hlog, "V = ", V); for(auto h: heps) draw_at(V * h.first, h.second); } @@ -181,7 +183,7 @@ int readArgs() { } -auto msc = addHook(hooks_drawcell, 100, may_set_cell) +auto msc = addHook(hooks_frame, 100, draw_magma) + addHook(hooks_args, 100, readArgs); }