From a500f050272a8cca97ed0bbb7f8d7156555c61a7 Mon Sep 17 00:00:00 2001 From: Ian C Date: Mon, 22 Dec 2003 00:01:31 +0000 Subject: Added memory menu and some devel changes --- src/gfx.c | 52 +++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 51 insertions(+), 1 deletion(-) (limited to 'src/gfx.c') diff --git a/src/gfx.c b/src/gfx.c index 57be20c..e7cecb8 100644 --- a/src/gfx.c +++ b/src/gfx.c @@ -225,6 +225,16 @@ void GFXEndFrame(int delay) } +void GFXKeyRepeat(int repeat) +{ + if (repeat) + SDL_EnableKeyRepeat(SDL_DEFAULT_REPEAT_DELAY, + SDL_DEFAULT_REPEAT_INTERVAL); + else + SDL_EnableKeyRepeat(0,0); +} + + SDL_Event *GFXGetKey(void) { static SDL_Event e; @@ -246,7 +256,7 @@ SDL_Event *GFXWaitKey(void) do { SDL_WaitEvent(&e); - } while (e.type!=SDL_KEYUP); + } while (e.type!=SDL_KEYDOWN); return &e; } @@ -342,4 +352,44 @@ void GFXPrint(int x, int y, Uint32 col, const char *format, ...) } +void GFXPrintPaper(int x, int y, Uint32 col, Uint32 paper, + const char *format, ...) +{ + char buff[257]; + va_list va; + char *p; + int sx,sy; + + va_start(va,format); + vsprintf(buff,format,va); + va_end(va); + + p=buff; + + LOCK; + + while(*p) + { + for(sy=0;sy<8;sy++) + { + if (y+sy