moving displays + opty part 1

This commit is contained in:
2022-09-17 09:59:56 -04:00
parent 0693e5d20e
commit fe55f94702
6 changed files with 45 additions and 43 deletions
-5
View File
@@ -39,11 +39,6 @@ NamesOfLevels
dta d" Poolshark Tosser Chooser " dta d" Poolshark Tosser Chooser "
dta d" Spoiler Cyborg Unknown " dta d" Spoiler Cyborg Unknown "
;--------------------------------------------------- ;---------------------------------------------------
textbuffer
; 0123456789012345678901234567890123456789
dta d"Player: "
dta d"Energy: Angle: Force: "
dta d"Round: Wind: "
textbuffer2 textbuffer2
dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN
+1 -1
View File
@@ -76,7 +76,7 @@ GameOverTitle2
dl ; MAIN game display list dl ; MAIN game display list
.byte 0 .byte 0
.byte $42 .byte $42
.word textbuffer .word statusBuffer
.byte $02, $02 +$80 ;DLI .byte $02, $02 +$80 ;DLI
.byte $10 ; 2 blank lines .byte $10 ; 2 blank lines
+11
View File
@@ -0,0 +1,11 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone
statusBuffer
; 0123456789012345678901234567890123456789
dta d"Player: "
dta d"Energy: Angle: Force: "
dta d"Round: Wind: "
.ENDIF
+2 -6
View File
@@ -141,6 +141,7 @@ WeaponFont
;Screen displays go here to avoid crossing 4kb barrier ;Screen displays go here to avoid crossing 4kb barrier
;----------------------------------------------- ;-----------------------------------------------
icl 'display.asm' icl 'display.asm'
icl 'display_status.asm'
icl 'display_static.asm' icl 'display_static.asm'
;---------------------------------------------- ;----------------------------------------------
@@ -231,12 +232,7 @@ MainGameLoop
jsr SetWallsType jsr SetWallsType
; first set default barrel lengths (fix for Long Schlong activation :) ) ; first set default barrel lengths (fix for Long Schlong activation :) )
; we must do it before purchase/activate ; we must do it before purchase/activate
ldx #(MaxPlayers-1) jsr SetStandardBarrels
SettingBarrel
lda #StandardBarrel ; standard barrel length
sta BarrelLength,x
dex
bpl SettingBarrel
jsr CallPurchaseForEveryTank jsr CallPurchaseForEveryTank
BIN
View File
Binary file not shown.
+31 -31
View File
@@ -2264,7 +2264,7 @@ EndOfCredits
ldx TankNr ldx TankNr
ldy ActiveWeapon,x ldy ActiveWeapon,x
lda WeaponSymbols,y lda WeaponSymbols,y
sta TextBuffer+18 sta statusBuffer+18
;--------------------- ;---------------------
;displaying quantity of the given weapon ;displaying quantity of the given weapon
@@ -2272,7 +2272,7 @@ EndOfCredits
lda ActiveWeapon,x lda ActiveWeapon,x
jsr HowManyBullets jsr HowManyBullets
sta decimal sta decimal
mwa #textbuffer+20 displayposition mwa #statusBuffer+20 displayposition
jsr displaybyte jsr displaybyte
;--------------------- ;---------------------
@@ -2293,7 +2293,7 @@ EndOfCredits
ldy #15 ldy #15
@ @
lda (temp),y lda (temp),y
sta textbuffer+23,y sta statusBuffer+23,y
dey dey
bpl @- bpl @-
@@ -2301,15 +2301,15 @@ EndOfCredits
;displaying name of the defence weapon (if active) ;displaying name of the defence weapon (if active)
;--------------------- ;---------------------
lda #$08 ; ( lda #$08 ; (
sta textbuffer+80+22 sta statusBuffer+80+22
lda #$09 ; ) lda #$09 ; )
sta textbuffer+80+39 sta statusBuffer+80+39
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
bne ActiveDefence bne ActiveDefence
; clear brackets ; clear brackets
lda #space lda #space
sta textbuffer+80+22 sta statusBuffer+80+22
sta textbuffer+80+39 sta statusBuffer+80+39
mwa #emptyLine temp mwa #emptyLine temp
jmp ClearingOnly jmp ClearingOnly
ActiveDefence ActiveDefence
@@ -2327,7 +2327,7 @@ ClearingOnly
ldy #15 ldy #15
@ @
lda (temp),y lda (temp),y
sta textbuffer+40+40+23,y sta statusBuffer+40+40+23,y
dey dey
bpl @- bpl @-
@@ -2338,7 +2338,7 @@ ClearingOnly
lda Energy,x lda Energy,x
sta decimal sta decimal
mwa #textbuffer+48 displayposition mwa #statusBuffer+48 displayposition
jsr displaybyte jsr displaybyte
;--------------------- ;---------------------
@@ -2346,10 +2346,10 @@ ClearingOnly
;--------------------- ;---------------------
; clear (if no shield) ; clear (if no shield)
lda #space lda #space
sta textbuffer+40+10 sta statusBuffer+40+10
sta textbuffer+40+11 sta statusBuffer+40+11
sta textbuffer+40+12 sta statusBuffer+40+12
sta textbuffer+40+13 sta statusBuffer+40+13
; check shield energy and display it ; check shield energy and display it
ldx TankNr ldx TankNr
lda ActiveDefenceWeapon,x lda ActiveDefenceWeapon,x
@@ -2358,11 +2358,11 @@ ClearingOnly
beq NoShieldEnergy beq NoShieldEnergy
sta decimal ; displayed value sta decimal ; displayed value
lda #$08 ; ( lda #$08 ; (
sta textbuffer+40+10 sta statusBuffer+40+10
mwa #textbuffer+40+11 displayposition mwa #statusBuffer+40+11 displayposition
jsr displaybyte jsr displaybyte
lda #$09 ; ) lda #$09 ; )
sta textbuffer+40+13 sta statusBuffer+40+13
NoDefenceWeapon NoDefenceWeapon
NoShieldEnergy NoShieldEnergy
@@ -2373,9 +2373,9 @@ NoShieldEnergy
lda Wind+3 ; highest byte of 4 byte wind lda Wind+3 ; highest byte of 4 byte wind
bmi DisplayLeftWind bmi DisplayLeftWind
lda #$7f ; (tab) char lda #$7f ; (tab) char
sta textbuffer+80+20 sta statusBuffer+80+20
lda #space lda #space
sta textbuffer+80+17 sta statusBuffer+80+17
beq DisplayWindValue beq DisplayWindValue
DisplayLeftWind DisplayLeftWind
sec ; Wind = -Wind sec ; Wind = -Wind
@@ -2386,14 +2386,14 @@ DisplayLeftWind
sbc temp+1 sbc temp+1
sta temp+1 sta temp+1
lda #$7e ;(del) char lda #$7e ;(del) char
sta textbuffer+80+17 sta statusBuffer+80+17
lda #space lda #space
sta textbuffer+80+20 sta statusBuffer+80+20
DisplayWindValue DisplayWindValue
:4 lsrw temp ;divide by 16 to have a nice value on a screen :4 lsrw temp ;divide by 16 to have a nice value on a screen
lda temp lda temp
sta decimal sta decimal
mwa #textbuffer+80+18 displayposition mwa #statusBuffer+80+18 displayposition
jsr displaybyte jsr displaybyte
;========================= ;=========================
@@ -2401,7 +2401,7 @@ DisplayWindValue
;========================= ;=========================
lda CurrentRoundNr lda CurrentRoundNr
sta decimal sta decimal
mwa #textbuffer+80+7 displayposition mwa #statusBuffer+80+7 displayposition
jsr displaybyte ;decimal (byte), displayposition (word) jsr displaybyte ;decimal (byte), displayposition (word)
;========================= ;=========================
@@ -2412,7 +2412,7 @@ DisplayWindValue
sta decimal sta decimal
lda ForceTableH,x lda ForceTableH,x
sta decimal+1 sta decimal+1
mwa #textbuffer+40+35 displayposition mwa #statusBuffer+40+35 displayposition
jsr displaydec5 jsr displaydec5
;========================= ;=========================
@@ -2428,9 +2428,9 @@ AngleToRight
; now we have values from 0 to 89 and right angle ; now we have values from 0 to 89 and right angle
sta decimal sta decimal
lda #$7f ; (tab) character lda #$7f ; (tab) character
sta textbuffer+40+25 sta statusBuffer+40+25
lda #space lda #space
sta textbuffer+40+22 sta statusBuffer+40+22
beq AngleDisplay beq AngleDisplay
AngleToLeft AngleToLeft
sec sec
@@ -2439,19 +2439,19 @@ AngleToLeft
; angles 180 - 91 converted to 0 - 89 ; angles 180 - 91 converted to 0 - 89
sta decimal sta decimal
lda #$7e ;(del) char lda #$7e ;(del) char
sta textbuffer+40+22 sta statusBuffer+40+22
lda #space lda #space
sta textbuffer+40+25 sta statusBuffer+40+25
beq AngleDisplay beq AngleDisplay
VerticallyUp VerticallyUp
; now we have value 90 ; now we have value 90
sta decimal sta decimal
lda #space lda #space
sta textbuffer+40+25 sta statusBuffer+40+25
sta textbuffer+40+22 sta statusBuffer+40+22
AngleDisplay AngleDisplay
mwa #textbuffer+40+23 displayposition mwa #statusBuffer+40+23 displayposition
jsr displaybyte jsr displaybyte
ldx TankNr ldx TankNr
rts rts
@@ -2467,7 +2467,7 @@ AngleDisplay
tax tax
NextChar02 NextChar02
lda tanksnames,x lda tanksnames,x
sta textbuffer+7,y sta statusBuffer+7,y
inx inx
iny iny
cpy #$08 cpy #$08