Mercurial > hg > early-roguelike
comparison srogue/io.c @ 86:8757a0593e6e
srogue: add arrow-key support.
This is a first attempt which may not be completely portable.
| author | John "Elwin" Edwards |
|---|---|
| date | Sat, 10 Aug 2013 17:43:58 -0700 |
| parents | 3aa87373c908 |
| children | 458df24e973d |
comparison
equal
deleted
inserted
replaced
| 85:d852b8f088c5 | 86:8757a0593e6e |
|---|---|
| 17 #include <stdarg.h> | 17 #include <stdarg.h> |
| 18 #include <ctype.h> | 18 #include <ctype.h> |
| 19 #include <string.h> | 19 #include <string.h> |
| 20 #include "rogue.h" | 20 #include "rogue.h" |
| 21 #include "rogue.ext" | 21 #include "rogue.ext" |
| 22 | |
| 23 int md_readchar(WINDOW *win); | |
| 22 | 24 |
| 23 /* | 25 /* |
| 24 * msg: | 26 * msg: |
| 25 * Display a message at the top of the screen. | 27 * Display a message at the top of the screen. |
| 26 */ | 28 */ |
| 130 readchar() | 132 readchar() |
| 131 { | 133 { |
| 132 char c; | 134 char c; |
| 133 | 135 |
| 134 fflush(stdout); | 136 fflush(stdout); |
| 135 return( wgetch(cw) ); | 137 return( md_readchar(cw) ); |
| 136 } | 138 } |
| 137 | 139 |
| 138 char *hungstr[] = { | 140 char *hungstr[] = { |
| 139 "", | 141 "", |
| 140 " HUNGRY", | 142 " HUNGRY", |
