Commit 61549bf6 authored by Sam Lantinga's avatar Sam Lantinga

Updated MacOS Classic build

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401520
parent 34d82658
No preview for this file type
No preview for this file type
...@@ -31,6 +31,7 @@ typedef signed short int16_t; ...@@ -31,6 +31,7 @@ typedef signed short int16_t;
typedef unsigned short uint16_t; typedef unsigned short uint16_t;
typedef signed int int32_t; typedef signed int int32_t;
typedef unsigned int uint32_t; typedef unsigned int uint32_t;
typedef unsigned int uintptr_t;
/* Useful headers */ /* Useful headers */
#define HAVE_STDIO_H 1 #define HAVE_STDIO_H 1
...@@ -62,8 +63,6 @@ typedef unsigned int uint32_t; ...@@ -62,8 +63,6 @@ typedef unsigned int uint32_t;
#define HAVE_ATOF 1 #define HAVE_ATOF 1
#define HAVE_STRCMP 1 #define HAVE_STRCMP 1
#define HAVE_STRNCMP 1 #define HAVE_STRNCMP 1
#define HAVE_STRICMP 1
#define HAVE_STRCASECMP 1
#define HAVE_SSCANF 1 #define HAVE_SSCANF 1
/* Enable various audio drivers */ /* Enable various audio drivers */
......
...@@ -67,6 +67,7 @@ ...@@ -67,6 +67,7 @@
SDL_JoystickClose SDL_JoystickClose
SDL_EnableUNICODE SDL_EnableUNICODE
SDL_EnableKeyRepeat SDL_EnableKeyRepeat
SDL_GetKeyRepeat
SDL_GetKeyState SDL_GetKeyState
SDL_GetModState SDL_GetModState
SDL_SetModState SDL_SetModState
...@@ -199,6 +200,9 @@ ...@@ -199,6 +200,9 @@
SDL_strlwr SDL_strlwr
SDL_ltoa SDL_ltoa
SDL_ultoa SDL_ultoa
SDL_strcasecmp
SDL_strncasecmp
SDL_snprintf SDL_snprintf
SDL_vsnprintf SDL_vsnprintf
SDL_iconv_string
SDL_InitQuickDraw SDL_InitQuickDraw
...@@ -3,7 +3,6 @@ ...@@ -3,7 +3,6 @@
# Program to take a set of header files and generate DLL export definitions # Program to take a set of header files and generate DLL export definitions
# Special exports to ignore for this platform # Special exports to ignore for this platform
$exclude{"SDL_CreateThread_Core"} = 1;
while ( ($file = shift(@ARGV)) ) { while ( ($file = shift(@ARGV)) ) {
if ( ! defined(open(FILE, $file)) ) { if ( ! defined(open(FILE, $file)) ) {
...@@ -35,6 +34,9 @@ print "\tSDL_strupr\n"; ...@@ -35,6 +34,9 @@ print "\tSDL_strupr\n";
print "\tSDL_strlwr\n"; print "\tSDL_strlwr\n";
print "\tSDL_ltoa\n"; print "\tSDL_ltoa\n";
print "\tSDL_ultoa\n"; print "\tSDL_ultoa\n";
print "\tSDL_strcasecmp\n";
print "\tSDL_strncasecmp\n";
print "\tSDL_snprintf\n"; print "\tSDL_snprintf\n";
print "\tSDL_vsnprintf\n"; print "\tSDL_vsnprintf\n";
print "\tSDL_iconv_string\n";
print "\tSDL_InitQuickDraw\n"; print "\tSDL_InitQuickDraw\n";
...@@ -37,18 +37,6 @@ ...@@ -37,18 +37,6 @@
_SDL_HasSSE _SDL_HasSSE
_SDL_HasSSE2 _SDL_HasSSE2
_SDL_HasAltiVec _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_SetError
_SDL_GetError _SDL_GetError
_SDL_ClearError _SDL_ClearError
...@@ -79,6 +67,7 @@ ...@@ -79,6 +67,7 @@
_SDL_JoystickClose _SDL_JoystickClose
_SDL_EnableUNICODE _SDL_EnableUNICODE
_SDL_EnableKeyRepeat _SDL_EnableKeyRepeat
_SDL_GetKeyRepeat
_SDL_GetKeyState _SDL_GetKeyState
_SDL_GetModState _SDL_GetModState
_SDL_SetModState _SDL_SetModState
...@@ -117,8 +106,21 @@ ...@@ -117,8 +106,21 @@
_SDL_RWFromConstMem _SDL_RWFromConstMem
_SDL_AllocRW _SDL_AllocRW
_SDL_FreeRW _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_GetWMInfo
_SDL_CreateThread _SDL_CreateThread
_SDL_CreateThread
_SDL_ThreadID _SDL_ThreadID
_SDL_GetThreadID _SDL_GetThreadID
_SDL_WaitThread _SDL_WaitThread
...@@ -186,5 +188,6 @@ ...@@ -186,5 +188,6 @@
_SDL_WM_ToggleFullScreen _SDL_WM_ToggleFullScreen
_SDL_WM_GrabInput _SDL_WM_GrabInput
_SDL_SoftStretch _SDL_SoftStretch
SDL_iconv_string
.objc_class_name_SDL_QuartzWindow .objc_class_name_SDL_QuartzWindow
.objc_class_name_SDL_QuartzWindowDelegate .objc_class_name_SDL_QuartzWindowDelegate
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
# Special exports to ignore for this platform # Special exports to ignore for this platform
$exclude{"SDL_putenv"} = 1; $exclude{"SDL_putenv"} = 1;
$exclude{"SDL_getenv"} = 1; $exclude{"SDL_getenv"} = 1;
$exclude{"SDL_CreateThread_Core"} = 1;
while ( ($file = shift(@ARGV)) ) { while ( ($file = shift(@ARGV)) ) {
if ( ! defined(open(FILE, $file)) ) { if ( ! defined(open(FILE, $file)) ) {
...@@ -24,5 +23,6 @@ while ( ($file = shift(@ARGV)) ) { ...@@ -24,5 +23,6 @@ while ( ($file = shift(@ARGV)) ) {
} }
# Special exports to include for this platform # 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_QuartzWindow\n";
print "\t.objc_class_name_SDL_QuartzWindowDelegate\n"; print "\t.objc_class_name_SDL_QuartzWindowDelegate\n";
...@@ -60,7 +60,7 @@ static void FillBackground(SDL_Surface *screen) ...@@ -60,7 +60,7 @@ static void FillBackground(SDL_Surface *screen)
} }
/* Create a "light" -- a yellowish surface with variable alpha */ /* 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; Uint8 trans, alphamask;
int range, addition; int range, addition;
...@@ -401,7 +401,7 @@ int main(int argc, char *argv[]) ...@@ -401,7 +401,7 @@ int main(int argc, char *argv[])
FillBackground(screen); FillBackground(screen);
/* Create the light */ /* Create the light */
light = CreateLight(screen, 82); light = CreateLight(82);
if ( light == NULL ) { if ( light == NULL ) {
quit(1); quit(1);
} }
......
...@@ -44,7 +44,7 @@ int main(int argc, char *argv[]) ...@@ -44,7 +44,7 @@ int main(int argc, char *argv[])
char buffer[BUFSIZ]; char buffer[BUFSIZ];
char *ucs4; char *ucs4;
char *test[2]; char *test[2];
int i, j, index = 0; int i, index = 0;
FILE *file; FILE *file;
int errors = 0; int errors = 0;
...@@ -59,8 +59,9 @@ int main(int argc, char *argv[]) ...@@ -59,8 +59,9 @@ int main(int argc, char *argv[])
while ( fgets(buffer, sizeof(buffer), file) ) { while ( fgets(buffer, sizeof(buffer), file) ) {
/* Convert to UCS-4 */ /* Convert to UCS-4 */
size_t len;
ucs4 = SDL_iconv_string("UCS-4", "UTF-8", buffer, SDL_strlen(buffer)+1); 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 ) { for ( i = 0; i < SDL_arraysize(formats); ++i ) {
if ( (SDL_strncasecmp(formats[i], "UTF16", 5) == 0 || if ( (SDL_strncasecmp(formats[i], "UTF16", 5) == 0 ||
SDL_strncasecmp(formats[i], "UTF-16", 6) == 0 || SDL_strncasecmp(formats[i], "UTF-16", 6) == 0 ||
......
...@@ -167,7 +167,7 @@ int main(int argc, char **argv) ...@@ -167,7 +167,7 @@ int main(int argc, char **argv)
} }
/* Ask explicitly for 8bpp and a hardware palette */ /* 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", fprintf(stderr, "error setting %dx%d 8bpp indexed mode: %s\n",
SCRW, SCRH, SDL_GetError()); SCRW, SCRH, SDL_GetError());
quit(1); quit(1);
...@@ -175,7 +175,7 @@ int main(int argc, char **argv) ...@@ -175,7 +175,7 @@ int main(int argc, char **argv)
if (vidflags & SDL_FULLSCREEN) SDL_ShowCursor (SDL_FALSE); 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"); sdlerr("loading sail.bmp");
/* We've chosen magenta (#ff00ff) as colour key for the boat */ /* We've chosen magenta (#ff00ff) as colour key for the boat */
SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL, SDL_SetColorKey(boat[0], SDL_SRCCOLORKEY | SDL_RLEACCEL,
......
...@@ -28,7 +28,7 @@ static void quit(int rc) ...@@ -28,7 +28,7 @@ static void quit(int rc)
exit(rc); exit(rc);
} }
int LoadSprite(SDL_Surface *screen, char *file) int LoadSprite(char *file)
{ {
SDL_Surface *temp; SDL_Surface *temp;
...@@ -221,7 +221,7 @@ int main(int argc, char *argv[]) ...@@ -221,7 +221,7 @@ int main(int argc, char *argv[])
} }
/* Load the sprite */ /* Load the sprite */
if ( LoadSprite(screen, "icon.bmp") < 0 ) { if ( LoadSprite("icon.bmp") < 0 ) {
quit(1); quit(1);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment