|
|
| version 1.1, 2009/03/28 03:48:45 | version 1.2, 2009/04/03 02:48:21 |
|---|---|
| Line 331 int loadMedia( void ) { | Line 331 int loadMedia( void ) { |
| * Load frogger's textures and sounds | * Load frogger's textures and sounds |
| */ | */ |
| gfx = IMG_Load( "images/frogger.png" ); | gfx = IMG_Load( "images/frogger.png" ); |
| frogger.riding = FALSE; | |
| if ( gfx == NULL ) { | if ( gfx == NULL ) { |
| fprintf( stderr, "Error: 'images/frogger.bmp' could not be open: %s\n", SDL_GetError( ) ); | fprintf( stderr, "Error: 'images/frogger.bmp' could not be open: %s\n", SDL_GetError( ) ); |
| Line 493 int keyEvents( SDL_Event event ) { | Line 494 int keyEvents( SDL_Event event ) { |
| } | } |
| int updateGameState( void ) { | int updateGameState( void ) { |
| /* | int i; |
| printf( "D: Updating game state\n" ); | |
| */ | |
| if ( ! drawBG ) configGameScreen( ); | if ( ! drawBG ) configGameScreen( ); |
| if ( lives <= 0 ) { | if ( lives <= 0 ) { |
| Line 507 int updateGameState( void ) { | Line 507 int updateGameState( void ) { |
| playing = 0; | playing = 0; |
| lives = 0; | lives = 0; |
| level = 0; | level = 0; |
| score = 0; | |
| givenFreeFrog = 0; | |
| drawBG = 0; | |
| for ( i = 0; i < MAX_GOALS; i++ ) { goals[i].occupied = 0; } | |
| } | } |
| return 500; | return 500; |
| } | } |
| Line 753 void drawGameScreen( void ) { | Line 758 void drawGameScreen( void ) { |
| drawVehicles( ); | drawVehicles( ); |
| if ( frogger.alive == FALSE ) { | if ( frogger.alive == FALSE ) { |
| frogger.riding = FALSE; | |
| if ( ! drawDeathSequence( frogger.deathType ) ) { | if ( ! drawDeathSequence( frogger.deathType ) ) { |
| lives--; | lives--; |
| if ( lives < 0 ) { drawGameOver( ); } | if ( lives < 0 ) { drawGameOver( ); } |