Mercurial > sdl-ios-xcode
changeset 1516:4d241ea8a1cd
Updated MacOS Classic build
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Mon, 13 Mar 2006 05:36:42 +0000 |
parents | 1e18097b1d7a |
children | 39f6ad4693a5 |
files | CWprojects.sea.bin MPWmake.sea.bin include/SDL_config_macos.h src/main/macos/exports/SDL.x src/main/macos/exports/gendef.pl src/main/macosx/exports/SDL.x src/main/macosx/exports/gendef.pl test/testalpha.c test/testiconv.c test/testpalette.c test/testsprite.c |
diffstat | 11 files changed, 33 insertions(+), 24 deletions(-) [+] |
line wrap: on
line diff
--- a/include/SDL_config_macos.h Mon Mar 13 04:35:59 2006 +0000 +++ b/include/SDL_config_macos.h Mon Mar 13 05:36:42 2006 +0000 @@ -31,6 +31,7 @@ typedef unsigned short uint16_t; typedef signed int int32_t; typedef unsigned int uint32_t; +typedef unsigned int uintptr_t; /* Useful headers */ #define HAVE_STDIO_H 1 @@ -62,8 +63,6 @@ #define HAVE_ATOF 1 #define HAVE_STRCMP 1 #define HAVE_STRNCMP 1 -#define HAVE_STRICMP 1 -#define HAVE_STRCASECMP 1 #define HAVE_SSCANF 1 /* Enable various audio drivers */
--- a/src/main/macos/exports/SDL.x Mon Mar 13 04:35:59 2006 +0000 +++ b/src/main/macos/exports/SDL.x Mon Mar 13 05:36:42 2006 +0000 @@ -67,6 +67,7 @@ SDL_JoystickClose SDL_EnableUNICODE SDL_EnableKeyRepeat + SDL_GetKeyRepeat SDL_GetKeyState SDL_GetModState SDL_SetModState @@ -199,6 +200,9 @@ SDL_strlwr SDL_ltoa SDL_ultoa + SDL_strcasecmp + SDL_strncasecmp SDL_snprintf SDL_vsnprintf + SDL_iconv_string SDL_InitQuickDraw
--- a/src/main/macos/exports/gendef.pl Mon Mar 13 04:35:59 2006 +0000 +++ b/src/main/macos/exports/gendef.pl Mon Mar 13 05:36:42 2006 +0000 @@ -3,7 +3,6 @@ # Program to take a set of header files and generate DLL export definitions # Special exports to ignore for this platform -$exclude{"SDL_CreateThread_Core"} = 1; while ( ($file = shift(@ARGV)) ) { if ( ! defined(open(FILE, $file)) ) { @@ -35,6 +34,9 @@ print "\tSDL_strlwr\n"; print "\tSDL_ltoa\n"; print "\tSDL_ultoa\n"; +print "\tSDL_strcasecmp\n"; +print "\tSDL_strncasecmp\n"; print "\tSDL_snprintf\n"; print "\tSDL_vsnprintf\n"; +print "\tSDL_iconv_string\n"; print "\tSDL_InitQuickDraw\n";
--- a/src/main/macosx/exports/SDL.x Mon Mar 13 04:35:59 2006 +0000 +++ b/src/main/macosx/exports/SDL.x Mon Mar 13 05:36:42 2006 +0000 @@ -37,18 +37,6 @@ _SDL_HasSSE _SDL_HasSSE2 _SDL_HasAltiVec - _SDL_ReadLE16 - _SDL_ReadBE16 - _SDL_ReadLE32 - _SDL_ReadBE32 - _SDL_ReadLE64 - _SDL_ReadBE64 - _SDL_WriteLE16 - _SDL_WriteBE16 - _SDL_WriteLE32 - _SDL_WriteBE32 - _SDL_WriteLE64 - _SDL_WriteBE64 _SDL_SetError _SDL_GetError _SDL_ClearError @@ -79,6 +67,7 @@ _SDL_JoystickClose _SDL_EnableUNICODE _SDL_EnableKeyRepeat + _SDL_GetKeyRepeat _SDL_GetKeyState _SDL_GetModState _SDL_SetModState @@ -117,8 +106,21 @@ _SDL_RWFromConstMem _SDL_AllocRW _SDL_FreeRW + _SDL_ReadLE16 + _SDL_ReadBE16 + _SDL_ReadLE32 + _SDL_ReadBE32 + _SDL_ReadLE64 + _SDL_ReadBE64 + _SDL_WriteLE16 + _SDL_WriteBE16 + _SDL_WriteLE32 + _SDL_WriteBE32 + _SDL_WriteLE64 + _SDL_WriteBE64 _SDL_GetWMInfo _SDL_CreateThread + _SDL_CreateThread _SDL_ThreadID _SDL_GetThreadID _SDL_WaitThread @@ -186,5 +188,6 @@ _SDL_WM_ToggleFullScreen _SDL_WM_GrabInput _SDL_SoftStretch + SDL_iconv_string .objc_class_name_SDL_QuartzWindow .objc_class_name_SDL_QuartzWindowDelegate
--- a/src/main/macosx/exports/gendef.pl Mon Mar 13 04:35:59 2006 +0000 +++ b/src/main/macosx/exports/gendef.pl Mon Mar 13 05:36:42 2006 +0000 @@ -5,7 +5,6 @@ # Special exports to ignore for this platform $exclude{"SDL_putenv"} = 1; $exclude{"SDL_getenv"} = 1; -$exclude{"SDL_CreateThread_Core"} = 1; while ( ($file = shift(@ARGV)) ) { if ( ! defined(open(FILE, $file)) ) { @@ -24,5 +23,6 @@ } # Special exports to include for this platform +print "\tSDL_iconv_string\n"; print "\t.objc_class_name_SDL_QuartzWindow\n"; print "\t.objc_class_name_SDL_QuartzWindowDelegate\n";
--- a/test/testalpha.c Mon Mar 13 04:35:59 2006 +0000 +++ b/test/testalpha.c Mon Mar 13 05:36:42 2006 +0000 @@ -60,7 +60,7 @@ } /* Create a "light" -- a yellowish surface with variable alpha */ -SDL_Surface *CreateLight(SDL_Surface *screen, int radius) +SDL_Surface *CreateLight(int radius) { Uint8 trans, alphamask; int range, addition; @@ -401,7 +401,7 @@ FillBackground(screen); /* Create the light */ - light = CreateLight(screen, 82); + light = CreateLight(82); if ( light == NULL ) { quit(1); }
--- a/test/testiconv.c Mon Mar 13 04:35:59 2006 +0000 +++ b/test/testiconv.c Mon Mar 13 05:36:42 2006 +0000 @@ -44,7 +44,7 @@ char buffer[BUFSIZ]; char *ucs4; char *test[2]; - int i, j, index = 0; + int i, index = 0; FILE *file; int errors = 0; @@ -59,8 +59,9 @@ while ( fgets(buffer, sizeof(buffer), file) ) { /* Convert to UCS-4 */ + size_t len; ucs4 = SDL_iconv_string("UCS-4", "UTF-8", buffer, SDL_strlen(buffer)+1); - size_t len = (widelen(ucs4)+1)*4; + len = (widelen(ucs4)+1)*4; for ( i = 0; i < SDL_arraysize(formats); ++i ) { if ( (SDL_strncasecmp(formats[i], "UTF16", 5) == 0 || SDL_strncasecmp(formats[i], "UTF-16", 6) == 0 ||
--- a/test/testpalette.c Mon Mar 13 04:35:59 2006 +0000 +++ b/test/testpalette.c Mon Mar 13 05:36:42 2006 +0000 @@ -167,7 +167,7 @@ } /* Ask explicitly for 8bpp and a hardware palette */ - if(!(screen = SDL_SetVideoMode(SCRW, SCRH, 8, vidflags | SDL_HWPALETTE))) { + if((screen = SDL_SetVideoMode(SCRW, SCRH, 8, vidflags | SDL_HWPALETTE)) == NULL) { fprintf(stderr, "error setting %dx%d 8bpp indexed mode: %s\n", SCRW, SCRH, SDL_GetError()); quit(1); @@ -175,7 +175,7 @@ if (vidflags & SDL_FULLSCREEN) SDL_ShowCursor (SDL_FALSE); - if(!(boat[0] = SDL_LoadBMP("sail.bmp"))) + if((boat[0] = SDL_LoadBMP("sail.bmp")) == NULL) sdlerr("loading sail.bmp"); /* We've chosen magenta (#ff00ff) as colour key for the boat */ SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,
--- a/test/testsprite.c Mon Mar 13 04:35:59 2006 +0000 +++ b/test/testsprite.c Mon Mar 13 05:36:42 2006 +0000 @@ -28,7 +28,7 @@ exit(rc); } -int LoadSprite(SDL_Surface *screen, char *file) +int LoadSprite(char *file) { SDL_Surface *temp; @@ -221,7 +221,7 @@ } /* Load the sprite */ - if ( LoadSprite(screen, "icon.bmp") < 0 ) { + if ( LoadSprite("icon.bmp") < 0 ) { quit(1); }