Skip to content

Commit

Permalink
Updated MacOS Classic build
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Mar 13, 2006
1 parent 5342b93 commit bd2e494
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 24 deletions.
Binary file modified CWprojects.sea.bin
Binary file not shown.
Binary file modified MPWmake.sea.bin
Binary file not shown.
3 changes: 1 addition & 2 deletions include/SDL_config_macos.h
Expand Up @@ -31,6 +31,7 @@ typedef signed short int16_t;
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
Expand Down Expand Up @@ -62,8 +63,6 @@ typedef unsigned int uint32_t;
#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 */
Expand Down
4 changes: 4 additions & 0 deletions src/main/macos/exports/SDL.x
Expand Up @@ -67,6 +67,7 @@
SDL_JoystickClose
SDL_EnableUNICODE
SDL_EnableKeyRepeat
SDL_GetKeyRepeat
SDL_GetKeyState
SDL_GetModState
SDL_SetModState
Expand Down Expand Up @@ -199,6 +200,9 @@
SDL_strlwr
SDL_ltoa
SDL_ultoa
SDL_strcasecmp
SDL_strncasecmp
SDL_snprintf
SDL_vsnprintf
SDL_iconv_string
SDL_InitQuickDraw
4 changes: 3 additions & 1 deletion src/main/macos/exports/gendef.pl
Expand Up @@ -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)) ) {
Expand Down Expand Up @@ -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";
27 changes: 15 additions & 12 deletions src/main/macosx/exports/SDL.x
Expand Up @@ -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
Expand Down Expand Up @@ -79,6 +67,7 @@
_SDL_JoystickClose
_SDL_EnableUNICODE
_SDL_EnableKeyRepeat
_SDL_GetKeyRepeat
_SDL_GetKeyState
_SDL_GetModState
_SDL_SetModState
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
2 changes: 1 addition & 1 deletion src/main/macosx/exports/gendef.pl
Expand Up @@ -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)) ) {
Expand All @@ -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";
4 changes: 2 additions & 2 deletions test/testalpha.c
Expand Up @@ -60,7 +60,7 @@ static void FillBackground(SDL_Surface *screen)
}

/* 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;
Expand Down Expand Up @@ -401,7 +401,7 @@ int main(int argc, char *argv[])
FillBackground(screen);

/* Create the light */
light = CreateLight(screen, 82);
light = CreateLight(82);
if ( light == NULL ) {
quit(1);
}
Expand Down
5 changes: 3 additions & 2 deletions test/testiconv.c
Expand Up @@ -44,7 +44,7 @@ int main(int argc, char *argv[])
char buffer[BUFSIZ];
char *ucs4;
char *test[2];
int i, j, index = 0;
int i, index = 0;
FILE *file;
int errors = 0;

Expand All @@ -59,8 +59,9 @@ int main(int argc, char *argv[])

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 ||
Expand Down
4 changes: 2 additions & 2 deletions test/testpalette.c
Expand Up @@ -167,15 +167,15 @@ int main(int argc, char **argv)
}

/* 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);
}

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,
Expand Down
4 changes: 2 additions & 2 deletions test/testsprite.c
Expand Up @@ -28,7 +28,7 @@ static void quit(int rc)
exit(rc);
}

int LoadSprite(SDL_Surface *screen, char *file)
int LoadSprite(char *file)
{
SDL_Surface *temp;

Expand Down Expand Up @@ -221,7 +221,7 @@ int main(int argc, char *argv[])
}

/* Load the sprite */
if ( LoadSprite(screen, "icon.bmp") < 0 ) {
if ( LoadSprite("icon.bmp") < 0 ) {
quit(1);
}

Expand Down

0 comments on commit bd2e494

Please sign in to comment.