glitches when switches #72

This commit is contained in:
2022-05-21 18:29:56 -04:00
parent fb54230ea7
commit 3701accfc9
4 changed files with 29 additions and 31 deletions
+17 -17
View File
@@ -145,12 +145,6 @@ START
cmp NumberOfPlayers cmp NumberOfPlayers
bne @- bne @-
mwa #dl dlptrs
lda dmactls
and #$fc
ora #$02 ; normal screen width
sta dmactls
jsr RandomizeSequence jsr RandomizeSequence
; for the round #1 shooting sequence is random ; for the round #1 shooting sequence is random
@@ -158,15 +152,17 @@ MainGameLoop
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
jsr CallPurchaseForEveryTank jsr CallPurchaseForEveryTank
; issue #72 (glitches when switches)
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen mva #0 dmactl
mwa #dl dlptrs
lda dmactls lda dmactls
and #$fc and #$fc
ora #$02 ; 2=normal, 3 = wide screen width ;ora #$02 ; 2=normal, 3 = wide screen width, 0 = no screen (?)
sta dmactls sta dmactls
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
jsr GetRandomWind jsr GetRandomWind
jsr Round jsr Round
@@ -255,8 +251,8 @@ skipzeroing
lda GameIsOver lda GameIsOver
jne START jne START
inc CurrentRoundNr inc CurrentRoundNr
mva #0 dmactl ; issue #72
jmp MainGameLoop jmp MainGameLoop
@@ -321,6 +317,13 @@ SettingEnergies
jsr placetanks ;let the tanks be evenly placed jsr placetanks ;let the tanks be evenly placed
jsr calculatemountains ;let mountains be nice for the eye jsr calculatemountains ;let mountains be nice for the eye
; jsr calculatemountains0 ;only fort tests - makes mountains flat and 0 height ; jsr calculatemountains0 ;only fort tests - makes mountains flat and 0 height
mwa #dl dlptrs ; issue #72 (glitches when switches)
lda dmactls
and #$fc
ora #$02 ; 2=normal, 3 = wide screen width
sta dmactls
jsr drawmountains ;draw them jsr drawmountains ;draw them
jsr drawtanks ;finally draw tanks jsr drawtanks ;finally draw tanks
@@ -500,7 +503,6 @@ SeteXistenZ
sta L1 sta L1
;DATA L1,L2 ;DATA L1,L2
;RESULT WH*256+L1
;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 in Ruszczyc 6502 book
@@ -514,7 +516,7 @@ LP0
ROR L1 ROR L1
BCC B0 BCC B0
CLC CLC
ADC #10 ; multiplication by 10 ADC #10 ; multiplication by 10 (L2)
B0 DEY B0 DEY
BNE LP0 BNE LP0
ror ror
@@ -536,7 +538,6 @@ B0 DEY
inc:lda TankSequencePointer inc:lda TankSequencePointer
cmp NumberOfPlayers cmp NumberOfPlayers
bne PlayersAgain bne PlayersAgain
;mva 0 TankNr
mva #0 TankSequencePointer mva #0 TankSequencePointer
PlayersAgain .proc PlayersAgain .proc
@@ -577,14 +578,13 @@ NoPlayerNoDeath
lda #0 lda #0
sta FallDown1 sta FallDown1
sta FallDown2 sta FallDown2
lda #1 lda #1 ; Missile
jsr ExplosionDirect jsr ExplosionDirect
jmp continueMainRoundLoopAfterSeppuku jmp continueMainRoundLoopAfterSeppuku
.endp .endp
;--------------------------------- ;---------------------------------
PlayerXdeath .proc PlayerXdeath .proc
; this tank should not explode anymore: ; this tank should not explode anymore:
; there is 0 in A, and Tank Number in X, so... ; there is 0 in A, and Tank Number in X, so...
sta LASTeXistenZ,x sta LASTeXistenZ,x
BIN
View File
Binary file not shown.
+11 -13
View File
@@ -190,6 +190,7 @@ OptionsYLoop
;------------------------------------------- ;-------------------------------------------
; call of the purchase screens for each tank ; call of the purchase screens for each tank
.proc CallPurchaseForEveryTank .proc CallPurchaseForEveryTank
jsr PMoutofScreen
mwa #PurchaseDL dlptrs mwa #PurchaseDL dlptrs
lda dmactls lda dmactls
and #$fc and #$fc
@@ -197,21 +198,20 @@ OptionsYLoop
sta dmactls sta dmactls
mva #0 TankNr mva #0 TankNr
loop03 @
ldx TankNr ldx TankNr
lda SkillTable,x lda SkillTable,x
beq ManualPurchase beq ManualPurchase
jsr PurchaseAI jsr PurchaseAI
jmp AfterManualPurchase jmp AfterManualPurchase
ManualPurchase ManualPurchase
jsr Purchase jsr Purchase
AfterManualPurchase AfterManualPurchase
inc TankNr inc:lda TankNr
lda TankNr cmp NumberOfPlayers
cmp NumberOfPlayers bne @-
bne loop03
rts rts
.endp .endp
@@ -223,9 +223,7 @@ AfterManualPurchase
; Rest of the data is taken from appropriate tables ; Rest of the data is taken from appropriate tables
; and during the purchase these tables are modified. ; and during the purchase these tables are modified.
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
jsr PMoutofScreen
ldx tankNr ldx tankNr
lda TankStatusColoursTable,x lda TankStatusColoursTable,x
+1 -1
View File
@@ -50,7 +50,7 @@ ExplosionRoutines
.word dirtclod-1 .word dirtclod-1
.word dirtball-1 .word dirtball-1
.word tonofdirt-1 .word tonofdirt-1
.word liquiddirt-1 ;liquiddirt .word liquiddirt-1
.word dirtcharge-1 .word dirtcharge-1
.word VOID-1 ;earthdisrupter .word VOID-1 ;earthdisrupter
.word VOID-1 ;plasmablast .word VOID-1 ;plasmablast