Updated MacOS Classic build

--HG--
extra : convert_revision : svn%3Ac70aab31-4412-0410-b14c-859654838e24/trunk%401520
This commit is contained in:
Sam Lantinga 2006-03-13 05:36:42 +00:00
parent 34d826583e
commit 61549bf6a5
11 changed files with 33 additions and 24 deletions

View file

@ -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;
@ -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);
}

View file

@ -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;
@ -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 ||

View file

@ -167,7 +167,7 @@ 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);
@ -175,7 +175,7 @@ int main(int argc, char **argv)
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,

View file

@ -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;
@ -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);
}