diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/Makefile | 95 | ||||
| -rw-r--r-- | src/config.c | 7 | ||||
| -rw-r--r-- | src/config.h | 3 | ||||
| -rw-r--r-- | src/font.h | 1201 | ||||
| -rw-r--r-- | src/gfx.c | 31 | ||||
| -rw-r--r-- | src/gfx.h | 11 | ||||
| -rw-r--r-- | src/gui.c | 149 | ||||
| -rw-r--r-- | src/gui.h | 45 | ||||
| -rw-r--r-- | src/main.c | 22 | 
9 files changed, 948 insertions, 616 deletions
| diff --git a/src/Makefile b/src/Makefile index 2d87ddc..9486c2b 100644 --- a/src/Makefile +++ b/src/Makefile @@ -18,7 +18,7 @@  #   # -------------------------------------------------------------------------  #  -# $Id: Makefile,v 1.3 2003-12-19 01:14:08 ianc Exp $ +# $Id: Makefile,v 1.4 2003-12-19 19:31:57 ianc Exp $  #  @@ -36,12 +36,14 @@ SOURCE	=	main.c		\  		zx81.c		\  		config.c	\  		gfx.c		\ +		gui.c		\  		exit.c  OBJECTS	=	main.o		\  		zx81.o		\  		config.o	\  		gfx.o		\ +		gui.o		\  		exit.o  EMMA	=	emma @@ -70,3 +72,94 @@ depend:  	cd z80; make depend ; cd ..  # DO NOT DELETE THIS LINE -- make depend depends on it + +main.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +main.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +main.o: /usr/include/stdio.h /usr/local/include/SDL/SDL.h +main.o: /usr/local/include/SDL/SDL_main.h /usr/local/include/SDL/SDL_types.h +main.o: /usr/local/include/SDL/SDL_getenv.h +main.o: /usr/local/include/SDL/SDL_error.h +main.o: /usr/local/include/SDL/begin_code.h +main.o: /usr/local/include/SDL/close_code.h +main.o: /usr/local/include/SDL/SDL_rwops.h /usr/local/include/SDL/SDL_timer.h +main.o: /usr/local/include/SDL/SDL_audio.h +main.o: /usr/local/include/SDL/SDL_byteorder.h +main.o: /usr/local/include/SDL/SDL_cdrom.h +main.o: /usr/local/include/SDL/SDL_joystick.h +main.o: /usr/local/include/SDL/SDL_events.h +main.o: /usr/local/include/SDL/SDL_active.h +main.o: /usr/local/include/SDL/SDL_keyboard.h +main.o: /usr/local/include/SDL/SDL_keysym.h +main.o: /usr/local/include/SDL/SDL_mouse.h /usr/local/include/SDL/SDL_video.h +main.o: /usr/local/include/SDL/SDL_mutex.h /usr/local/include/SDL/SDL_quit.h +main.o: /usr/local/include/SDL/SDL_version.h z80/z80.h zx81.h gfx.h gui.h +main.o: config.h exit.h +zx81.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +zx81.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +zx81.o: /usr/include/stdio.h /usr/include/string.h /usr/include/strings.h +zx81.o: zx81.h z80/z80.h config.h exit.h +config.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +config.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +config.o: /usr/include/stdio.h /usr/include/string.h /usr/include/strings.h +config.o: exit.h config.h +gfx.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +gfx.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +gfx.o: /usr/include/stdio.h /usr/include/string.h /usr/include/strings.h +gfx.o: /usr/include/stdarg.h gfx.h /usr/local/include/SDL/SDL.h +gfx.o: /usr/local/include/SDL/SDL_main.h /usr/local/include/SDL/SDL_types.h +gfx.o: /usr/local/include/SDL/SDL_getenv.h /usr/local/include/SDL/SDL_error.h +gfx.o: /usr/local/include/SDL/begin_code.h +gfx.o: /usr/local/include/SDL/close_code.h /usr/local/include/SDL/SDL_rwops.h +gfx.o: /usr/local/include/SDL/SDL_timer.h /usr/local/include/SDL/SDL_audio.h +gfx.o: /usr/local/include/SDL/SDL_byteorder.h +gfx.o: /usr/local/include/SDL/SDL_cdrom.h +gfx.o: /usr/local/include/SDL/SDL_joystick.h +gfx.o: /usr/local/include/SDL/SDL_events.h +gfx.o: /usr/local/include/SDL/SDL_active.h +gfx.o: /usr/local/include/SDL/SDL_keyboard.h +gfx.o: /usr/local/include/SDL/SDL_keysym.h /usr/local/include/SDL/SDL_mouse.h +gfx.o: /usr/local/include/SDL/SDL_video.h /usr/local/include/SDL/SDL_mutex.h +gfx.o: /usr/local/include/SDL/SDL_quit.h /usr/local/include/SDL/SDL_version.h +gfx.o: exit.h config.h font.h +gui.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +gui.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +gui.o: /usr/include/stdio.h /usr/include/string.h /usr/include/strings.h +gui.o: /usr/include/stdarg.h gui.h /usr/local/include/SDL/SDL.h +gui.o: /usr/local/include/SDL/SDL_main.h /usr/local/include/SDL/SDL_types.h +gui.o: /usr/local/include/SDL/SDL_getenv.h /usr/local/include/SDL/SDL_error.h +gui.o: /usr/local/include/SDL/begin_code.h +gui.o: /usr/local/include/SDL/close_code.h /usr/local/include/SDL/SDL_rwops.h +gui.o: /usr/local/include/SDL/SDL_timer.h /usr/local/include/SDL/SDL_audio.h +gui.o: /usr/local/include/SDL/SDL_byteorder.h +gui.o: /usr/local/include/SDL/SDL_cdrom.h +gui.o: /usr/local/include/SDL/SDL_joystick.h +gui.o: /usr/local/include/SDL/SDL_events.h +gui.o: /usr/local/include/SDL/SDL_active.h +gui.o: /usr/local/include/SDL/SDL_keyboard.h +gui.o: /usr/local/include/SDL/SDL_keysym.h /usr/local/include/SDL/SDL_mouse.h +gui.o: /usr/local/include/SDL/SDL_video.h /usr/local/include/SDL/SDL_mutex.h +gui.o: /usr/local/include/SDL/SDL_quit.h /usr/local/include/SDL/SDL_version.h +gui.o: gfx.h exit.h +exit.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +exit.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +exit.o: /usr/include/stdarg.h exit.h /usr/local/include/SDL/SDL.h +exit.o: /usr/local/include/SDL/SDL_main.h /usr/local/include/SDL/SDL_types.h +exit.o: /usr/local/include/SDL/SDL_getenv.h +exit.o: /usr/local/include/SDL/SDL_error.h +exit.o: /usr/local/include/SDL/begin_code.h +exit.o: /usr/local/include/SDL/close_code.h +exit.o: /usr/local/include/SDL/SDL_rwops.h /usr/include/stdio.h +exit.o: /usr/local/include/SDL/SDL_timer.h /usr/local/include/SDL/SDL_audio.h +exit.o: /usr/local/include/SDL/SDL_byteorder.h +exit.o: /usr/local/include/SDL/SDL_cdrom.h +exit.o: /usr/local/include/SDL/SDL_joystick.h +exit.o: /usr/local/include/SDL/SDL_events.h +exit.o: /usr/local/include/SDL/SDL_active.h +exit.o: /usr/local/include/SDL/SDL_keyboard.h +exit.o: /usr/local/include/SDL/SDL_keysym.h +exit.o: /usr/local/include/SDL/SDL_mouse.h /usr/local/include/SDL/SDL_video.h +exit.o: /usr/local/include/SDL/SDL_mutex.h /usr/local/include/SDL/SDL_quit.h +exit.o: /usr/local/include/SDL/SDL_version.h +emma.o: /usr/include/stdlib.h /usr/include/sys/cdefs.h +emma.o: /usr/include/sys/_types.h /usr/include/machine/_types.h +emma.o: /usr/include/stdio.h z80/z80.h diff --git a/src/config.c b/src/config.c index edff062..3fdb00a 100644 --- a/src/config.c +++ b/src/config.c @@ -44,7 +44,8 @@ static const char ident_h[]=EZX81_CONFIG_H;  /* ---------------------------------------- CONFIG  */ -static char	rompath[FILENAME_MAX]="zx81.rom"; +static char	rompath[FILENAME_MAX]="./zx81.rom"; +static char	tapedir[FILENAME_MAX]=".";  static int	fullscreen=FALSE;  static int	memsize=16;  static int	frames=50; @@ -57,6 +58,7 @@ static const struct      int		is_int;  } config[]= {  		{"rompath",	rompath,	FALSE}, +		{"tapedir",	tapedir,	FALSE},  		{"fullscreen",	&fullscreen,	TRUE},  		{"memsize",	&memsize,	TRUE},  		{"frames",	&frames,	TRUE}, @@ -160,7 +162,8 @@ const char *SConfig(SConfigVar v)  {      static const char *vars[]=      		{ -		    rompath +		    rompath, +		    tapedir  		};      return vars[v]; diff --git a/src/config.h b/src/config.h index d655998..d937cb6 100644 --- a/src/config.h +++ b/src/config.h @@ -43,7 +43,8 @@ typedef enum  */  typedef enum  { -    CONF_ROMFILE +    CONF_ROMFILE, +    CONF_TAPEDIR  } SConfigVar; @@ -97,24 +97,24 @@ static const FontChar font[128]=  		0,0,0,0,0,0,0,0,  	},  	{		/* 07 FONT_CURSOR */ -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, +		1,1,1,1,1,1,1,1, +		1,0,1,1,1,1,1,1, +		1,0,1,1,1,1,1,1, +		1,0,1,1,1,1,1,1, +		1,0,1,1,1,1,1,1, +		1,0,1,1,1,1,1,1, +		1,0,0,0,0,0,0,1,  		1,1,1,1,1,1,1,1,  	},  	{		/* 08 FONT_COPYRIGHT */ -		0,0,1,1,1,0,0,0, -		0,1,0,0,0,1,0,0, -		1,0,0,1,1,0,1,0, -		1,0,1,0,0,0,1,0, -		1,0,0,1,1,0,1,0, -		0,1,0,0,0,1,0,0, -		0,0,1,1,1,0,0,0, -		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		1,0,0,1,1,0,0,1, +		1,0,1,0,0,0,0,1, +		1,0,1,0,0,0,0,1, +		1,0,0,1,1,0,0,1, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  	},  	NULLCHARDEF,	/* 09 */ @@ -141,7 +141,7 @@ static const FontChar font[128]=  	NULLCHARDEF,	/* 1e */  	NULLCHARDEF,	/* 1f */ -	{              /* 20 ' ' */ +	{		/* 20 ' ' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, @@ -151,17 +151,18 @@ static const FontChar font[128]=  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 21 '!' */ -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, +	{		/* 21 '!' */  		0,0,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 22 '"' */ +	{		/* 22 '"' */ +		0,0,0,0,0,0,0,0,  		0,0,1,0,0,1,0,0,  		0,0,1,0,0,1,0,0,  		0,0,0,0,0,0,0,0, @@ -169,50 +170,49 @@ static const FontChar font[128]=  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0,  	}, -	{              /* 23 '#' */ -		0,0,1,0,1,0,0,0, -		0,0,1,0,1,0,0,0, -		1,1,1,1,1,1,1,0, -		0,0,1,0,1,0,0,0, -		1,1,1,1,1,1,1,0, -		0,0,1,0,1,0,0,0, -		0,0,1,0,1,0,0,0, +	{		/* 23 '#' */ +		0,0,0,0,0,0,0,0, +		0,0,1,0,0,1,0,0, +		0,1,1,1,1,1,1,0, +		0,0,1,0,0,1,0,0, +		0,0,1,0,0,1,0,0, +		0,1,1,1,1,1,1,0, +		0,0,1,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 24 '$' */ -		0,0,0,1,0,0,0,0, -		0,0,1,1,1,1,0,0, -		0,1,0,1,0,0,0,0, -		0,0,1,1,1,0,0,0, -		0,0,0,1,0,1,0,0, -		0,1,1,1,1,0,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 24 '$' */  		0,0,0,0,0,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,1,1,1,1,1,0, +		0,0,1,0,1,0,0,0, +		0,0,1,1,1,1,1,0, +		0,0,0,0,1,0,1,0, +		0,0,1,1,1,1,1,0, +		0,0,0,0,1,0,0,0,  	}, -	{              /* 25 '%' */ -		0,0,0,0,0,0,1,0, +	{		/* 25 '%' */ +		0,0,0,0,0,0,0,0, +		0,1,1,0,0,0,1,0,  		0,1,1,0,0,1,0,0, -		0,1,1,0,1,0,0,0, +		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,1,0,0,0,0,0, +		0,0,1,0,0,1,1,0,  		0,1,0,0,0,1,1,0, -		1,0,0,0,0,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 26 '&' */ -		0,1,1,1,0,0,0,0, -		1,0,0,0,1,0,0,0, -		1,0,0,0,1,0,0,0, -		0,1,1,1,0,0,0,0, -		1,0,0,0,1,0,1,0, -		1,0,0,0,0,1,0,0, -		0,1,1,1,1,0,1,0, +	{		/* 26 '&' */ +		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,1,0,1,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,1,0,1,0,1,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 27 ''' */ -		0,0,0,0,0,1,0,0, +	{		/* 27 ''' */ +		0,0,0,0,0,0,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0, @@ -221,557 +221,557 @@ static const FontChar font[128]=  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 28 '(' */ +	{		/* 28 '(' */ +		0,0,0,0,0,0,0,0,  		0,0,0,0,0,1,0,0,  		0,0,0,0,1,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 29 ')' */ +	{		/* 29 ')' */ +		0,0,0,0,0,0,0,0,  		0,0,1,0,0,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,0,0,1,0,0,0, -		0,0,0,0,1,0,0,0, -		0,0,0,0,1,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,1,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 2a '*' */ -		0,0,0,1,0,0,0,0, -		0,1,0,1,0,1,0,0, -		0,0,1,1,1,0,0,0, -		1,1,1,1,1,1,1,0, -		0,0,1,1,1,0,0,0, -		0,1,0,1,0,1,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 2a '*' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0, +		0,0,0,1,0,1,0,0, +		0,0,0,0,1,0,0,0, +		0,0,1,1,1,1,1,0, +		0,0,0,0,1,0,0,0, +		0,0,0,1,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 2b '+' */ +	{		/* 2b '+' */  		0,0,0,0,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,1,1,1,1,1,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,1,1,1,1,1,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 2c ',' */ +	{		/* 2c ',' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,1,0,0,0,0,0,  	}, -	{              /* 2d '-' */ +	{		/* 2d '-' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 2e '.' */ -		0,0,0,0,0,0,0,0, +	{		/* 2e '.' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,0,0,1,0,0,0,0, +		0,0,0,1,1,0,0,0, +		0,0,0,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 2f '/' */ +	{		/* 2f '/' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,1,0,  		0,0,0,0,0,1,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,1,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 30 '0' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,1,1,0, -		1,0,0,0,1,0,1,0, -		1,0,0,1,0,0,1,0, -		1,0,1,0,0,0,1,0, -		1,1,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +	{		/* 30 '0' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,1,1,0, +		0,1,0,0,1,0,1,0, +		0,1,0,1,0,0,1,0, +		0,1,1,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 31 '1' */ -		0,0,0,1,0,0,0,0, -		0,0,1,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,1,1,1,0,0,0, +	{		/* 31 '1' */ +		0,0,0,0,0,0,0,0, +		0,0,0,1,1,0,0,0, +		0,0,1,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 32 '2' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, +	{		/* 32 '2' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,1,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 33 '3' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +	{		/* 33 '3' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,0,0,0,1,1,0,0,  		0,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 34 '4' */ -		1,0,0,0,0,0,0,0, -		1,0,0,1,0,0,0,0, -		1,0,0,1,0,0,0,0, -		1,1,1,1,1,1,1,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 34 '4' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,1,1,0,0,0, +		0,0,1,0,1,0,0,0, +		0,1,0,0,1,0,0,0, +		0,1,1,1,1,1,1,0, +		0,0,0,0,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 35 '5' */ -		1,1,1,1,1,1,1,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 35 '5' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0, +		0,1,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, +		0,0,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 36 '6' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 36 '6' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 37 '7' */ -		1,1,1,1,1,1,1,0, +	{		/* 37 '7' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0, +		0,0,0,0,0,0,1,0,  		0,0,0,0,0,1,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 38 '8' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +	{		/* 38 '8' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 39 '9' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, +	{		/* 39 '9' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,1,0,  		0,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 3a ':' */ +	{		/* 3a ':' */  		0,0,0,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0, +		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,0,0,0,0,0,  	}, -	{              /* 3b ';' */ +	{		/* 3b ';' */  		0,0,0,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,1,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -	}, -	{              /* 3c '<' */ -		0,0,0,0,1,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,1,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,0,1,0,0,0,0,0, +	}, +	{		/* 3c '<' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,1,0,0, +		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,0,1,0,0,0, +		0,0,0,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 3d '=' */ +	{		/* 3d '=' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,1,0, +		0,0,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 3e '>' */ -		0,0,1,0,0,0,0,0, +	{		/* 3e '>' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,0,0,1,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,1,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 3f '?' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		0,0,0,0,1,1,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 3f '?' */  		0,0,0,0,0,0,0,0, -		0,0,0,1,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,0,0,0,0,1,0,0, +		0,0,0,0,1,0,0,0,  		0,0,0,0,0,0,0,0, -	}, -	{              /* 40 '@' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,1,1,0,1,0, -		1,0,1,0,0,0,1,0, -		1,0,0,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		0,1,1,1,1,1,1,0, +		0,0,0,0,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 41 'A' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 40 '@' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,1,0,1,0, +		0,1,0,1,0,1,1,0, +		0,1,0,1,1,1,1,0, +		0,1,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 42 'B' */ -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, +	{		/* 41 'A' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,1,1,1,1,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 43 'C' */ +	{		/* 42 'B' */ +		0,0,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0,  		0,1,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 44 'D' */ -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, +	{		/* 43 'C' */  		0,0,0,0,0,0,0,0, -	}, -	{              /* 45 'E' */ -		1,1,1,1,1,1,1,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,1,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 46 'F' */ -		1,1,1,1,1,1,1,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, +	{		/* 44 'D' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,1,0,0, +		0,1,1,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 47 'G' */ +	{		/* 45 'E' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0, +		0,1,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,0,0, -		1,0,0,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0, +		0,0,0,0,0,0,0,0, +	}, +	{		/* 46 'F' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0, +		0,1,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 48 'H' */ -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 47 'G' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,1,1,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 49 'I' */ -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 48 'H' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,1,1,1,1,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 4a 'J' */ -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, +	{		/* 49 'I' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,1,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,1,1,1,1,1,0, +		0,0,0,0,0,0,0,0, +	}, +	{		/* 4a 'J' */ +		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,1,0,  		0,0,0,0,0,0,1,0,  		0,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 4b 'K' */ -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,1,0,0, -		1,0,0,0,1,0,0,0, -		1,1,1,1,0,0,0,0, -		1,0,0,0,1,0,0,0, -		1,0,0,0,0,1,0,0, -		1,0,0,0,0,0,1,0, +	{		/* 4b 'K' */  		0,0,0,0,0,0,0,0, -	}, -	{              /* 4c 'L' */ -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,1,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,1,0,0,0, +		0,1,1,1,0,0,0,0, +		0,1,0,0,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 4d 'M' */ -		1,0,0,0,0,0,1,0, -		1,1,0,0,0,1,1,0, -		1,0,1,0,1,0,1,0, -		1,0,0,1,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 4c 'L' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 4e 'N' */ -		1,0,0,0,0,0,1,0, -		1,1,0,0,0,0,1,0, -		1,0,1,0,0,0,1,0, -		1,0,0,1,0,0,1,0, -		1,0,0,0,1,0,1,0, -		1,0,0,0,0,1,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 4d 'M' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,1,0,0,1,1,0, +		0,1,0,1,1,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 4f 'O' */ -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +	{		/* 4e 'N' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,1,0,0,0,1,0, +		0,1,0,1,0,0,1,0, +		0,1,0,0,1,0,1,0, +		0,1,0,0,0,1,1,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 50 'P' */ -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, +	{		/* 4f 'O' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 51 'Q' */ +	{		/* 50 'P' */ +		0,0,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,1,0,1,0, -		1,0,0,0,0,1,0,0, -		0,1,1,1,1,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 52 'R' */ -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 51 'Q' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,1,0,0,1,0, +		0,1,0,0,1,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 53 'S' */ +	{		/* 52 'R' */ +		0,0,0,0,0,0,0,0,  		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0,  		0,1,1,1,1,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,0,1,0, +		0,0,0,0,0,0,0,0, +	}, +	{		/* 53 'S' */ +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 54 'T' */ +	{		/* 54 'T' */ +		0,0,0,0,0,0,0,0,  		1,1,1,1,1,1,1,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 55 'U' */ -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +	{		/* 55 'U' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 56 'V' */ -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,0,0,0,1,0,0, -		0,0,1,0,1,0,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 56 'V' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,0,1,0,0,1,0,0, +		0,0,0,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 57 'W' */ -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,1,0,0,1,0, -		1,0,1,0,1,0,1,0, -		1,1,0,0,0,1,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 57 'W' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,0,0,0,1,0, +		0,1,0,1,1,0,1,0, +		0,0,1,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 58 'X' */ -		1,0,0,0,0,0,1,0, -		0,1,0,0,0,1,0,0, -		0,0,1,0,1,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,1,0,1,0,0,0, -		0,1,0,0,0,1,0,0, -		1,0,0,0,0,0,1,0, +	{		/* 58 'X' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,1,0, +		0,0,1,0,0,1,0,0, +		0,0,0,1,1,0,0,0, +		0,0,0,1,1,0,0,0, +		0,0,1,0,0,1,0,0, +		0,1,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 59 'Y' */ -		1,0,0,0,0,0,1,0, +	{		/* 59 'Y' */ +		0,0,0,0,0,0,0,0,  		1,0,0,0,0,0,1,0,  		0,1,0,0,0,1,0,0,  		0,0,1,0,1,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +		0,0,0,0,0,0,0,0,  	}, -	{              /* 5a 'Z' */ -		1,1,1,1,1,1,1,0, +	{		/* 5a 'Z' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,1,1,0,  		0,0,0,0,0,1,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,1,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		1,1,1,1,1,1,1,0, +		0,1,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 5b '[' */ -		0,0,1,1,1,1,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,0,0,0,0,0, -		0,0,1,1,1,1,0,0, +	{		/* 5b '[' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,1,1,1,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 5c '\' */ -		1,0,0,0,0,0,0,0, +	{		/* 5c '\' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0,  		0,1,0,0,0,0,0,0,  		0,0,1,0,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,0,0,1,0,0, -		0,0,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 5d ']' */ -		0,0,1,1,1,1,0,0, -		0,0,0,0,0,1,0,0, -		0,0,0,0,0,1,0,0, -		0,0,0,0,0,1,0,0, -		0,0,0,0,0,1,0,0, -		0,0,0,0,0,1,0,0, -		0,0,1,1,1,1,0,0, +	{		/* 5d ']' */  		0,0,0,0,0,0,0,0, -	}, -	{              /* 5e '^' */ +		0,1,1,1,0,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,1,0,1,0,0,0, -		0,1,0,0,0,1,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,1,1,1,0,0,0,0,  		0,0,0,0,0,0,0,0, +	}, +	{		/* 5e '^' */  		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,1,1,1,0,0,0, +		0,1,0,1,0,1,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 5f '_' */ +	{		/* 5f '_' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, @@ -781,317 +781,316 @@ static const FontChar font[128]=  		0,0,0,0,0,0,0,0,  		1,1,1,1,1,1,1,1,  	}, -	{              /* 60 '`' */ -		0,0,1,0,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,0,1,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, +	{		/* 60 '`' */  		0,0,0,0,0,0,0,0, +		0,0,0,1,1,1,0,0, +		0,0,1,0,0,0,1,0, +		0,1,1,1,1,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,1,1,1,1,1,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 61 'a' */ +	{		/* 61 'a' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, +		0,0,1,1,1,0,0,0, +		0,0,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 62 'b' */ -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, +	{		/* 62 'b' */ +		0,0,0,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,0,1,0,0,0,1,0, +		0,0,1,0,0,0,1,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 63 'c' */ +	{		/* 63 'c' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,0,0,1,1,1,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,0,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 64 'd' */ -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, +	{		/* 64 'd' */  		0,0,0,0,0,0,0,0, -	}, -	{              /* 65 'e' */ +		0,0,0,0,0,1,0,0, +		0,0,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0, +	}, +	{		/* 65 'e' */  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,1,0, -		1,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0, -	}, -	{              /* 66 'f' */ -		0,0,1,1,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		1,1,1,1,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, +		0,0,1,1,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,1,1,1,0,0,0,  		0,1,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 67 'g' */ +	{		/* 66 'f' */  		0,0,0,0,0,0,0,0, +		0,0,0,0,1,1,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,1,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, -		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +	}, +	{		/* 67 'g' */  		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0, +		0,0,0,0,0,1,0,0, +		0,0,1,1,1,0,0,0,  	}, -	{              /* 68 'h' */ -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +	{		/* 68 'h' */ +		0,0,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,1,1,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 69 'i' */ +	{		/* 69 'i' */  		0,0,0,0,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0, +		0,0,1,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +		0,0,1,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 6a 'j' */ -		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,1,0, +	{		/* 6a 'j' */  		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,0,0,0,0,1,0,0,  		0,0,0,0,0,0,0,0, +		0,0,0,0,0,1,0,0, +		0,0,0,0,0,1,0,0, +		0,0,0,0,0,1,0,0, +		0,0,1,0,0,1,0,0, +		0,0,0,1,1,0,0,0,  	}, -	{              /* 6b 'k' */ -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,1,0,0, -		1,1,1,1,1,0,0,0, -		1,0,0,0,0,1,0,0, -		1,0,0,0,0,0,1,0, +	{		/* 6b 'k' */ +		0,0,0,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,1,0,0,0, +		0,0,1,1,0,0,0,0, +		0,0,1,1,0,0,0,0, +		0,0,1,0,1,0,0,0, +		0,0,1,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 6c 'l' */ -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 6c 'l' */ +		0,0,0,0,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,1,0,0,0,0, +		0,0,0,0,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 6d 'm' */ +	{		/* 6d 'm' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,0,0,0,1,0,0, -		1,0,1,0,1,0,1,0, -		1,0,0,1,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +		0,1,1,0,1,0,0,0, +		0,1,0,1,0,1,0,0, +		0,1,0,1,0,1,0,0, +		0,1,0,1,0,1,0,0, +		0,1,0,1,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 6e 'n' */ +	{		/* 6e 'n' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, +		0,1,1,1,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 6f 'o' */ +	{		/* 6f 'o' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,0,1,1,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 70 'p' */ -		0,0,0,0,0,0,0,0, +	{		/* 70 'p' */  		0,0,0,0,0,0,0,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,1,1,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, +		0,1,1,1,1,0,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,1,1,1,0,0,0, +		0,1,0,0,0,0,0,0, +		0,1,0,0,0,0,0,0,  	}, -	{              /* 71 'q' */ +	{		/* 71 'q' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,1,0, -		0,0,0,0,0,0,0,0, +		0,0,1,1,1,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0, +		0,0,0,0,0,1,0,0, +		0,0,0,0,0,1,1,0,  	}, -	{              /* 72 'r' */ +	{		/* 72 'r' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, -		1,0,0,0,0,0,0,0, +		0,0,0,1,1,1,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0, +		0,0,1,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 73 's' */ +	{		/* 73 's' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		1,0,0,0,0,0,0,0, -		0,1,1,1,1,1,0,0, -		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,0,1,1,1,0,0,0, +		0,1,0,0,0,0,0,0, +		0,0,1,1,1,0,0,0, +		0,0,0,0,0,1,0,0, +		0,1,1,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 74 't' */ -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,0,0, -		1,1,1,1,0,0,0,0, -		0,1,0,0,0,0,0,0, -		0,1,0,0,0,0,1,0, -		0,0,1,1,1,1,0,0, +	{		/* 74 't' */ +		0,0,0,0,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,1,1,1,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,0,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 75 'u' */ +	{		/* 75 'u' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 76 'v' */ +	{		/* 76 'v' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0,  		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,0,1,0,0,0,  		0,0,1,0,1,0,0,0,  		0,0,0,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 77 'w' */ +	{		/* 77 'w' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		1,0,0,1,0,0,1,0, -		1,0,1,0,1,0,1,0,  		0,1,0,0,0,1,0,0, +		0,1,0,1,0,1,0,0, +		0,1,0,1,0,1,0,0, +		0,1,0,1,0,1,0,0, +		0,0,1,0,1,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 78 'x' */ +	{		/* 78 'x' */  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0,  		0,1,0,0,0,1,0,0, -		0,0,1,1,1,0,0,0, +		0,0,1,0,1,0,0,0, +		0,0,0,1,0,0,0,0, +		0,0,1,0,1,0,0,0,  		0,1,0,0,0,1,0,0, -		1,0,0,0,0,0,1,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 79 'y' */ -		0,0,0,0,0,0,0,0, +	{		/* 79 'y' */  		0,0,0,0,0,0,0,0, -		1,0,0,0,0,0,1,0, -		1,0,0,0,0,0,1,0, -		0,1,1,1,1,1,1,0, -		0,0,0,0,0,0,1,0, -		0,1,1,1,1,1,0,0, -		0,0,0,0,0,0,0,0, -	}, -	{              /* 7a 'z' */  		0,0,0,0,0,0,0,0, -		0,0,0,0,0,0,0,0, -		1,1,1,1,1,1,1,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,1,0,0,0,1,0,0, +		0,0,1,1,1,1,0,0,  		0,0,0,0,0,1,0,0,  		0,0,1,1,1,0,0,0, -		0,1,0,0,0,0,0,0, -		1,1,1,1,1,1,1,0, -		0,0,0,0,0,0,0,0,  	}, -	{              /* 7b '{' */ +	{		/* 7a 'z' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,0,0,0,0, +		0,1,1,1,1,1,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0,  		0,0,1,0,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,0,1,0,0,0, +		0,1,1,1,1,1,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 7c '|' */ -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, -		0,0,0,1,0,0,0,0, +	{		/* 7b '{' */ +		0,0,0,0,0,0,0,0, +		0,0,0,0,1,1,1,0, +		0,0,0,0,1,0,0,0, +		0,0,1,1,0,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,1,1,0, +		0,0,0,0,0,0,0,0,  	}, -	{              /* 7d '}' */ -		0,0,0,1,0,0,0,0, +	{		/* 7c '|' */ +		0,0,0,0,0,0,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,0,1,0,0,0, -		0,0,0,0,0,1,0,0,  		0,0,0,0,1,0,0,0,  		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,1,0,0,0, +		0,0,0,0,0,0,0,0, +	}, +	{		/* 7d '}' */ +		0,0,0,0,0,0,0,0, +		0,1,1,1,0,0,0,0,  		0,0,0,1,0,0,0,0, +		0,0,0,0,1,1,0,0, +		0,0,0,1,0,0,0,0, +		0,0,0,1,0,0,0,0, +		0,1,1,1,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -	{              /* 7d '~' */ -		0,1,1,0,0,0,0,0, -		1,0,0,1,0,0,0,1, -		0,0,0,0,1,1,1,0, +	{		/* 7e '~' */ +		0,0,0,0,0,0,0,0, +		0,0,0,1,0,1,0,0, +		0,0,1,0,1,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  		0,0,0,0,0,0,0,0,  	}, -  	NULLCHARDEF,	/* 7f */  }; @@ -20,7 +20,7 @@      ------------------------------------------------------------------------- -    Config file +    Wrapper to SDL  */  static const char ident[]="$Id$"; @@ -171,8 +171,6 @@ void GFXInit(void)      if (SDL_Init(SDL_INIT_TIMER|SDL_INIT_VIDEO))  	Exit("Failed to init SDL: %s\n",SDL_GetError()); -    printf("scale = %d\n",scale); -      if (!(surface=SDL_SetVideoMode(SCR_W*scale,  				   SCR_H*scale,  				   0, @@ -227,6 +225,33 @@ void GFXEndFrame(int delay)  } +SDL_Event *GFXGetKey(void) +{ +    static SDL_Event e; + +    while(SDL_PollEvent(&e)) +    { +    	if (e.type==SDL_KEYUP || e.type==SDL_KEYDOWN) +	    return &e; +    } + +    return NULL; +} + + +SDL_Event *GFXWaitKey(void) +{ +    static SDL_Event e; + +    do +    { +    	SDL_WaitEvent(&e); +    } while (e.type!=SDL_KEYUP); + +    return &e; +} + +  void GFXPlot(int x, int y, Uint32 col)  {      LOCK; @@ -72,10 +72,21 @@ void		GFXStartFrame(void);  /* Indicate a frame is done and refreshes the screen     If delay is TRUE, sleeps to implement the frames_per_sec config. +   It's safe to call this multiple times without a matching GFXStartFrame().  */  void		GFXEndFrame(int delay); +/* Suck out keyboard events.  Returns NULL if no more keyboard events +*/ +SDL_Event	*GFXGetKey(void); + + +/* Wait for a keypress (key up event) +*/ +SDL_Event	*GFXWaitKey(void); + +  /*      Note that no bound checking (except for GFXPrint()) is done - it is the      callers responsibility to plot onscreen. diff --git a/src/gui.c b/src/gui.c new file mode 100644 index 0000000..bda46d3 --- /dev/null +++ b/src/gui.c @@ -0,0 +1,149 @@ +/* + +    ezx81 - X11 ZX81 emulator + +    Copyright (C) 2003  Ian Cowburn (ianc@noddybox.demon.co.uk) + +    This program is free software; you can redistribute it and/or modify +    it under the terms of the GNU General Public License as published by +    the Free Software Foundation; either version 2 of the License, or +    (at your option) any later version. + +    This program is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +    GNU General Public License for more details. + +    You should have received a copy of the GNU General Public License +    along with this program; if not, write to the Free Software +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + +    ------------------------------------------------------------------------- + +    Basic GUI routines + +*/ +static const char ident[]="$Id$"; + +#include <stdlib.h> +#include <stdio.h> +#include <string.h> +#include <stdarg.h> + +#include "gui.h" +#include "gfx.h" +#include "exit.h" + +static const char ident_h[]=EZX81_GUI_H; + + +/* ---------------------------------------- MACROS +*/ +#ifndef TRUE +#define TRUE 1 +#endif + +#ifndef FALSE +#define FALSE 0 +#endif + +/* Must match gfx.c +*/ +#define SCR_W	320 +#define SCR_H	200 + +/* ---------------------------------------- STATICS +*/ + + +/* ---------------------------------------- PRIVATE FUNCTIONS +*/ +static void *Malloc(size_t size) +{ +    void *p=malloc(size); + +    if (!p) +    	Exit("malloc failed for %lu bytes\n",(unsigned long)size); + +    return p; +} + + +static void Centre(const char *p, int y, int r, int g, int b) +{ +    GFXPrint((SCR_W-strlen(p)*8)/2,y,GFXRGB(r,g,b),"%s",p); +} + + +/* ---------------------------------------- EXPORTED INTERFACES +*/ +void GUIMessage(const char *title, const char *format,...) +{ +    char buff[257]; +    va_list va; +    char *p; +    int no; +    int f; +    char **line; +    int width; +    int height; +    int x,y; + +    va_start(va,format); +    vsprintf(buff,format,va); +    va_end(va); + +    p=buff; +    no=1; + +    while(*p) +    { +    	if (*p=='\n') +	    no++; + +	p++; +    } + +    line=Malloc(sizeof *line * no); + +    line[0]=strtok(buff,"\n"); +    width=strlen(line[0]); + +    for(f=1;f<no;f++) +    { +    	line[f]=strtok(NULL,"\n"); + +	if (strlen(line[f])>width) +	    width=strlen(line[f]); +    } + +    width=(width*8)+16; +    height=(no+3)*10; +    y=(SCR_H-height)/2; +    x=(SCR_W-width)/2; + +    GFXRect(x-1,y-1, +	    width+2,height+2, +	    GFXRGB(255,255,255),FALSE); + +    GFXRect(x,y, +	    width,height, +	    GFXRGB(0,0,0),TRUE); + +    Centre(title,y+2,255,255,255); +    GFXHLine(x+2,x+width-4,y+10,GFXRGB(255,255,255)); + +    for(f=0;f<no;f++) +    	Centre(line[f],y+5+10*(f+1),200,200,200); + +    Centre("Press a key",y+height-10,255,0,0); + +    GFXEndFrame(FALSE); + +    GFXWaitKey(); + +    free(line); +} + + +/* END OF FILE */ diff --git a/src/gui.h b/src/gui.h new file mode 100644 index 0000000..02a5db5 --- /dev/null +++ b/src/gui.h @@ -0,0 +1,45 @@ +/* + +    ezx81 - X11 ZX81 emulator + +    Copyright (C) 2003  Ian Cowburn (ianc@noddybox.demon.co.uk) + +    This program is free software; you can redistribute it and/or modify +    it under the terms of the GNU General Public License as published by +    the Free Software Foundation; either version 2 of the License, or +    (at your option) any later version. + +    This program is distributed in the hope that it will be useful, +    but WITHOUT ANY WARRANTY; without even the implied warranty of +    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the +    GNU General Public License for more details. + +    You should have received a copy of the GNU General Public License +    along with this program; if not, write to the Free Software +    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA + +    ------------------------------------------------------------------------- + +    Basic GUI routines + +*/ + +#ifndef EZX81_GUI_H +#define EZX81_GUI_H "$Id$" + +#include "SDL.h" + + +/* ---------------------------------------- INTERFACES +*/ + +/* Display a simple message box.  A message of longer than 256 bytes causes +   undefined behaviour.  Newlines cause a line break. +*/ +void	GUIMessage(const char *title, const char *format,...); + + +#endif + + +/* END OF FILE */ @@ -31,6 +31,7 @@ static const char id[]="$Id$";  #include "z80.h"  #include "zx81.h"  #include "gfx.h" +#include "gui.h"  #include "config.h"  #include "exit.h" @@ -83,28 +84,33 @@ int main(int argc, char *argv[])      GFXClear(grey);      GFXPrint(1,1,black,"Quick SDL check");      GFXPrint(2,2,white,"Quick SDL check"); -    GFXRect(100,100,20,20,white,TRUE); +    GFXRect(100,100,20,20,black,TRUE);      GFXRect(99,99,22,22,white,FALSE); +    GFXRect(80,80,1,1,black,TRUE); +    GFXRect(80,90,1,1,black,FALSE); + +    GFXRect(90,80,2,2,black,TRUE); +    GFXRect(90,90,2,2,black,FALSE); + +    GFXRect(100,80,3,3,black,TRUE); +    GFXRect(100,90,3,3,black,FALSE); +      GFXHLine(0,319,0,white);      GFXVLine(0,1,199,black);      { -    SDL_Event e;      int f; -    for(f=0;f<1000;f++) +    for(f=0;f<10;f++)      {      	GFXPlot(rand()%320,rand()%200,white);  	GFXEndFrame(FALSE);      } - -    do -    { -    	SDL_WaitEvent(&e); -    } while(e.type!=SDL_KEYUP);      } +    GUIMessage("Test Message","Hello\nWorld\n%s",SConfig(CONF_TAPEDIR)); +      SDL_Quit();      return EXIT_SUCCESS; | 
