wip: purchase does not show active weapon #26

This commit is contained in:
2022-06-11 20:08:25 -04:00
parent cd4275226a
commit c47a22a833
2 changed files with 9 additions and 7 deletions
BIN
View File
Binary file not shown.
+9 -7
View File
@@ -318,11 +318,11 @@ CreateList
itIsInventory itIsInventory
lda TanksWeaponsTableL,y lda TanksWeaponsTableL,y
sta temp2 sta weaponPointer
lda TanksWeaponsTableH,y lda TanksWeaponsTableH,y
sta temp2+1 sta weaponPointer+1
ldy temp ldy temp
lda (temp2),y lda (weaponPointer),y
jeq noWeapon jeq noWeapon
notInventory notInventory
@@ -548,8 +548,10 @@ DoNotIncHigher2
; screen clearing at each list refresh ; screen clearing at each list refresh
; (it was very ugly - I checked it :) ; (it was very ugly - I checked it :)
bit isInventory ;
; calculate positionOnTheList bpl ChoosingItemForPurchase
; calculate positionOnTheList from the activeWeapon
ldx tankNr ldx tankNr
lda activeWeapon,x lda activeWeapon,x
ldy #0 ldy #0
@@ -729,7 +731,7 @@ LessThan100
lda #0 lda #0
sta (weaponPtr),y sta (weaponPtr),y
@ @
mva #0 PositionOnTheList ; to move the pointer to the top mva #0 PositionOnTheList ; to move the pointer to the top when no more monies
jmp Purchase.AfterPurchase jmp Purchase.AfterPurchase
.endp .endp
@@ -739,7 +741,7 @@ LessThan100
ldx #52 ; there are 52 lines total ldx #52 ; there are 52 lines total
ldy #$00 ldy #$00
EraseLoop EraseLoop
lda #$00 tya ; lda #$00
sta (xbyte),y sta (xbyte),y
adw xbyte #40 adw xbyte #40
dex dex