|
|
@ -23,13 +23,22 @@ struct scdata {
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
struct renderer_msg : public Renderer::renderer_wrap {
|
|
|
|
struct renderer_msg : public Renderer::renderer_wrap {
|
|
|
|
virtual void update_tile (int32_t x, int32_t y) {
|
|
|
|
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();
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
void draw_message() {
|
|
|
|
static std::string str = std::string("DFHack: ") + plugin_name + " active";
|
|
|
|
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)
|
|
|
|
for (int32_t i = 0; i < gps->dimx; ++i)
|
|
|
|
((scdata*)screen)[i * gps->dimy + gps->dimy - 1].bg = 2;
|
|
|
|
((scdata*)screen)[i * gps->dimy + gps->dimy - 1].bg = 2;
|
|
|
|
renderer_wrap::update_tile(x, y);
|
|
|
|
}
|
|
|
|
};
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
DFhackCExport command_result plugin_init (color_ostream &out, std::vector <PluginCommand> &commands)
|
|
|
|
DFhackCExport command_result plugin_init (color_ostream &out, std::vector <PluginCommand> &commands)
|
|
|
|