Merge branch 'develop' into docs

develop
myk002 2022-08-07 23:36:56 -07:00
commit c0eb568d0d
No known key found for this signature in database
GPG Key ID: 8A39CA0FA0C16E78
2 changed files with 27 additions and 7 deletions

@ -23,13 +23,33 @@ struct scdata {
};
struct renderer_msg : public Renderer::renderer_wrap {
virtual void update_tile (int32_t x, int32_t y) {
bool message_dirty = true; // force redraw when renderer is installed
virtual void update_tile(int32_t x, int32_t y) override {
draw_message();
renderer_wrap::update_tile(x, y);
}
virtual void update_all() override {
draw_message();
renderer_wrap::update_all();
}
virtual void render() override {
message_dirty = true;
renderer_wrap::render();
}
void draw_message() {
if (message_dirty) {
static std::string str = std::string("DFHack: ") + plugin_name + " active";
Screen::paintString(Screen::Pen(' ', 9, 0), 0, gps->dimy - 1, str);
Screen::paintString(Screen::Pen(' ', COLOR_LIGHTCYAN, COLOR_GREEN), 0, gps->dimy - 1, str);
for (int32_t i = 0; i < gps->dimx; ++i)
((scdata*)screen)[i * gps->dimy + gps->dimy - 1].bg = 2;
renderer_wrap::update_tile(x, y);
};
message_dirty = false;
}
}
};
DFhackCExport command_result plugin_init (color_ostream &out, std::vector <PluginCommand> &commands)

@ -1 +1 @@
Subproject commit 6a66be4facd1d5a7b3ab4cb61c34c678d19e0795
Subproject commit f37c0d022135ca10fb5375c4e56e11215bf208ae