fresh page as requested

This commit is contained in:
2023-06-03 00:13:01 -04:00
parent daa9c4501f
commit 3e0b801e8f
6 changed files with 120 additions and 130 deletions
+70 -80
View File
@@ -475,9 +475,9 @@ DeffensiveSelected
; Creating full list of the available weapons for displaying ; Creating full list of the available weapons for displaying
; in X there is an index of the weapon to be checked, ; in X there is an index of the weapon to be checked,
; in 'Xbyte' address of the first char in filled screen line ; in 'Xbyte' address of the first char in filled screen line
@weapon_index = temp
CreateList stx @weapon_index ; index of a weapon will be necessary later
stx temp ; index of a weapon will be necessary later
; checking if the weapon of the given index is present ; checking if the weapon of the given index is present
lda WeaponUnits,x lda WeaponUnits,x
jeq NoWeapon jeq NoWeapon
@@ -493,7 +493,7 @@ CreateList
mwa #PurchaseTitle DLPurTitleAddr mwa #PurchaseTitle DLPurTitleAddr
; checking if we can afford buying this weapon ; checking if we can afford buying this weapon
ldx temp ;ldx @weapon_index
lda moneyH,y lda moneyH,y
cmp WeaponPriceH,x cmp WeaponPriceH,x
bne @+ bne @+
@@ -505,14 +505,18 @@ CreateList
; we have enough cash and the weapon can be ; we have enough cash and the weapon can be
; added to the list ; added to the list
; first parentheses and other special chars
; clear list line
lda #0
tay ; ldy #0
@ sta (XBYTE),y
iny
cpy #32 ; end of price
bne @-
; first special chars
; (it's easier this way) ; (it's easier this way)
;ldy #22
;lda #08 ; "("
;STA (XBYTE),y
;ldy #32
;lda #09 ; ")"
;sta (xbyte),y
ldy #24 ldy #24
lda #15 ; "/" lda #15 ; "/"
sta (xbyte),y sta (xbyte),y
@@ -525,7 +529,7 @@ CreateList
lda WeaponUnits,x lda WeaponUnits,x
sta decimal sta decimal
jsr displaybyte jsr displaybyte
ldx temp ;getting back index of the weapon ldx @weapon_index ;getting back index of the weapon
; and now price of the weapon ; and now price of the weapon
adw xbyte #25 displayposition ; 26 chars from the beginning of the line adw xbyte #25 displayposition ; 26 chars from the beginning of the line
@@ -546,62 +550,36 @@ itIsInventory
; and Title ; and Title
mwa #InventoryTitle DLPurTitleAddr mwa #InventoryTitle DLPurTitleAddr
ldx temp ; ldx @weapon_index
; WHAT THE HECK IS Y HERE???? I DO NOT UNDERSTAND!!!!
lda TanksWeaponsTableL,y lda TanksWeaponsTableL,y
sta weaponPointer sta weaponPointer
lda TanksWeaponsTableH,y lda TanksWeaponsTableH,y
sta weaponPointer+1 sta weaponPointer+1
ldy temp ldy @weapon_index
lda (weaponPointer),y lda (weaponPointer),y
jeq noWeapon jeq noWeapon
; clear price area
ldy #21 ; beginning of the price area
lda #0
@ sta (XBYTE),y
iny
cpy #32 ; end of price
bne @-
notInventory notInventory
; number of posessed shells ; number of posessed shells
lda temp ; weapon index again lda @weapon_index ; weapon index again
jsr HowManyBullets jsr HowManyBullets
sta decimal sta decimal
adw xbyte #1 displayposition adw xbyte #1 displayposition
jsr displaybyte jsr displaybyte
ldx temp ;weapon index ldx @weapon_index
; now symbol of the weapon ; now symbol of the weapon
lda WeaponSymbols,x lda WeaponSymbols,x
ldy #$4 ; 4 chars from the beginning of the line ldy #$4 ; 4 chars from the beginning of the line
sta (xbyte),y sta (xbyte),y
; and now name of the weapon and finisheeeedd !!!! ; and now name of the weapon and finisheeeedd !!!!
mva #0 temp+1 ; this number is only in X adw xbyte #6 weaponPointer ; from 6th char on screen
; times 16 (it's length of the names of weapons) txa
ldy #3 ; Rotate 4 times jsr DisplayWeaponName
@
asl temp
rol temp+1
dey
bpl @-
adw temp #NamesOfWeapons-6 weaponPointer
ldy #6 ; from 6th char on screen
@
lda (weaponPointer),y
sta (xbyte),y
iny
cpy #(16+6)
bne @-
; in X there is what we need (weapon index)
; If on screen after the purchase there is still ; If on screen after the purchase there is still
; present the weapon purchased recently, ; present the weapon purchased recently,
@@ -1855,28 +1833,15 @@ ThisIsAI
;========================= ;=========================
;displaying name of the weapon ;displaying name of the weapon
;========================= ;=========================
mwa #statusBuffer+24 weaponPointer ; from 24th char on screen
ldx TankNr ldx TankNr
lda ActiveWeapon,x lda ActiveWeapon,x
sta temp ;get back number of the weapon jsr DisplayWeaponName
mva #0 temp+1
; times 16 (because this is length of weapon name)
ldy #3 ; shift left 4 times
@
aslw temp
dey
bpl @-
adw temp #NamesOfWeapons
ldy #15
@
lda (temp),y
sta statusBuffer+24,y
dey
bpl @-
;========================= ;=========================
;displaying name of the defence weapon (if active) ;displaying name of the defence weapon (if active)
;========================= ;=========================
mwa #statusBuffer+40+40+23 weaponPointer ; where to display the
lda AutoDefenseFlag,x ; Auto Defense symbol (space or "A" in inverse) lda AutoDefenseFlag,x ; Auto Defense symbol (space or "A" in inverse)
bpl @+ bpl @+
lda #char_computer ; Auto Defense symbol lda #char_computer ; Auto Defense symbol
@@ -1892,26 +1857,11 @@ ThisIsAI
lda #space lda #space
sta statusBuffer+80+22 sta statusBuffer+80+22
sta statusBuffer+80+39 sta statusBuffer+80+39
mwa #emptyLine temp ; lda #0 ; #space == #0
jmp ClearingOnly tay
jsr DisplayWeaponName.ClearingOnly
ActiveDefence ActiveDefence
sta temp ;get back number of the weapon jsr DisplayWeaponName
mva #0 temp+1
; times 16 (because this is length of weapon name)
ldy #3 ; shift left 4 times
@
aslw temp
dey
bpl @-
adw temp #NamesOfWeapons
ClearingOnly
ldy #15
@
lda (temp),y
sta statusBuffer+40+40+23,y
dey
bpl @-
;========================= ;=========================
;displaying the energy of a tank ;displaying the energy of a tank
@@ -2070,5 +2020,45 @@ AngleDisplay
rts rts
.endp .endp
;-------------------------------------------------
.proc DisplayWeaponName
; nr of weapon in A, address to put in weaponPointer
@weapon_index = temp
sta @weapon_index ;get back number of the weapon
@inverse_counter = temp+1
mwa #0 @inverse_counter
tay ; ldy #0
mwa #(NamesOfWeapons-1) LineAddress4x4
@
inw LineAddress4x4
lda (LineAddress4x4),y
spl:inc @inverse_counter
lda @weapon_index
beq zeroth_talk ; special treatment of talk #0
cmp @inverse_counter
bne @-
inw LineAddress4x4 ; we were pointing at the char with inverse, must go 1 further
zeroth_talk
; now copy text to screen
dey ; ldy #-1
@
iny
lda (LineAddress4x4),y
sta (weaponPointer),y
bpl @-
and #%01111111 ; remove reverse
clearingOnly
sta (weaponPointer),y
lda #0 ; clean the rest
iny:cpy #16 ; weapon name is max 16 chars
bne clearingonly
rts
.endp
.endif .endif
+49 -49
View File
@@ -478,57 +478,57 @@ WeaponSymbols
.by $5e ;ind_Auto_Defense ;_46 .by $5e ;ind_Auto_Defense ;_46
.by $7c ;ind_Spy_Hard ;_47 .by $7c ;ind_Spy_Hard ;_47
; Names of weapons (16 chars long) ; Names of weapons (max 16 chars long)
NamesOfWeapons ;the comment is an index in the tables NamesOfWeapons ;the comment is an index in the tables
dta d"Baby Missile " ; 0 dta d"Baby Missil", d"e"* ; 0
dta d"Missile " ; 1 dta d"Missil", d"e"* ; 1
dta d"Baby Nuke " ; 2 dta d"Baby Nuk", d"e"* ; 2
dta d"Nuke " ; 3 dta d"Nuk", d"e"* ; 3
dta d"LeapFrog " ; 4 dta d"LeapFro", d"g"* ; 4
dta d"Funky Bomb " ; 5 dta d"Funky Bom", d"b"* ; 5
dta d"MIRV " ; 6 dta d"MIR", d"V"* ; 6
dta d"Death's Head " ; 7 dta d"Death's Hea", d"d"* ; 7
dta d"Napalm " ; 8 dta d"Napal", d"m"* ; 8
dta d"Hot Napalm " ; 9 dta d"Hot Napal", d"m"* ; 9
dta d"Tracer " ; 10 dta d"Trace", d"r"* ; 10
dta d"Smoke Tracer " ; 11 dta d"Smoke Trace", d"r"* ; 11
dta d"Baby Roller " ; 12 dta d"Baby Rolle", d"r"* ; 12
dta d"Roller " ; 13 dta d"Rolle", d"r"* ; 13
dta d"Heavy Roller " ; 14 dta d"Heavy Rolle", d"r"* ; 14
dta d"Riot Charge " ; 15 dta d"Riot Charg", d"e"* ; 15
dta d"Riot Blast " ; 16 dta d"Riot Blas", d"t"* ; 16
dta d"Riot Bomb " ; 17 dta d"Riot Bom", d"b"* ; 17
dta d"Heavy Riot Bomb " ; 18 dta d"Heavy Riot Bom", d"b"* ; 18
dta d"Baby Digger " ; 19 dta d"Baby Digge", d"r"* ; 19
dta d"Digger " ; 20 dta d"Digge", d"r"* ; 20
dta d"Heavy Digger " ; 21 dta d"Heavy Digge", d"r"* ; 21
dta d"Sandhog " ; 22 dta d"Sandho", d"g"* ; 22
dta d"Heavy Sandhog " ; 23 dta d"Heavy Sandho", d"g"* ; 23
dta d"Dirt Clod " ; 24 dta d"Dirt Clo", d"d"* ; 24
dta d"Dirt Ball " ; 25 dta d"Dirt Bal", d"l"* ; 25
dta d"Ton of Dirt " ; 26 dta d"Ton of Dir", d"t"* ; 26
dta d"Liquid Dirt " ; 27 dta d"Liquid Dir", d"t"* ; 27
dta d"Dirt Charge " ; 28 dta d"Dirt Charg", d"e"* ; 28
dta d"Stomp " ; 29 dta d"Stom", d"p"* ; 29
dta d"Best F...g Gifts" ; 30 dta d"Best F...g Gift", d"s"* ; 30
dta d"Laser " ; 31 dta d"Lase", d"r"* ; 31
;------defensives ;------defensives
dta d"White Flag " ; 32 dta d"White Fla", d"g"* ; 32
dta d"Battery " ; 33 dta d"Batter", d"y"* ; 33
dta d"Hovercraft " ; 34 dta d"Hovercraf", d"t"* ; 34
dta d"Parachute " ; 35 - no energy dta d"Parachut", d"e"* ; 35 - no energy
dta d"Strong Parachute" ; 36 - with energy (earlier Battery) dta d"Strong Parachut", d"e"* ; 36 - with energy (earlier Battery)
dta d"Mag Deflector " ; 37 - with shield and energy dta d"Mag Deflecto", d"r"* ; 37 - with shield and energy
dta d"Shield " ; 38 - shield for one shot - no energy dta d"Shiel", d"d"* ; 38 - shield for one shot - no energy
dta d"Heavy Shield " ; 39 - shield with energy dta d"Heavy Shiel", d"d"* ; 39 - shield with energy
dta d"Force Shield " ; 40 - shield with energy and parachute dta d"Force Shiel", d"d"* ; 40 - shield with energy and parachute
dta d"Bouncy Castle " ; 41 - with shield and energy dta d"Bouncy Castl", d"e"* ; 41 - with shield and energy
dta d"Long Schlong " ; 42 dta d"Long Schlon", d"g"* ; 42
dta d"Nuclear Winter " ; 43 dta d"Nuclear Winte", d"r"* ; 43
dta d"Lazy Boy " ; 44 dta d"Lazy Bo", d"y"* ; 44
dta d"Lazy Darwin " ; 45 dta d"Lazy Darwi", d"n"* ; 45
dta d"Auto Defense " ; 46 dta d"Auto Defens", d"e"* ; 46
dta d"Spy Hard " ; 47 dta d"Spy Har", d"d"* ; 47
DefensiveEnergy = *-number_of_offensives ; to fake the table for ALL weapons DefensiveEnergy = *-number_of_offensives ; to fake the table for ALL weapons
.by 00 ; White Flag .by 00 ; White Flag
+1 -1
View File
@@ -1599,7 +1599,7 @@ NotHigher
; all text start from `talk` and end with an inverse. ; all text start from `talk` and end with an inverse.
; we go through the `talk`, count number of inverses. ; we go through the `talk`, count number of inverses.
; if equal to TextNumberOff, it is our text, printit ; if equal to TextNumberOff, it is our text, printit
inverse_counter = temp inverse_counter = temp+1
tya tya
tax ; save Y tax ; save Y
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.
BIN
View File
Binary file not shown.