WIP: press I for inventory #26

This commit is contained in:
2022-06-11 05:51:13 -04:00
parent eb7f6369de
commit c1aa177767
8 changed files with 49 additions and 39 deletions
+3 -3
View File
@@ -14,9 +14,9 @@ dliColorsFore
TextBackgroundColor = $02 ; REAL constans - use: LDA #TextBackgroundColor
TextForegroundColor = $0c
CashOptionL ;(one zero less than on the screen)
.by 0,<200,<500,<800,<1000
.by 0,<200,<800,<1200,<2000
CashOptionH
.by 0,>200,>500,>800,>1000
.by 0,>200,>800,>1200,>2000
GravityTable .by 10,20,25,30,40
MaxWindTable .by 5,20,40,70,99
RoundsTable .by 10,20,30,40,50
@@ -863,7 +863,7 @@ NamesOfWeapons ;the comment is an index in the tables
dta d"----------------" ; 44
dta d"----------------" ; 45
dta d"----------------" ; 46
dta d" " ; 47 ; special (no weapon) name for simplify display
dta d" " ; 47 ; special (no weapon) name to simplify display
dta d"Heat Guidance " ; 48 ($30)
dta d"Bal Guidance " ; 49
+6 -6
View File
@@ -64,14 +64,14 @@ price_Bal_Guidance___ = $ffff ;_49
price_Horz_Guidance__ = $ffff ;_50
price_Vert_Guidance__ = $ffff ;_51
price_Lazy_Boy_______ = $ffff ;_52
price_Parachute______ = 1100 ;_53
price_Parachute______ = 800 ;_53
price_Battery________ = $ffff ;_54
price_Mag_Deflector__ = $ffff ;_55
price_Shield_________ = $ffff ;_56
price_Force_Shield___ = $ffff ;_57
price_Mag_Deflector__ = 1200 ;_55
price_Shield_________ = 500 ;_56
price_Force_Shield___ = 2100 ;_57
price_Heavy_Shield___ = $ffff ;_58
price_Super_Mag______ = $ffff ;_59
price_Auto_Defense___ = $ffff ;_60
price_Super_Mag______ = 1600 ;_59
price_Auto_Defense___ = 3000 ;_60
price_Fuel_Tank______ = $ffff ;_61
price_Contact_Trigger = $ffff ;_62
price_White_Flag_____ = $0 ;_63
+1 -1
View File
@@ -104,7 +104,7 @@ OptionsScreen
OptionsHere
; 0123456789012345678901234567890123456789
dta d"Players : 2 3 4 5 6 "
dta d"Cash : none 2K 5K 8K 10K "
dta d"Cash : none 2K 8K 12K 20K "
dta d"Gravity : 0.2G 0.5G 1G 2G 4G "
dta d"Wind : 1B 3B 5B 7B 9B "
dta d"Rounds : 10 20 30 40 50 "
+10
View File
@@ -1567,4 +1567,14 @@ EndPut4x4
rts
.endp
.proc SetMainScreen
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
mwa #dl dlptrs ; issue #72 (glitches when switches)
lda dmactls
and #$fc
ora #$02 ; 2=normal, 3 = wide screen width
sta dmactls
rts
.endp
.endif
+1 -9
View File
@@ -139,8 +139,6 @@ START
bpl @-
; mag deflector activated! (test)
MainGameLoop
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
jsr CallPurchaseForEveryTank
; issue #72 (glitches when switches)
@@ -309,13 +307,7 @@ SettingEnergies
jsr calculatemountains ;let mountains be easy for the eye
;jsr calculatemountains0 ;only for tests - makes mountains flat and 0 height
VDLI DLIinterruptGraph ; jsr SetDLI for graphics (game) screen
mwa #dl dlptrs ; issue #72 (glitches when switches)
lda dmactls
and #$fc
ora #$02 ; 2=normal, 3 = wide screen width
sta dmactls
jsr SetMainScreen
jsr drawmountains ;draw them
jsr drawtanks ;finally draw tanks
BIN
View File
Binary file not shown.
+19 -18
View File
@@ -201,12 +201,6 @@ OptionsYLoop
;-------------------------------------------
; call of the purchase screens for each tank
.proc CallPurchaseForEveryTank
jsr PMoutofScreen
mwa #PurchaseDL dlptrs
lda dmactls
and #$fc
ora #$02 ; normal screen width
sta dmactls
mva #0 TankNr
@
@@ -236,12 +230,22 @@ AfterManualPurchase
; Rest of the data is taken from appropriate tables
; and during the purchase these tables are modified.
VDLI DLIinterruptText ; jsr SetDLI for text (purchase) screen
jsr PMoutofScreen
mwa #PurchaseDL dlptrs
lda dmactls
and #$fc
ora #$02 ; normal screen width
sta dmactls
mwa #ListOfWeapons WeaponsListDL ;switch to the list of offensive weapons
ldx tankNr
lda TankStatusColoursTable,x
sta colpf2s
sta colpf2s
lda activeWeapon,x
sta PositionOnTheList
; we are clearing list of the weapons
mva #$ff LastWeapon
mva #$00 WhichList
@@ -280,7 +284,6 @@ AfterPurchase
ldx #$00 ; number of the checked weapon
stx HowManyOnTheList1 ; amounts of weapons (shells, bullets) in both lists
stx HowManyOnTheList2
stx PositionOnTheList
; Creating full list of the available weapons for displaying
; in X there is a number of the weapon to be checked,
@@ -559,7 +562,10 @@ ChoosingItemForPurchase
jsr PutLitteChar ; Places pointer at the right position
jsr getkey
ldx escFlag
seq:rts
beq @+
jsr WaitForKeyRelease
rts
@
cmp #$2c ; Tab
jeq ListChange
cmp #$0c ; Return
@@ -717,22 +723,17 @@ LessThan100
.endp
.proc PutLitteChar
; first let's cleat both lists from little chars
; first let's clear both lists from little chars
mwa #ListOfWeapons xbyte
ldx #52 ; there are 52 lines total
ldy #$00
EraseLoop
lda #$00
sta (xbyte),y
clc
lda xbyte
adc #40
sta xbyte
bcc ominx02
inc xbyte+1
ominx02
adw xbyte #40 xbyte
dex
bpl EraseLoop
; now let's check which list is active now
lda WhichList
beq CharToList1
+9 -2
View File
@@ -1040,9 +1040,9 @@ notpressed
beq notpressed
lda SKSTAT
cmp #$ff
beq checkJoy
jeq checkJoy
cmp #$f7 ; SHIFT
beq checkJoy
jeq checkJoy
lda kbcode
and #%10111111 ; SHIFT elimination
@@ -1055,6 +1055,13 @@ notpressed
;---esc pressed-quit game---
rts
@
cmp #$0d ; I
bne @+
jsr Purchase
mva #0 escFlag
jsr SetMainScreen
jsr DrawTanks
@
cmp #$8e
jeq CTRLPressedUp