Mail Archives: djgpp/1997/05/04/20:35:45
Morning all
I've slowly been working my way through learning C and DJGPP, and I was
wondering if it's possible to use a Case statement to check for a range of
numbers - not just one....
eg..
Switch (bullet_x)
Case (alien1_x to alien1_x + 16)
then alien_hit = 1
Case (alien2_x to alien2_x + 16)
then alien_hit = 2
Default
alien_hit = 0
I guess I'm trying to do a 'bounding box' (?) check to see if a player
bullet has hit an alien sprite anywhere along it's width. I'm doing a
space invaders game where the players bullet just goes straight up the
screen.
Thanks
David Berry
dberry1 AT dca DOT gov DOT au
-
As you grow up and leave the playground,
where you kissed your prince and found your frog,
remember the Jester who showed you tears.
- Raw text -