From: David Griffith Date: Tue, 17 Jan 2012 04:28:55 +0000 (-0800) Subject: More SDL tweaks. Still won't run. X-Git-Url: https://scope-eye.net/git/?a=commitdiff_plain;h=fd0f4845966ef3b93ad5db5dba1dc615ff0cbe95;p=liskon_frotz.git More SDL tweaks. Still won't run. --- diff --git a/src/common/frotz.h b/src/common/frotz.h index 7c7f45e..3157673 100644 --- a/src/common/frotz.h +++ b/src/common/frotz.h @@ -31,6 +31,7 @@ typedef int bool; #include +/* typedef unsigned short zbyte; */ typedef unsigned char zbyte; typedef unsigned short zword; diff --git a/src/sdl/sf_frotz.h b/src/sdl/sf_frotz.h index 3d356b3..ee88a2d 100644 --- a/src/sdl/sf_frotz.h +++ b/src/sdl/sf_frotz.h @@ -201,7 +201,7 @@ void sf_sleep( int millisecs); unsigned long sf_ticks (void); -void sf_DrawInput(zword * buffer, int pos, int ptx, int pty, int width, bool cursor); +void sf_DrawInput(zchar * buffer, int pos, int ptx, int pty, int width, bool cursor); int sf_aiffwav( FILE *f, int foffs, void ** wav, int *size); diff --git a/src/sdl/sf_sig.c b/src/sdl/sf_sig.c index 0de4b13..9a50c50 100644 --- a/src/sdl/sf_sig.c +++ b/src/sdl/sf_sig.c @@ -1,5 +1,6 @@ #include #include +#include #include "sf_frotz.h" @@ -43,8 +44,10 @@ void sf_installhandlers() #include /* get REG_EIP from ucontext.h */ +#ifndef __USE_GNU #define __USE_GNU #include +#endif // REG_EIP does not exist on 64bit CPU #if defined(__amd64__) || defined (__x86_64__) diff --git a/src/sdl/sf_video.c b/src/sdl/sf_video.c index 4305eeb..a5f4d28 100644 --- a/src/sdl/sf_video.c +++ b/src/sdl/sf_video.c @@ -43,7 +43,7 @@ void sf_getclip( int *x, int *y, int *w, int *h) *w = xmax-xmin; *h = ymax-ymin; } -static int mywcslen( zword *b) +static int mywcslen( zchar *b) { int n=0; while (*b++) n++; @@ -715,7 +715,7 @@ zchar os_read_key(int timeout, int cursor) #define MAXHISTORY 8192 static zword History[MAXHISTORY] = {0}; static int histptr = 0; -static void addtoHistory( zword *buf) +static void addtoHistory( zchar *buf) { int n = mywcslen(buf)+2; int avail = MAXHISTORY - histptr; @@ -958,7 +958,7 @@ zchar os_read_line(int max, zchar *buf, int timeout, int width, int continued) } // Draw the current input line -void sf_DrawInput(zword * buffer, int pos, int ptx, int pty, int width, bool cursor) +void sf_DrawInput(zchar * buffer, int pos, int ptx, int pty, int width, bool cursor) { int height; SF_textsetting * ts = sf_curtextsetting();