bad tanksequence fix #47
This commit is contained in:
+31
-42
@@ -126,7 +126,7 @@ START
|
|||||||
lda escFlag
|
lda escFlag
|
||||||
bne START
|
bne START
|
||||||
|
|
||||||
jsr RandomizeSequence
|
jsr RandomizeSequence0
|
||||||
; for the round #1 shooting sequence is random
|
; for the round #1 shooting sequence is random
|
||||||
|
|
||||||
MainGameLoop
|
MainGameLoop
|
||||||
@@ -354,7 +354,6 @@ WhichTankWonLoop
|
|||||||
; second tank explodes and kills the first one.
|
; second tank explodes and kills the first one.
|
||||||
; and code lands here...
|
; and code lands here...
|
||||||
; looks like no one won!
|
; looks like no one won!
|
||||||
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
ThisOneWon
|
ThisOneWon
|
||||||
@@ -376,7 +375,6 @@ DoNotFinishTheRound
|
|||||||
jsr DisplaySeppuku
|
jsr DisplaySeppuku
|
||||||
jmp Seppuku
|
jmp Seppuku
|
||||||
|
|
||||||
;ldx TankNr
|
|
||||||
@
|
@
|
||||||
ldx TankSequencePointer
|
ldx TankSequencePointer
|
||||||
lda TankSequence,x
|
lda TankSequence,x
|
||||||
@@ -447,6 +445,7 @@ continueMainRoundLoopAfterSeppuku
|
|||||||
|
|
||||||
|
|
||||||
AfterExplode
|
AfterExplode
|
||||||
|
; TODO: IS IT OK??? possibly a fix here needed for #56
|
||||||
ldy WeaponDepleted
|
ldy WeaponDepleted
|
||||||
bne @+
|
bne @+
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
@@ -484,11 +483,8 @@ missed
|
|||||||
jsr DisplayOffensiveTextNr
|
jsr DisplayOffensiveTextNr
|
||||||
|
|
||||||
NextPlayerShoots
|
NextPlayerShoots
|
||||||
;mva #1 Erase
|
;before it shoots, the eXistenZ table must be updated
|
||||||
;jsr drawtanks
|
;accordingly to actual energy (was forgotten, sorry to ourselves)
|
||||||
|
|
||||||
;before it shoots, the eXistenZ table must be
|
|
||||||
;updated accordingly to actual energy (was forgotten, sorry to ourselves)
|
|
||||||
|
|
||||||
ldx #(MaxPlayers-1)
|
ldx #(MaxPlayers-1)
|
||||||
SeteXistenZ
|
SeteXistenZ
|
||||||
@@ -499,7 +495,7 @@ SeteXistenZ
|
|||||||
;DATA L1,L2
|
;DATA L1,L2
|
||||||
;Multiplication 8bit*8bit,
|
;Multiplication 8bit*8bit,
|
||||||
;result 16bit
|
;result 16bit
|
||||||
;this algiorithm is a little longer than in Ruszczyc 6502 book
|
;this algiorithm is a little longer than one in Ruszczyc 6502 book
|
||||||
;but it is faster
|
;but it is faster
|
||||||
|
|
||||||
LDy #8
|
LDy #8
|
||||||
@@ -524,13 +520,6 @@ B0 DEY
|
|||||||
|
|
||||||
;was setup of maximum energy for players
|
;was setup of maximum energy for players
|
||||||
|
|
||||||
;mva #0 Erase
|
|
||||||
;jsr drawtanks
|
|
||||||
|
|
||||||
inc:lda TankSequencePointer
|
|
||||||
cmp NumberOfPlayers
|
|
||||||
bne PlayersAgain
|
|
||||||
mva #0 TankSequencePointer
|
|
||||||
|
|
||||||
PlayersAgain
|
PlayersAgain
|
||||||
|
|
||||||
@@ -562,27 +551,14 @@ NoPlayerNoDeath
|
|||||||
dex
|
dex
|
||||||
bpl CheckingPlayersDeath
|
bpl CheckingPlayersDeath
|
||||||
; if processor is here it means there are no more explosions
|
; if processor is here it means there are no more explosions
|
||||||
|
|
||||||
|
inc:lda TankSequencePointer
|
||||||
|
cmp NumberOfPlayers
|
||||||
|
sne:mva #0 TankSequencePointer
|
||||||
|
|
||||||
jmp MainRoundLoop
|
jmp MainRoundLoop
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
;---------------------------------
|
|
||||||
.proc Seppuku
|
|
||||||
lda #0
|
|
||||||
sta FallDown1
|
|
||||||
sta FallDown2
|
|
||||||
sta ydraw+1
|
|
||||||
; get position of the tank
|
|
||||||
ldx TankNr
|
|
||||||
lda xtankstableL,x
|
|
||||||
sta xdraw
|
|
||||||
lda xtankstableH,x
|
|
||||||
sta xdraw+1
|
|
||||||
lda yTanksTable,x
|
|
||||||
sta ydraw
|
|
||||||
lda #1 ; Missile
|
|
||||||
jsr ExplosionDirect
|
|
||||||
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
|
||||||
.endp
|
|
||||||
;---------------------------------
|
;---------------------------------
|
||||||
.proc PlayerXdeath
|
.proc PlayerXdeath
|
||||||
|
|
||||||
@@ -619,7 +595,7 @@ NoPlayerNoDeath
|
|||||||
ldy TankTempY
|
ldy TankTempY
|
||||||
mva TankNr temp2 ; not elegant, and probably unnecessary
|
mva TankNr temp2 ; not elegant, and probably unnecessary
|
||||||
sty TankNr
|
sty TankNr
|
||||||
jsr FlashTank ; blinkink and pausing (like PAUSE 72 - 18x(2+2) )
|
jsr FlashTank ; blinking and pausing (like PAUSE 72 - 18x(2+2) )
|
||||||
mva temp2 TankNr
|
mva temp2 TankNr
|
||||||
|
|
||||||
;Deffensive text cleanup
|
;Deffensive text cleanup
|
||||||
@@ -642,7 +618,7 @@ NoPlayerNoDeath
|
|||||||
sbc #4
|
sbc #4
|
||||||
sta ydraw
|
sta ydraw
|
||||||
lda #0
|
lda #0
|
||||||
sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit when transitioning ydraw to byte
|
sta ydraw+1 ; there is 0 left in A, so... TODO: bad code above. revisit
|
||||||
|
|
||||||
;cleanup of the soil fall down ranges (left and right)
|
;cleanup of the soil fall down ranges (left and right)
|
||||||
sta RangeRight
|
sta RangeRight
|
||||||
@@ -651,12 +627,9 @@ NoPlayerNoDeath
|
|||||||
sta FallDown2
|
sta FallDown2
|
||||||
mwa #screenwidth RangeLeft
|
mwa #screenwidth RangeLeft
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
; We are randomizing the weapon now.
|
; We are randomizing the weapon now.
|
||||||
; jumping into the middle of the explosion
|
; jumping into the middle of the explosion
|
||||||
; routine
|
; routine
|
||||||
|
|
||||||
MetodOfDeath
|
MetodOfDeath
|
||||||
lda random
|
lda random
|
||||||
and #%00011111 ; range 0-31
|
and #%00011111 ; range 0-31
|
||||||
@@ -667,13 +640,10 @@ MetodOfDeath
|
|||||||
jsr ExplosionDirect
|
jsr ExplosionDirect
|
||||||
mva #sfx_silencer sfx_effect
|
mva #sfx_silencer sfx_effect
|
||||||
|
|
||||||
|
|
||||||
; jump to after explosion routines (soil fallout, etc.)
|
; jump to after explosion routines (soil fallout, etc.)
|
||||||
; After going through these routines we are back
|
; After going through these routines we are back
|
||||||
; to checking if a tank exploded and maybe we have
|
; to checking if a tank exploded and maybe we have
|
||||||
; a deadly shot here again.
|
; a deadly shot here again.
|
||||||
|
|
||||||
|
|
||||||
jmp MainRoundLoop.AfterExplode
|
jmp MainRoundLoop.AfterExplode
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
@@ -717,6 +687,25 @@ NotNegativeEnergy
|
|||||||
rts
|
rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
;---------------------------------
|
||||||
|
.proc Seppuku
|
||||||
|
lda #0
|
||||||
|
sta FallDown1
|
||||||
|
sta FallDown2
|
||||||
|
sta ydraw+1
|
||||||
|
; get position of the tank
|
||||||
|
ldx TankNr
|
||||||
|
lda xtankstableL,x
|
||||||
|
sta xdraw
|
||||||
|
lda xtankstableH,x
|
||||||
|
sta xdraw+1
|
||||||
|
lda yTanksTable,x
|
||||||
|
sta ydraw
|
||||||
|
lda #1 ; Missile
|
||||||
|
jsr ExplosionDirect
|
||||||
|
jmp MainRoundLoop.continueMainRoundLoopAfterSeppuku
|
||||||
|
.endp
|
||||||
|
|
||||||
;--------------------------------------------------
|
;--------------------------------------------------
|
||||||
GetRandomWind .proc
|
GetRandomWind .proc
|
||||||
;in: MaxWind (byte)
|
;in: MaxWind (byte)
|
||||||
|
|||||||
BIN
Binary file not shown.
+8
-14
@@ -1635,13 +1635,6 @@ FinishResultDisplay
|
|||||||
jmp TypeLine4x4 ; jsr:rts
|
jmp TypeLine4x4 ; jsr:rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
.proc TL4x4_empty
|
|
||||||
;empty frame
|
|
||||||
mwa #LineEmpty LineAddress4x4
|
|
||||||
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
|
||||||
jmp TypeLine4x4 ; jsr:rts
|
|
||||||
.endp
|
|
||||||
|
|
||||||
.proc TL4x4_top
|
.proc TL4x4_top
|
||||||
;bottom of the frame
|
;bottom of the frame
|
||||||
mwa #LineTop LineAddress4x4
|
mwa #LineTop LineAddress4x4
|
||||||
@@ -1649,16 +1642,17 @@ FinishResultDisplay
|
|||||||
jmp TypeLine4x4 ; jsr:rts
|
jmp TypeLine4x4 ; jsr:rts
|
||||||
.endp
|
.endp
|
||||||
|
|
||||||
|
.proc TL4x4_empty
|
||||||
|
;empty frame
|
||||||
|
mwa #LineEmpty LineAddress4x4
|
||||||
|
mwa #((ScreenWidth/2)-(8*4)) LineXdraw
|
||||||
|
jmp TypeLine4x4 ; jsr:rts
|
||||||
|
.endp
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
.proc DisplayStatus
|
.proc DisplayStatus
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
|
|
||||||
;lda noDeathCounter
|
|
||||||
;sta decimal
|
|
||||||
;mwa #textbuffer+80+37 displayposition
|
|
||||||
;jsr displaybyte
|
|
||||||
|
|
||||||
;---------------------
|
;---------------------
|
||||||
;displaying symbol of the weapon
|
;displaying symbol of the weapon
|
||||||
;---------------------
|
;---------------------
|
||||||
@@ -1762,7 +1756,6 @@ AngleDisplay
|
|||||||
mwa #textbuffer+40+21 displayposition
|
mwa #textbuffer+40+21 displayposition
|
||||||
jsr displaybyte
|
jsr displaybyte
|
||||||
|
|
||||||
|
|
||||||
;=========================
|
;=========================
|
||||||
;display Wind
|
;display Wind
|
||||||
;=========================
|
;=========================
|
||||||
@@ -1793,8 +1786,9 @@ DisplayWindValue
|
|||||||
mwa #textbuffer+80+26 displayposition
|
mwa #textbuffer+80+26 displayposition
|
||||||
jsr displaybyte
|
jsr displaybyte
|
||||||
|
|
||||||
|
;=========================
|
||||||
;display round number
|
;display round number
|
||||||
|
;=========================
|
||||||
lda CurrentRoundNr
|
lda CurrentRoundNr
|
||||||
sta decimal
|
sta decimal
|
||||||
mwa #textbuffer+80+14 displayposition
|
mwa #textbuffer+80+14 displayposition
|
||||||
|
|||||||
Reference in New Issue
Block a user