diff --git a/constants.asm b/constants.asm index 7721be5..8b12e22 100644 --- a/constants.asm +++ b/constants.asm @@ -36,7 +36,11 @@ TanksWeaponsTableL .by TanksWeapon1,>TanksWeapon2,>TanksWeapon3,>TanksWeapon4,>TanksWeapon5,>TanksWeapon6 - +;-------------- +XtankOffsetGO_L + .by 6,56,106,156,206,0 +XtankOffsetGO_H + .by 0,0,0,0,0,1 ;-----4x4 texts----- LineTop dta d"(%%%%%%%%%%%%)", $ff diff --git a/display.asm b/display.asm index dd36337..b896e45 100644 --- a/display.asm +++ b/display.asm @@ -93,6 +93,16 @@ dl ; MAIN game display list .byte $41 .word dl ;----------------------------------------------- +GameOverDL + .byte $70,$70,$70,$70,$70,$70,$70,$20 + .byte $4f ; 1 line + .word display+(40*32) + :31 .byte $0f ; 31 lines + .byte $70 + .byte $41 + .word GameOverDL + +;----------------------------------------------- ;Screen displays go first to avoid crossing 4kb barrier ;----------------------------------------------- OptionsScreen diff --git a/grafproc.asm b/grafproc.asm index 79e977e..eb28a06 100644 --- a/grafproc.asm +++ b/grafproc.asm @@ -462,7 +462,7 @@ endcircleloop .endp ;-------------------------------------------------- -.proc clearscreen +.proc ClearScreen ;-------------------------------------------------- lda #$ff diff --git a/scorch.asm b/scorch.asm index de26a6c..8e1e4cd 100644 --- a/scorch.asm +++ b/scorch.asm @@ -128,6 +128,8 @@ START ; Startup sequence jsr Initialize + + jsr GameOverScreen ; only for test !!! jsr Options ;startup screen lda escFlag diff --git a/scorch.xex b/scorch.xex index d1439d1..1c7db0a 100644 Binary files a/scorch.xex and b/scorch.xex differ diff --git a/textproc.asm b/textproc.asm index 06b809b..8b3c415 100644 --- a/textproc.asm +++ b/textproc.asm @@ -1828,6 +1828,56 @@ FinishResultDisplay jmp TypeLine4x4 ; jsr:rts .endp +;-------------------------------------------------- +.proc GameOverScreen +;-------------------------------------------------- + jsr ClearScreen + jsr ClearPMmemory + mwa #GameOverDL dlptrs + lda #%00111110 ; normal screen width, DL on, P/M on + sta dmactls + jsr ColorsOfSprites + VDLI DLIinterruptText.DLIinterruptNone ; jsr SetDLI for text screen without DLIs + ; initial tank positions randomization + ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1 +@ + jsr RandomizeTankPos + dex + bpl @- +MainTanksFloatingLoop + ; main tanks floating loop + ldx #(MaxPlayers-1) ;maxNumberOfPlayers-1 +AllTanksFloatingDown + stx TankNr + inc Ytankstable,x + lda Ytankstable,x +; cmp #32 ; tank over screen - not visible + cmp #80 ; tank under screen - new tank randomize + bne TankOnScreen + jsr RandomizeTankPos +TankOnScreen + jsr DrawTankNr + jsr DrawTankParachute + ldx TankNr + dex + bpl AllTanksFloatingDown + jmp MainTanksFloatingLoop ; neverending loop + rts +RandomizeTankPos + randomize 8 32 + sta Ytankstable,x + randomize 0 180 + sta AngleTable,x + randomize 0 (49-8) + and #%11111110 ; correction for PMG + clc + adc XtankOffsetGO_L,x + sta XtankstableL,x + lda XtankOffsetGO_H,x + adc #0 + sta XtankstableH,x + rts +.endp ;------------------------------------------------- .proc DisplayStatus ;-------------------------------------------------