Mercurial > sdl-ios-xcode
comparison test/testoverlay2.c @ 673:63419da96d13
*** empty log message ***
author | Sam Lantinga <slouken@libsdl.org> |
---|---|
date | Fri, 08 Aug 2003 21:39:12 +0000 |
parents | 5955fa16d4b8 |
children | b14fdadd8311 |
comparison
equal
deleted
inserted
replaced
672:5955fa16d4b8 | 673:63419da96d13 |
---|---|
249 | 249 |
250 SDL_UnlockYUVOverlay(o); | 250 SDL_UnlockYUVOverlay(o); |
251 SDL_UnlockSurface(s); | 251 SDL_UnlockSurface(s); |
252 } | 252 } |
253 | 253 |
254 void Draw() | |
255 { | |
256 } | |
257 | |
258 static void PrintUsage(char *argv0) | 254 static void PrintUsage(char *argv0) |
259 { | 255 { |
260 fprintf(stderr, "Usage: %s [arg] [arg] [arg] ...\n", argv0); | 256 fprintf(stderr, "Usage: %s [arg] [arg] [arg] ...\n", argv0); |
261 fprintf(stderr, "Where 'arg' is one of:\n"); | 257 fprintf(stderr, "Where 'arg' is one of:\n"); |
262 fprintf(stderr, " -fps <frames per second>\n"); | 258 fprintf(stderr, " -fps <frames per second>\n"); |
382 free(RawMooseData); | 378 free(RawMooseData); |
383 return 1; | 379 return 1; |
384 } | 380 } |
385 | 381 |
386 /* load the trojan moose images */ | 382 /* load the trojan moose images */ |
387 handle=SDL_RWFromFile("moose.dat", "r"); | 383 handle=SDL_RWFromFile("moose.dat", "rb"); |
388 if (handle==NULL) | 384 if (handle==NULL) |
389 { | 385 { |
390 fprintf(stderr, "Can't find the file moose.dat !\n"); | 386 fprintf(stderr, "Can't find the file moose.dat !\n"); |
391 free(RawMooseData); | 387 free(RawMooseData); |
392 return 2; | 388 return 2; |
402 free(RawMooseData); | 398 free(RawMooseData); |
403 return 3; | 399 return 3; |
404 } | 400 } |
405 atexit(SDL_Quit); | 401 atexit(SDL_Quit); |
406 | 402 |
407 /* Set 640x480 video mode */ | 403 /* Set video mode */ |
408 if ( (screen=SDL_SetVideoMode(MOOSEPIC_W*scale, MOOSEPIC_H*scale, 0, SDL_RESIZABLE | SDL_SWSURFACE)) == NULL ) | 404 if ( (screen=SDL_SetVideoMode(MOOSEPIC_W*scale, MOOSEPIC_H*scale, 0, SDL_RESIZABLE | SDL_SWSURFACE)) == NULL ) |
409 { | 405 { |
410 fprintf(stderr, "Couldn't set video mode: %s\n", 0, SDL_GetError()); | 406 fprintf(stderr, "Couldn't set video mode: %s\n", 0, SDL_GetError()); |
411 free(RawMooseData); | 407 free(RawMooseData); |
412 return 4; | 408 return 4; |