version 1.1, 2009/03/27 19:47:27
|
version 1.2, 2009/03/28 03:17:09
|
Line 802 int collisionRow ( void ) {
|
Line 802 int collisionRow ( void ) {
|
/* Check collision with cars */ |
/* Check collision with cars */ |
if ( frogger.currentRow < 6 ) { |
if ( frogger.currentRow < 6 ) { |
for( i = 0; i < MAX_VEHICLES; i++ ) { |
for( i = 0; i < MAX_VEHICLES; i++ ) { |
if ( level < vehicle[i].level ) return 0; |
if ( level >= vehicle[i].level ) { |
int length = ( vehicle[i].row == 5 ) ? FRAME * 2 : FRAME; /* Trucks */ |
int length = ( vehicle[i].row == 5 ) ? FRAME * 2 : FRAME; /* Trucks */ |
if ( collideFrogger( vehicle[i].placement[X], |
if ( collideFrogger( vehicle[i].placement[X], |
vehicle[i].placement[Y], FRAME, |
vehicle[i].placement[Y], FRAME, |
length ) ) { |
length ) ) { |
return 1; |
return 1; |
|
} |
} |
} |
} |
} |
return 0; |
return 0; |