Post by Leif Bloomquist on Jul 11, 2006 10:20:38 GMT -5
Fuzz, here's the info you asked for. I'm posting it publicly so others can comment/correct or otherwise help
To start with, have a read through the code I posted in the othe thread. I'm proposing to call your code in the ww3-game.asm file around line 204. That will put it in some context for you.
Weather Animation
At the start of the round, both sides will have to draw the cloud and show the wind speed. These values will be generated by the random number generator code (see below)
Range of the cloud location is up to you.
Wind speed will be +/- 100.
I think the cleanest interface would be to simply do this...
LDA #(cloud location)
LDX #(wind speed +/- 100)
JSR $(address of weather animation code)
Weapon Animation
Once the weapon and power are chosen, both sides will display the animation for the weapon.
Have a look at the original BASIC game to get an idea of how the weapons work and how they should look.
I think the cleanest interface would be to simply do this...
LDA #(weapon type 1-4)
LDX #(power +/- 100)
JSR $(address of weapon animation code)
You should have stored the cloud location and wind speed after the weather animation was called (will always be called first).
Then you would RTS when:
-The weapon has finished its attack, or
-The weapon goes out of bounds (you'll have to do the "out of bounds" message too)
After that I'll examine the screen to determine if any of the "houses" have been erased by your routine.
The screen layout will be exactly the same as in the BASIC game, if you want to know what the screen locations are.
Let me know if there's any init routines you want called in your code when the game starts (to build sprites, etc)
Random Numbers
This needs to generate the numbers for the cloud location and wind speed, with ranges as given above. I'd suggest a routine for each, and just return the value in A.
I already have a routine from Golan that generates numbers 1-255 as per my thread in SSoCC, to eventually be used to determine the first player.
To start with, have a read through the code I posted in the othe thread. I'm proposing to call your code in the ww3-game.asm file around line 204. That will put it in some context for you.
Weather Animation
At the start of the round, both sides will have to draw the cloud and show the wind speed. These values will be generated by the random number generator code (see below)
Range of the cloud location is up to you.
Wind speed will be +/- 100.
I think the cleanest interface would be to simply do this...
LDA #(cloud location)
LDX #(wind speed +/- 100)
JSR $(address of weather animation code)
Weapon Animation
Once the weapon and power are chosen, both sides will display the animation for the weapon.
Have a look at the original BASIC game to get an idea of how the weapons work and how they should look.
I think the cleanest interface would be to simply do this...
LDA #(weapon type 1-4)
LDX #(power +/- 100)
JSR $(address of weapon animation code)
You should have stored the cloud location and wind speed after the weather animation was called (will always be called first).
Then you would RTS when:
-The weapon has finished its attack, or
-The weapon goes out of bounds (you'll have to do the "out of bounds" message too)
After that I'll examine the screen to determine if any of the "houses" have been erased by your routine.
The screen layout will be exactly the same as in the BASIC game, if you want to know what the screen locations are.
Let me know if there's any init routines you want called in your code when the game starts (to build sprites, etc)
Random Numbers
This needs to generate the numbers for the cloud location and wind speed, with ranges as given above. I'd suggest a routine for each, and just return the value in A.
I already have a routine from Golan that generates numbers 1-255 as per my thread in SSoCC, to eventually be used to determine the first player.