mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
fresh page as requested
This commit is contained in:
+70
-80
@@ -475,9 +475,9 @@ DeffensiveSelected
|
||||
; Creating full list of the available weapons for displaying
|
||||
; in X there is an index of the weapon to be checked,
|
||||
; in 'Xbyte' address of the first char in filled screen line
|
||||
@weapon_index = temp
|
||||
|
||||
CreateList
|
||||
stx temp ; index of a weapon will be necessary later
|
||||
stx @weapon_index ; index of a weapon will be necessary later
|
||||
; checking if the weapon of the given index is present
|
||||
lda WeaponUnits,x
|
||||
jeq NoWeapon
|
||||
@@ -493,7 +493,7 @@ CreateList
|
||||
mwa #PurchaseTitle DLPurTitleAddr
|
||||
|
||||
; checking if we can afford buying this weapon
|
||||
ldx temp
|
||||
;ldx @weapon_index
|
||||
lda moneyH,y
|
||||
cmp WeaponPriceH,x
|
||||
bne @+
|
||||
@@ -505,14 +505,18 @@ CreateList
|
||||
; we have enough cash and the weapon can be
|
||||
; 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)
|
||||
;ldy #22
|
||||
;lda #08 ; "("
|
||||
;STA (XBYTE),y
|
||||
;ldy #32
|
||||
;lda #09 ; ")"
|
||||
;sta (xbyte),y
|
||||
|
||||
ldy #24
|
||||
lda #15 ; "/"
|
||||
sta (xbyte),y
|
||||
@@ -525,7 +529,7 @@ CreateList
|
||||
lda WeaponUnits,x
|
||||
sta decimal
|
||||
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
|
||||
adw xbyte #25 displayposition ; 26 chars from the beginning of the line
|
||||
@@ -546,62 +550,36 @@ itIsInventory
|
||||
; and Title
|
||||
mwa #InventoryTitle DLPurTitleAddr
|
||||
|
||||
ldx temp
|
||||
; ldx @weapon_index
|
||||
; WHAT THE HECK IS Y HERE???? I DO NOT UNDERSTAND!!!!
|
||||
lda TanksWeaponsTableL,y
|
||||
sta weaponPointer
|
||||
lda TanksWeaponsTableH,y
|
||||
sta weaponPointer+1
|
||||
ldy temp
|
||||
ldy @weapon_index
|
||||
lda (weaponPointer),y
|
||||
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
|
||||
|
||||
; number of posessed shells
|
||||
lda temp ; weapon index again
|
||||
lda @weapon_index ; weapon index again
|
||||
jsr HowManyBullets
|
||||
sta decimal
|
||||
|
||||
adw xbyte #1 displayposition
|
||||
jsr displaybyte
|
||||
|
||||
ldx temp ;weapon index
|
||||
ldx @weapon_index
|
||||
; now symbol of the weapon
|
||||
lda WeaponSymbols,x
|
||||
ldy #$4 ; 4 chars from the beginning of the line
|
||||
sta (xbyte),y
|
||||
|
||||
; and now name of the weapon and finisheeeedd !!!!
|
||||
mva #0 temp+1 ; this number is only in X
|
||||
; times 16 (it's length of the names of weapons)
|
||||
ldy #3 ; Rotate 4 times
|
||||
@
|
||||
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)
|
||||
adw xbyte #6 weaponPointer ; from 6th char on screen
|
||||
txa
|
||||
jsr DisplayWeaponName
|
||||
|
||||
; If on screen after the purchase there is still
|
||||
; present the weapon purchased recently,
|
||||
@@ -1855,28 +1833,15 @@ ThisIsAI
|
||||
;=========================
|
||||
;displaying name of the weapon
|
||||
;=========================
|
||||
mwa #statusBuffer+24 weaponPointer ; from 24th char on screen
|
||||
ldx TankNr
|
||||
lda ActiveWeapon,x
|
||||
sta temp ;get back number of the weapon
|
||||
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 @-
|
||||
jsr DisplayWeaponName
|
||||
|
||||
;=========================
|
||||
;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)
|
||||
bpl @+
|
||||
lda #char_computer ; Auto Defense symbol
|
||||
@@ -1892,26 +1857,11 @@ ThisIsAI
|
||||
lda #space
|
||||
sta statusBuffer+80+22
|
||||
sta statusBuffer+80+39
|
||||
mwa #emptyLine temp
|
||||
jmp ClearingOnly
|
||||
; lda #0 ; #space == #0
|
||||
tay
|
||||
jsr DisplayWeaponName.ClearingOnly
|
||||
ActiveDefence
|
||||
sta temp ;get back number of the weapon
|
||||
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 @-
|
||||
jsr DisplayWeaponName
|
||||
|
||||
;=========================
|
||||
;displaying the energy of a tank
|
||||
@@ -2070,5 +2020,45 @@ AngleDisplay
|
||||
|
||||
rts
|
||||
.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
|
||||
+49
-49
@@ -478,57 +478,57 @@ WeaponSymbols
|
||||
.by $5e ;ind_Auto_Defense ;_46
|
||||
.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
|
||||
dta d"Baby Missile " ; 0
|
||||
dta d"Missile " ; 1
|
||||
dta d"Baby Nuke " ; 2
|
||||
dta d"Nuke " ; 3
|
||||
dta d"LeapFrog " ; 4
|
||||
dta d"Funky Bomb " ; 5
|
||||
dta d"MIRV " ; 6
|
||||
dta d"Death's Head " ; 7
|
||||
dta d"Napalm " ; 8
|
||||
dta d"Hot Napalm " ; 9
|
||||
dta d"Tracer " ; 10
|
||||
dta d"Smoke Tracer " ; 11
|
||||
dta d"Baby Roller " ; 12
|
||||
dta d"Roller " ; 13
|
||||
dta d"Heavy Roller " ; 14
|
||||
dta d"Riot Charge " ; 15
|
||||
dta d"Riot Blast " ; 16
|
||||
dta d"Riot Bomb " ; 17
|
||||
dta d"Heavy Riot Bomb " ; 18
|
||||
dta d"Baby Digger " ; 19
|
||||
dta d"Digger " ; 20
|
||||
dta d"Heavy Digger " ; 21
|
||||
dta d"Sandhog " ; 22
|
||||
dta d"Heavy Sandhog " ; 23
|
||||
dta d"Dirt Clod " ; 24
|
||||
dta d"Dirt Ball " ; 25
|
||||
dta d"Ton of Dirt " ; 26
|
||||
dta d"Liquid Dirt " ; 27
|
||||
dta d"Dirt Charge " ; 28
|
||||
dta d"Stomp " ; 29
|
||||
dta d"Best F...g Gifts" ; 30
|
||||
dta d"Laser " ; 31
|
||||
dta d"Baby Missil", d"e"* ; 0
|
||||
dta d"Missil", d"e"* ; 1
|
||||
dta d"Baby Nuk", d"e"* ; 2
|
||||
dta d"Nuk", d"e"* ; 3
|
||||
dta d"LeapFro", d"g"* ; 4
|
||||
dta d"Funky Bom", d"b"* ; 5
|
||||
dta d"MIR", d"V"* ; 6
|
||||
dta d"Death's Hea", d"d"* ; 7
|
||||
dta d"Napal", d"m"* ; 8
|
||||
dta d"Hot Napal", d"m"* ; 9
|
||||
dta d"Trace", d"r"* ; 10
|
||||
dta d"Smoke Trace", d"r"* ; 11
|
||||
dta d"Baby Rolle", d"r"* ; 12
|
||||
dta d"Rolle", d"r"* ; 13
|
||||
dta d"Heavy Rolle", d"r"* ; 14
|
||||
dta d"Riot Charg", d"e"* ; 15
|
||||
dta d"Riot Blas", d"t"* ; 16
|
||||
dta d"Riot Bom", d"b"* ; 17
|
||||
dta d"Heavy Riot Bom", d"b"* ; 18
|
||||
dta d"Baby Digge", d"r"* ; 19
|
||||
dta d"Digge", d"r"* ; 20
|
||||
dta d"Heavy Digge", d"r"* ; 21
|
||||
dta d"Sandho", d"g"* ; 22
|
||||
dta d"Heavy Sandho", d"g"* ; 23
|
||||
dta d"Dirt Clo", d"d"* ; 24
|
||||
dta d"Dirt Bal", d"l"* ; 25
|
||||
dta d"Ton of Dir", d"t"* ; 26
|
||||
dta d"Liquid Dir", d"t"* ; 27
|
||||
dta d"Dirt Charg", d"e"* ; 28
|
||||
dta d"Stom", d"p"* ; 29
|
||||
dta d"Best F...g Gift", d"s"* ; 30
|
||||
dta d"Lase", d"r"* ; 31
|
||||
;------defensives
|
||||
dta d"White Flag " ; 32
|
||||
dta d"Battery " ; 33
|
||||
dta d"Hovercraft " ; 34
|
||||
dta d"Parachute " ; 35 - no energy
|
||||
dta d"Strong Parachute" ; 36 - with energy (earlier Battery)
|
||||
dta d"Mag Deflector " ; 37 - with shield and energy
|
||||
dta d"Shield " ; 38 - shield for one shot - no energy
|
||||
dta d"Heavy Shield " ; 39 - shield with energy
|
||||
dta d"Force Shield " ; 40 - shield with energy and parachute
|
||||
dta d"Bouncy Castle " ; 41 - with shield and energy
|
||||
dta d"Long Schlong " ; 42
|
||||
dta d"Nuclear Winter " ; 43
|
||||
dta d"Lazy Boy " ; 44
|
||||
dta d"Lazy Darwin " ; 45
|
||||
dta d"Auto Defense " ; 46
|
||||
dta d"Spy Hard " ; 47
|
||||
dta d"White Fla", d"g"* ; 32
|
||||
dta d"Batter", d"y"* ; 33
|
||||
dta d"Hovercraf", d"t"* ; 34
|
||||
dta d"Parachut", d"e"* ; 35 - no energy
|
||||
dta d"Strong Parachut", d"e"* ; 36 - with energy (earlier Battery)
|
||||
dta d"Mag Deflecto", d"r"* ; 37 - with shield and energy
|
||||
dta d"Shiel", d"d"* ; 38 - shield for one shot - no energy
|
||||
dta d"Heavy Shiel", d"d"* ; 39 - shield with energy
|
||||
dta d"Force Shiel", d"d"* ; 40 - shield with energy and parachute
|
||||
dta d"Bouncy Castl", d"e"* ; 41 - with shield and energy
|
||||
dta d"Long Schlon", d"g"* ; 42
|
||||
dta d"Nuclear Winte", d"r"* ; 43
|
||||
dta d"Lazy Bo", d"y"* ; 44
|
||||
dta d"Lazy Darwi", d"n"* ; 45
|
||||
dta d"Auto Defens", d"e"* ; 46
|
||||
dta d"Spy Har", d"d"* ; 47
|
||||
|
||||
DefensiveEnergy = *-number_of_offensives ; to fake the table for ALL weapons
|
||||
.by 00 ; White Flag
|
||||
|
||||
+1
-1
@@ -1599,7 +1599,7 @@ NotHigher
|
||||
; all text start from `talk` and end with an inverse.
|
||||
; we go through the `talk`, count number of inverses.
|
||||
; if equal to TextNumberOff, it is our text, printit
|
||||
inverse_counter = temp
|
||||
inverse_counter = temp+1
|
||||
|
||||
tya
|
||||
tax ; save Y
|
||||
|
||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user