narrow purchase screen #118

This commit is contained in:
2022-08-21 00:13:22 -04:00
parent 1dc5a40633
commit ed3952e89e
6 changed files with 76 additions and 117 deletions
+12 -11
View File
@@ -20,6 +20,7 @@ OptionsHere
OptionsScreenEnd OptionsScreenEnd
;----------------------------------------------- ;-----------------------------------------------
ListOfWeapons ListOfWeapons
; 0123456789012345678901234567890123456789
:36 dta d" " :36 dta d" "
ListOfWeapons1End ListOfWeapons1End
ListOfDefensiveWeapons ListOfDefensiveWeapons
@@ -49,7 +50,7 @@ textbuffer
dta d"Energy: Angle: Force: " dta d"Energy: Angle: Force: "
dta d"Round: Wind: " 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
; DLs fragments (modified by game code) ; DLs fragments (modified by game code)
; all Purchase DL :) ; all Purchase DL :)
@@ -115,21 +116,21 @@ MoreDown
dta 93,93,93 dta 93,93,93
dta d" " dta d" "
WeaponsDescription WeaponsDescription
dta d" " ; 0123456789012345678901234567890123456789
dta d"Tab"* dta d"Tab"*
dta d" - Defensive/Offensive weapon " dta d ": Defensive/Offensive weapon "
PurchaseDescription PurchaseDescription
dta d" " ; 0123456789012345678901234567890123456789
dta d"Space"* dta d"Space"*
dta d" - Purchase " dta d": Purchase "
dta d"Return"* dta d"Return"*
dta d" - Finish " dta d": Finish"
ActivateDescription ActivateDescription
dta d" " ; 0123456789012345678901234567890123456789
dta d"Space"* dta d"Space"*
dta d" - Activate " dta d": Activate "
dta d"Return"* dta d"Return"*
dta d" - Finish " dta d": Finish"
EmptyLine EmptyLine
dta d" " dta d" "
;--------------------------------------------------- ;---------------------------------------------------
@@ -138,9 +139,9 @@ OptionsTitle
DifficultyTitle DifficultyTitle
dta d" difficulty "* dta d" difficulty "*
PurchaseTitle PurchaseTitle
dta d" weapons purchase " dta d"purchase weapons"
InventoryTitle InventoryTitle
dta d" weapons activate "* dta d"activate weapons"*
GameOverTitle GameOverTitle
dta d" game over "* dta d" game over "*
GameOverTitle2 GameOverTitle2
+6 -35
View File
@@ -40,7 +40,6 @@
.endm .endm
icl 'definitions.asm' icl 'definitions.asm'
; icl 'artwork/sfx/rmt_feat.asm'
.zpvar xdraw .word = $64 ;variable X for plot .zpvar xdraw .word = $64 ;variable X for plot
@@ -141,30 +140,14 @@
.zpvar DifficultyLevel .byte .zpvar DifficultyLevel .byte
.zpvar goleft .byte .zpvar goleft .byte
.zpvar OffsetDL1 .byte .zpvar OffsetDL1 .byte
.zpvar L1 .byte
;* RMT ZeroPage addresses in artwork/sfx/rmtplayr.a65
.zpvar RMT_Zero_Page_V .byte
displayposition = modify displayposition = modify
;* RMT ZeroPage addresses
.zpvar RMT_Zero_Page_V .byte
; .zpvar p_tis .word
; .zpvar p_trackslbstable .word
; .zpvar p_trackshbstable .word
; .zpvar p_song .word
; .zpvar ns .word
; .zpvar nr .word
; .zpvar nt .word
; .zpvar reg1 .byte
; .zpvar reg2 .byte
; .zpvar reg3 .byte
; .zpvar tmp .byte
; IFT FEAT_COMMAND2
; .zpvar frqaddcmd2 .byte
; EIF
; p_instrstable = p_tis
;------------------------------- ;-------------------------------
icl 'lib/ATARISYS.ASM' icl 'lib/ATARISYS.ASM'
@@ -172,6 +155,8 @@
;splash screen and musix ;splash screen and musix
icl 'artwork/Scorch50.asm' icl 'artwork/Scorch50.asm'
;Game loading address ;Game loading address
ORG $3000 ORG $3000
WeaponFont WeaponFont
@@ -1058,6 +1043,7 @@ deletePtr = temp
; clean variables ; clean variables
lda #0 lda #0
sta escFlag
tay tay
mwa #variablesStart deletePtr mwa #variablesStart deletePtr
@ tya @ tya
@@ -1093,9 +1079,6 @@ SetunPlots
;setting up P/M graphics ;setting up P/M graphics
lda #>pmgraph lda #>pmgraph
sta pmbase sta pmbase
; lda dmactls
; ora #$38 ; Players and Missiles single lined
; sta dmactls
lda #$03 ; P/M on lda #$03 ; P/M on
sta GRACTL sta GRACTL
jsr SetPMWidth jsr SetPMWidth
@@ -1114,18 +1097,6 @@ MakeTanksVisible
mva #1 CurrentRoundNr ;we start from round 1 mva #1 CurrentRoundNr ;we start from round 1
mva #6 NTSCcounter mva #6 NTSCcounter
; ; RMT INIT
; lda #$f0 ;initial value
; sta RMTSFXVOLUME ;sfx note volume * 16 (0,16,32,...,240)
;
; lda #$ff ;initial value
; sta sfx_effect
;
; lda #0
; jsr RmtSongSelect
;
; VMAIN VBLinterrupt,7 ;jsr SetVBL
rts rts
.endp .endp
;-------------------------------------------------- ;--------------------------------------------------
BIN
View File
Binary file not shown.
+35 -52
View File
@@ -278,10 +278,7 @@ AfterManualPurchase
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
jsr PMoutofScreen jsr PMoutofScreen
mwa #PurchaseDL dlptrs mwa #PurchaseDL dlptrs
; lda dmactls lda #@dmactl(narrow|dma) ; narro screen width, DL on, P/M off
; and #$fc
; ora #$02 ; normal screen width
lda #%00110010 ; normal screen width, DL on, P/M off
sta dmactls sta dmactls
lda #song_supermarket lda #song_supermarket
@@ -328,7 +325,7 @@ AfterPurchase
sta decimal sta decimal
lda moneyH,x lda moneyH,x
sta decimal+1 sta decimal+1
mwa #textbuffer2+28 displayposition mwa #textbuffer2+26 displayposition
jsr displaydec5 jsr displaydec5
; in xbyte there is the address of the line that ; in xbyte there is the address of the line that
@@ -373,34 +370,34 @@ CreateList
; first parentheses and other special chars ; first parentheses and other special chars
; (it's easier this way) ; (it's easier this way)
ldy #22 ;ldy #22
lda #08 ; "(" ;lda #08 ; "("
STA (XBYTE),y ;STA (XBYTE),y
ldy #32 ;ldy #32
lda #09 ; ")" ;lda #09 ; ")"
sta (xbyte),y ;sta (xbyte),y
ldy #25 ldy #24
lda #15 ; "/" lda #15 ; "/"
sta (xbyte),y sta (xbyte),y
ldy #31 ldy #30
lda #16 ; "0" lda #16 ; "0"
sta (xbyte),y sta (xbyte),y
;now number of units (shells) to be purchased ;now number of units (shells) to be purchased
adw xbyte #23 displayposition ; 23 chars from the beginning of the line adw xbyte #22 displayposition ; 23 chars from the beginning of the line
lda WeaponUnits,x lda WeaponUnits,x
sta decimal sta decimal
jsr displaybyte jsr displaybyte
ldx temp ;getting back index of the weapon ldx temp ;getting back index of the weapon
; and now price of the weapon ; and now price of the weapon
adw xbyte #26 displayposition ; 26 chars from the beginning of the line adw xbyte #25 displayposition ; 26 chars from the beginning of the line
lda WeaponPriceL,x lda WeaponPriceL,x
sta decimal sta decimal
lda WeaponPriceH,x lda WeaponPriceH,x
sta decimal+1 sta decimal+1
jsr displaydec5 jsr displaydec5
ldy #26 ; overwrite first digit (allways space - no digit :) ) ldy #25 ; overwrite first digit (allways space - no digit :) )
lda #04 ; "$" lda #04 ; "$"
sta (xbyte),y sta (xbyte),y
@@ -422,11 +419,11 @@ itIsInventory
jeq noWeapon jeq noWeapon
; clear price area ; clear price area
ldy #22 ; beginning of the price area ldy #21 ; beginning of the price area
lda #0 lda #0
@ sta (XBYTE),y @ sta (XBYTE),y
iny iny
cpy #32+1 ; end of price cpy #32 ; end of price
bne @- bne @-
notInventory notInventory
@@ -502,7 +499,7 @@ DefenceList
inc HowManyOnTheListDef inc HowManyOnTheListDef
; If everything is copied then next line ; If everything is copied then next line
NextLineOfTheList NextLineOfTheList
adw xbyte #40 adw xbyte #32
TooLittleCash TooLittleCash
NoWeapon NoWeapon
@@ -531,26 +528,19 @@ WeHaveOffset
; now we have to erase empty position of both lists. ; now we have to erase empty position of both lists.
; Multiply number on list 1 by 40 and set address ; Multiply number on list 1 by 32 and set address
; of the first erased char. ; of the first erased char.
; (multiplying taken from book of Ruszczyc 'Assembler 6502' ; (multiplying taken from book of Ruszczyc 'Assembler 6502'
lda HowManyOnTheListOff lda HowManyOnTheListOff
sta xbyte+1 ; multiplier (temporarily here, it will be erased anyway) sta xbyte ; multiplier (temporarily here, it will be erased anyway)
lda #$00 ; higher byte of the Result lda #$00 ;
sta xbyte ; lower byte of the Result sta xbyte+1 ; higher byte of the Result
ldx #$08 ldx #$05 ; 2^5
Rotate04 @ asl xbyte
lsr xbyte+1 rol xbyte+1
bcc DoNotAddX01
clc
adc #40
DoNotAddX01
ror
ror xbyte
dex dex
bne Rotate04 bne @-
sta xbyte+1
; add to the address of the list ; add to the address of the list
clc clc
@@ -579,21 +569,14 @@ DoNotIncHigher1
; Multiply number on list 1 by 40 and set address ; Multiply number on list 1 by 40 and set address
; of the first erased char. ; of the first erased char.
lda HowManyOnTheListDef lda HowManyOnTheListDef
sta xbyte+1 ; multiplier sta xbyte ; multiplier (temporarily here, it will be erased anyway)
lda #$00 ; higher byte of the Result lda #$00 ;
sta xbyte ; lower byte of the Result sta xbyte+1 ; higher byte of the Result
ldx #$08 ldx #$05 ; 2^5
Rotate05 @ asl xbyte
lsr xbyte+1 rol xbyte+1
bcc DoNotAddX02
clc
adc #40
DoNotAddX02
ror
ror xbyte
dex dex
bne Rotate05 bne @-
sta xbyte+1
; add to the address of the list ; add to the address of the list
clc clc
@@ -957,7 +940,7 @@ DefActivationEnd
EraseLoop EraseLoop
tya ; lda #$00 tya ; lda #$00
sta (xbyte),y sta (xbyte),y
adw xbyte #40 adw xbyte #32
dex dex
bpl EraseLoop bpl EraseLoop
@@ -970,7 +953,7 @@ EraseLoop
ldx PositionOnTheList ldx PositionOnTheList
beq SelectList2 ; if there is 0 we add nothing beq SelectList2 ; if there is 0 we add nothing
AddLoop2 AddLoop2
adw xbyte #40 adw xbyte #32
dex dex
bne AddLoop2 bne AddLoop2
SelectList2 SelectList2
@@ -992,7 +975,7 @@ CharToList1
ldx PositionOnTheList ldx PositionOnTheList
beq SelectList1 ; if there is 0 we add nothing beq SelectList1 ; if there is 0 we add nothing
AddLoop1 AddLoop1
adw xbyte #40 adw xbyte #32
dex dex
bne AddLoop1 bne AddLoop1
SelectList1 SelectList1
@@ -1003,7 +986,7 @@ SelectList1
ldx OffsetDL1 ldx OffsetDL1
beq SetWindowList1 ; if zero then add nothing beq SetWindowList1 ; if zero then add nothing
LoopWindow1 LoopWindow1
adw xbyte #40 adw xbyte #32
dex dex
bne LoopWindow1 bne LoopWindow1
SetWindowList1 SetWindowList1
+9 -5
View File
@@ -10,6 +10,10 @@
;===================================================== ;=====================================================
OneTimeZeroVariables OneTimeZeroVariables
OneTimeZeroVariablesCount = variablesToInitialize-OneTimeZeroVariables ; MAX 128 bytes ! OneTimeZeroVariablesCount = variablesToInitialize-OneTimeZeroVariables ; MAX 128 bytes !
.if OneTimeZeroVariablesCount > 127
.error "OneTimeZeroVariablesCount too large, ",OneTimeZeroVariablesCount
.endif
noMusic .by 0 ; 0 - play music, $ff - do not play music noMusic .by 0 ; 0 - play music, $ff - do not play music
noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX
;---------------------------------------------------- ;----------------------------------------------------
@@ -17,7 +21,7 @@ noSfx .by 0 ; 0 - play SFX, $ff - do not play SFX
.by $00 ; labels line color .by $00 ; labels line color
GameOverColoursTable .BYTE $80,$40,$c4,$20,$c0,$e4 GameOverColoursTable .BYTE $80,$40,$c4,$20,$c0,$e4
;---------------------------------------------------- ;----------------------------------------------------
TanksNames ; DO NOT ZERO ON RESTART GAME - ticket #24 TanksNames ; DO NOT ZERO ON GAME RESTART - ticket #24
:6 dta d" " :6 dta d" "
;---------------------------------------------------- ;----------------------------------------------------
skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30) skilltable ; computer controlled players' skills (1-8), 0 - human (no cleaning, ticket #30)
@@ -122,7 +126,7 @@ WeaponDepleted .DS 1 ; if 0 deactivate the weapon and switch to Baby Missile
; 20203.5 => 128 : <20203 : >20203 ; 20203.5 => 128 : <20203 : >20203
;---------------------------------------------------- ;----------------------------------------------------
L1 .DS 1 ; variable used in multiplications (by 10:) ;L1 .DS 1 ; variable used in multiplications (by 10:)
;gravity .DS 1 ;only the decimal part (1/10 = 25) ;gravity .DS 1 ;only the decimal part (1/10 = 25)
;---------------------------------------------------- ;----------------------------------------------------
@@ -162,8 +166,8 @@ WeaponRangeRight .DS 2
;HowMuchToFall .ds 1 ;HowMuchToFall .ds 1
HeightRol .DS 1 HeightRol .DS 1
;digger ;digger
digstartx .DS 2 ;digstartx .DS 2
digstarty .DS 2 ;digstarty .DS 2
diggery .DS 1 diggery .DS 1
DigLong .DS 1 DigLong .DS 1
digtabxL .DS [8] digtabxL .DS [8]
@@ -204,7 +208,7 @@ FloatingAlt .DS 1 ; floating tank altitude
xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte xtraj00 .DS [5] ; 3 bytes of xtraj times 5. Lowest byte
xtraj01 .DS [5] ; middle byte xtraj01 .DS [5] ; middle byte
xtraj02 .DS [5] ; high byte xtraj02 .DS [5] ; high byte
vx00 .DS [5] ;vx00 .DS [5] ; looks like it is not really used anywhere
vx01 .DS [5] vx01 .DS [5]
vx02 .DS [5] vx02 .DS [5]
vx03 .DS [5] vx03 .DS [5]
+4 -4
View File
@@ -465,8 +465,8 @@ EndNurnedCheckLoop
.endp .endp
; ------------------------ ; ------------------------
.proc xdigger .proc xdigger
mwa xdraw digstartx ;mwa xdraw digstartx
mwa ydraw digstarty ;mwa ydraw digstarty
ldx diggery ldx diggery
WriteToBranches WriteToBranches
lda xdraw lda xdraw
@@ -2012,8 +2012,8 @@ MIRVcopyParameters
sta xtraj01,x sta xtraj01,x
lda xtraj+2 lda xtraj+2
sta xtraj02,x sta xtraj02,x
lda vx ;lda vx
sta vx00,x ;sta vx00,x
lda vx+1 lda vx+1
sta vx01,x sta vx01,x
lda vx+2 lda vx+2