diff options
author | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-27 15:59:10 +0000 |
---|---|---|
committer | dshaligram <dshaligram@c06c8d41-db1a-0410-9941-cceddc491573> | 2007-10-27 15:59:10 +0000 |
commit | eb7baf83704e5ffa3d0059e8db34b3c3508b2428 (patch) | |
tree | bf46bfe4012e9d369c1a4f915e4037c417598ba1 /crawl-ref/source/libw32c.cc | |
parent | 64c0b7fe918fdc3bc41483b17f6796d3273ac05a (diff) | |
download | crawl-ref-eb7baf83704e5ffa3d0059e8db34b3c3508b2428.tar.gz crawl-ref-eb7baf83704e5ffa3d0059e8db34b3c3508b2428.zip |
Minor view code cleanup; this ought to fix the DOS redraw issues as well.
git-svn-id: https://crawl-ref.svn.sourceforge.net/svnroot/crawl-ref/trunk@2629 c06c8d41-db1a-0410-9941-cceddc491573
Diffstat (limited to 'crawl-ref/source/libw32c.cc')
-rw-r--r-- | crawl-ref/source/libw32c.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crawl-ref/source/libw32c.cc b/crawl-ref/source/libw32c.cc index c50d095067..81279dd7b3 100644 --- a/crawl-ref/source/libw32c.cc +++ b/crawl-ref/source/libw32c.cc @@ -987,6 +987,21 @@ int get_console_string(char *buf, int maxlen) return (int)nread; } +void puttext(int x1, int y1, int x2, int y2, const screen_buffer_t *buf) +{ + for (int y = y1; y <= y2; ++y) + { + gotoxy(x1, y); + for (int x = x1; x <= x2; x++) + { + textattr( buf[1] ); + putwch( *buf ); + buf += 2; + } + } + update_screen(); +} + void update_screen() { bFlush(); |