diff options
| author | Alexander Gavrilov | 2012-08-19 09:31:09 +0400 |
|---|---|---|
| committer | Alexander Gavrilov | 2012-08-19 09:31:09 +0400 |
| commit | b8ee52131bccd174f06c9124980bbcb8df7c80e4 (patch) | |
| tree | a6a665c6d454f9a9d2610bba9f05b8571dc513d9 /plugins/devel | |
| parent | fd0bf2ef929d3bc98570012b21e6e603c570a8f6 (diff) | |
| download | dfhack-b8ee52131bccd174f06c9124980bbcb8df7c80e4.tar.gz dfhack-b8ee52131bccd174f06c9124980bbcb8df7c80e4.tar.bz2 dfhack-b8ee52131bccd174f06c9124980bbcb8df7c80e4.tar.xz | |
Add a module for painting tiles into the gps global.
Diffstat (limited to 'plugins/devel')
| -rw-r--r-- | plugins/devel/vshook.cpp | 15 |
1 files changed, 3 insertions, 12 deletions
diff --git a/plugins/devel/vshook.cpp b/plugins/devel/vshook.cpp index 319ff0e9..ceec2d08 100644 --- a/plugins/devel/vshook.cpp +++ b/plugins/devel/vshook.cpp @@ -3,6 +3,7 @@ #include <Export.h> #include <PluginManager.h> #include <modules/Gui.h> +#include <modules/Screen.h> #include <vector> #include <cstdio> #include <stack> @@ -29,18 +30,8 @@ struct title_hook : df::viewscreen_titlest { { INTERPOSE_NEXT(render)(); - if (gps) { - uint8_t *buf = gps->screen; - int32_t *stp = gps->screentexpos; - - for (const char *p = "DFHack " DFHACK_VERSION; - *p && buf < gps->screen_limit; - p++, buf += gps->dimy*4, stp += gps->dimy) - { - buf[0] = *p; buf[1] = 7; buf[2] = 0; buf[3] = 1; - *stp = 0; - } - } + Screen::Pen pen(' ',COLOR_WHITE,COLOR_BLACK); + Screen::paintString(pen,0,0,"DFHack " DFHACK_VERSION); } }; |
