WIP: moving displays part 2

This commit is contained in:
2022-09-17 14:16:02 -04:00
parent fe55f94702
commit 2addb0905e
6 changed files with 103 additions and 52 deletions
-41
View File
@@ -38,47 +38,6 @@ NamesOfLevels
dta d" HUMAN Moron Shooter "
dta d" Poolshark Tosser Chooser "
dta d" Spoiler Cyborg Unknown "
;---------------------------------------------------
textbuffer2
dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN
; DLs fragments (modified by game code)
; all Purchase DL :)
PurchaseDL
.byte $70
.byte $47
DLPurTitleAddr
.word PurchaseTitle
.byte $50
.byte $42+$80
.word textbuffer2
.byte $60,$42
MoreUpdl
.word EmptyLine
.byte 0,$42
WeaponsListDL
.word ListOfWeapons
:15 .byte 0,2
.byte 0, $42
MoreDownDL
.word EmptyLine
.byte $40,$42
.word WeaponsDescription
.byte $0,$42
PurActDescAddr
.word PurchaseDescription
.byte $41
.word PurchaseDL
;------------------------
DLCreditsFragm
.byte $60+$80
.byte $42+$20 ; VSCRL
DLCreditsAddr
.word Credits
:6 .byte $02+$20
.byte $02
.byte $41
.word GameOverDL
;------------------------
; end of "variables" (RAM)
;------------------------
+45
View File
@@ -0,0 +1,45 @@
; @com.wudsn.ide.asm.mainsourcefile=scorch.asm
.IF *>0 ;this is a trick that prevents compiling this file alone
;---------------------------------------------------
purchaseTextBuffer
dta d"Player: Cash: 0" ; ZERO TO MAKE YOU RICHER ON THE SCREEN
; DLs fragments (modified by game code)
; all Purchase DL :)
PurchaseDL
.byte $70
.byte $47
DLPurTitleAddr
.word PurchaseTitle
.byte $50
.byte $42+$80
.word purchaseTextBuffer
.byte $60,$42
MoreUpdl
.word EmptyLine
.byte 0,$42
WeaponsListDL
.word ListOfWeapons
:15 .byte 0,2
.byte 0, $42
MoreDownDL
.word EmptyLine
.byte $40,$42
.word WeaponsDescription
.byte $0,$42
PurActDescAddr
.word PurchaseDescription
.byte $41
.word PurchaseDL
;------------------------
DLCreditsFragm
.byte $60+$80
.byte $42+$20 ; VSCRL
DLCreditsAddr
.word Credits
:6 .byte $02+$20
.byte $02
.byte $41
.word GameOverDL
.endif
+16 -1
View File
@@ -140,7 +140,22 @@ WeaponFont
;-----------------------------------------------
;Screen displays go here to avoid crossing 4kb barrier
;-----------------------------------------------
icl 'display.asm'
DisplayCopyRom = *
org display, DisplayCopyRom
DisplayCopyStart
icl 'display_main_menu.asm'
DisplayCopyEnd
org DisplayCopyRom + (DisplayCopyEnd - DisplayCopyStart +1)
DisplayCopyPurchaseDlROM = *
org DisplayCopyPurchase, DisplayCopyPurchaseDlROM
DisplayCopyPurchaseStart
icl 'display_purchasedl.asm'
DisplayCopyPurchaseEnd
org DisplayCopyPurchaseDlROM + (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1)
icl 'display_status.asm'
icl 'display_static.asm'
;----------------------------------------------
BIN
View File
Binary file not shown.
+40 -10
View File
@@ -18,11 +18,13 @@
jsr clearscreen ;let the screen be clean
mwa #DisplayCopyRom temp
mwa #display temp2
mwa #DisplayCopyEnd+1 modify
jsr CopyFromROM
mwa #OptionsDL dlptrs
; lda dmactls
; and #$fc
; ora #$02 ; normal screen width
; lda #%00110010 ; normal screen width, DL on, P/M off
lda #%00111110 ; normal screen width, DL on, P/M on
sta dmactls
jsr SetPMWidth
@@ -42,7 +44,7 @@
sta mountainDeltaL
mva #6 NumberOfPlayers
jsr PMoutofScreen ;let P/M disappear
jsr clearscreen ;let the screen be clean
;jsr clearscreen ;let the screen be clean (clean-ish already)
jsr ClearPMmemory
jsr placetanks ;let the tanks be evenly placed
jsr calculatemountains ;let mountains be easy for the eye
@@ -284,6 +286,12 @@ AfterManualPurchase
; Rest of the data is taken from appropriate tables
; and during the purchase these tables are modified.
mwa #DisplayCopyPurchaseDlROM temp
mwa #DisplayCopyPurchase temp2
mwa #DisplayCopyPurchaseEnd+1 modify
jsr CopyFromROM
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
; we are clearing list of the weapons
@@ -319,7 +327,7 @@ GoToActivation
tax
NextChar03
lda tanksnames,x
sta textbuffer2+8,y
sta purchaseTextBuffer+8,y
inx
iny
cpy #$08
@@ -337,7 +345,7 @@ AfterPurchase
sta decimal
lda moneyH,x
sta decimal+1
mwa #textbuffer2+26 displayposition
mwa #purchaseTextBuffer+26 displayposition
jsr displaydec5
; in xbyte there is the address of the line that
@@ -2258,9 +2266,9 @@ EndOfCredits
;displaying symbol of the weapon
;---------------------
;display name and symbol of the weapon
;textbuffer+18 - symbol (1 char)
;textbuffer+20 - quantity left
;textbuffer+23 - name
;statusBuffer+18 - symbol (1 char)
;statusBuffer+20 - quantity left
;statusBuffer+23 - name
ldx TankNr
ldy ActiveWeapon,x
lda WeaponSymbols,y
@@ -2513,4 +2521,26 @@ NextChar02
.endp
;-------------------------------------------------
.proc CopyFromROM
;copy from CART to RAM
; trashes Y
; temp: source
; temp2: destination
; modify: destination-end
;usage:
; mwa #DisplayCopyRom temp
; mwa #display temp2
; mwa #DisplayCopyEnd+1 modify
; jsr CopyFromROM
ldy #0
@ lda (temp),y
sta (temp2),y
inw temp
inw temp2
cpw temp2 modify
bne @-
rts
.endp
.endif
+2
View File
@@ -47,6 +47,8 @@ linetableL ; = PMGraph + $0300 - (screenHeight+1)*2
.ds (screenHeight+1)
linetableH ; = PMGraph + $0300 - (screenHeight+1)
.ds (screenHeight+1)
DisplayCopyPurchase
.ds (DisplayCopyPurchaseEnd - DisplayCopyPurchaseStart +1)
;=====================================================
variablesStart ; zeroing starts here
;=====================================================