From d1a1c790ec476b46c8840e26ac27696216d00d48 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Tue, 28 Feb 2012 18:19:13 +0100 Subject: [PATCH] Paint DFHack in corner if supported. --- library/Core.cpp | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/library/Core.cpp b/library/Core.cpp index 859a8c348..c489432f7 100644 --- a/library/Core.cpp +++ b/library/Core.cpp @@ -772,9 +772,29 @@ void Core::Resume() AccessMutex->unlock(); } +struct screen_tile +{ + unsigned char symbol; + unsigned char front; + unsigned char back; + unsigned char bright; +}; + +void screen_paint (int x, int y, uint8_t symbol) +{ + int tile = x * df::global::gps->dimy + y; + screen_tile *s = (screen_tile *) (df::global::gps->screen + tile*4); + s->symbol = symbol; +} + int Core::TileUpdate() { - //df::global::gps->; + screen_paint(0,0,'D'); + screen_paint(1,0,'F'); + screen_paint(2,0,'H'); + screen_paint(3,0,'a'); + screen_paint(4,0,'c'); + screen_paint(5,0,'k'); return true; }