mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Purchase AI uses bit tables instead bytes
This commit is contained in:
@@ -858,7 +858,15 @@ PurchaseAIRoutines
|
|||||||
; TankNr in X
|
; TankNr in X
|
||||||
; DOES NOT CHANGE X
|
; DOES NOT CHANGE X
|
||||||
tay
|
tay
|
||||||
lda PurchaseMeTable2,y
|
sta temp+1
|
||||||
|
:3 lsr ; A=A/8
|
||||||
|
sta temp
|
||||||
|
tya
|
||||||
|
and #%00000111
|
||||||
|
tay
|
||||||
|
lda bittable,y
|
||||||
|
ldy temp
|
||||||
|
and PurchaseMeTable2,y
|
||||||
beq TryToPurchaseOnePiece.SorryNoPurchase
|
beq TryToPurchaseOnePiece.SorryNoPurchase
|
||||||
jmp TryToPurchaseOnePiece.PurchaseIt
|
jmp TryToPurchaseOnePiece.PurchaseIt
|
||||||
.endp
|
.endp
|
||||||
@@ -868,9 +876,18 @@ PurchaseAIRoutines
|
|||||||
; TankNr in X
|
; TankNr in X
|
||||||
; DOES NOT CHANGE X
|
; DOES NOT CHANGE X
|
||||||
tay
|
tay
|
||||||
lda PurchaseMeTable,y
|
sta temp+1
|
||||||
|
:3 lsr ; A=A/8
|
||||||
|
sta temp
|
||||||
|
tya
|
||||||
|
and #%00000111
|
||||||
|
tay
|
||||||
|
lda bittable,y
|
||||||
|
ldy temp
|
||||||
|
and PurchaseMeTable,y
|
||||||
beq SorryNoPurchase
|
beq SorryNoPurchase
|
||||||
PurchaseIt
|
PurchaseIt
|
||||||
|
ldy temp+1
|
||||||
lda WeaponPriceL,y
|
lda WeaponPriceL,y
|
||||||
sta temp
|
sta temp
|
||||||
lda WeaponPriceH,y
|
lda WeaponPriceH,y
|
||||||
|
|||||||
+42
-128
@@ -503,137 +503,51 @@ WeaponUnits
|
|||||||
|
|
||||||
PurchaseMeTable ;weapons good to be purchased by the robot
|
PurchaseMeTable ;weapons good to be purchased by the robot
|
||||||
;the comment is an index in the tables
|
;the comment is an index in the tables
|
||||||
dta 1 ;"Baby Missile " ; 0
|
; "Baby Missile ","Missile ","Baby Nuke ","Nuke "
|
||||||
dta 1 ;"Missile " ; 1
|
; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head "
|
||||||
dta 1 ;"Baby Nuke " ; 2
|
.by %01111111
|
||||||
dta 1 ;"Nuke " ; 3
|
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
|
||||||
dta 1 ;"LeapFrog " ; 4
|
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
|
||||||
dta 1 ;"Funky Bomb " ; 5
|
.by %11001110
|
||||||
dta 1 ;"MIRV " ; 6
|
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger "
|
||||||
dta 1 ;"Death's Head " ; 7
|
; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
|
||||||
dta 1 ;"Napalm " ; 8
|
.by %00000000
|
||||||
dta 1 ;"Hot Napalm " ; 9
|
; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
|
||||||
dta 0 ;"Tracer " ; 10
|
; "Liquid Dirt ","Dirt Charge ","Earth Disrupter ","Plasma Blast "
|
||||||
dta 0 ;"Smoke Tracer " ; 11
|
.by %00000000
|
||||||
dta 1 ;"Baby Roller " ; 12
|
; "Laser "
|
||||||
dta 1 ;"Roller " ; 13
|
.by %00000000
|
||||||
dta 1 ;"Heavy Roller " ; 14
|
.by 0 ; offset to defensives
|
||||||
dta 0 ;"Riot Charge " ; 15
|
; "White Flag ","Battery ","Bal Guidance ","Horz Guidance "
|
||||||
dta 0 ;"Riot Blast " ; 16
|
; "Vert Guidance ","Lazy Boy ","Parachute ","Strong Parachute"
|
||||||
dta 0 ;"Riot Bomb " ; 17
|
.by %01000011
|
||||||
dta 0 ;"Heavy Riot Bomb " ; 18
|
; "Mag Deflector ","Shield ","Heavy Shield ","Force Shield "
|
||||||
dta 0 ;"Baby Digger " ; 19
|
; "Super Mag ","Auto Defense ","Fuel Tank ","Nuclear Winter "
|
||||||
dta 0 ;"Digger " ; 20
|
.by %11110100
|
||||||
dta 0 ;"Heavy Digger " ; 21
|
|
||||||
dta 0 ;"Baby Sandhog " ; 22
|
|
||||||
dta 0 ;"Sandhog " ; 23
|
|
||||||
dta 0 ;"Heavy Sandhog " ; 24
|
|
||||||
dta 0 ;"Dirt Clod " ; 25
|
|
||||||
dta 0 ;"Dirt Ball " ; 26
|
|
||||||
dta 0 ;"Ton of Dirt " ; 27
|
|
||||||
dta 0 ;"Liquid Dirt " ; 28
|
|
||||||
dta 0 ;"Dirt Charge " ; 29
|
|
||||||
dta 0 ;"Earth Disrupter " ; 30
|
|
||||||
dta 0 ;"Plasma Blast " ; 31
|
|
||||||
dta 0 ;"Laser " ; 32
|
|
||||||
dta 0 ;"----------------" ; 33
|
|
||||||
dta 0 ;"----------------" ; 34
|
|
||||||
dta 0 ;"----------------" ; 35
|
|
||||||
dta 0 ;"----------------" ; 36
|
|
||||||
dta 0 ;"----------------" ; 37
|
|
||||||
dta 0 ;"----------------" ; 38
|
|
||||||
dta 0 ;"----------------" ; 39
|
|
||||||
dta 0 ;"----------------" ; 40
|
|
||||||
dta 0 ;"----------------" ; 41
|
|
||||||
dta 0 ;"----------------" ; 42
|
|
||||||
dta 0 ;"----------------" ; 43
|
|
||||||
dta 0 ;"----------------" ; 44
|
|
||||||
dta 0 ;"----------------" ; 45
|
|
||||||
dta 0 ;"----------------" ; 46
|
|
||||||
dta 0 ;"----------------" ; 47
|
|
||||||
dta 0 ;"White Flag " ; 48
|
|
||||||
dta 1 ;"Battery " ; 49
|
|
||||||
dta 0 ;"Bal Guidance " ; 50
|
|
||||||
dta 0 ;"Horz Guidance " ; 51
|
|
||||||
dta 0 ;"Vert Guidance " ; 52
|
|
||||||
dta 0 ;"Lazy Boy " ; 53
|
|
||||||
dta 1 ;"Parachute " ; 54
|
|
||||||
dta 1 ;"Strong Parachute" ; 55
|
|
||||||
dta 1 ;"Mag Deflector " ; 56
|
|
||||||
dta 1 ;"Shield " ; 57
|
|
||||||
dta 1 ;"Heavy Shield " ; 58
|
|
||||||
dta 1 ;"Force Shield " ; 59
|
|
||||||
dta 0 ;"Super Mag " ; 60
|
|
||||||
dta 1 ;"Auto Defense " ; 61
|
|
||||||
dta 0 ;"Fuel Tank " ; 62
|
|
||||||
dta 0 ;"Nuclear Winter " ; 63
|
|
||||||
|
|
||||||
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
|
PurchaseMeTable2 ;weapons good to be purchased by the robot (Cyborg)
|
||||||
;the comment is an index in the tables
|
;the comment is an index in the tables
|
||||||
dta 1 ;"Baby Missile " ; 0
|
; "Baby Missile ","Missile ","Baby Nuke ","Nuke "
|
||||||
dta 0 ;"Missile " ; 1
|
; "LeapFrog ","Funky Bomb ","MIRV ","Death's Head "
|
||||||
dta 1 ;"Baby Nuke " ; 2
|
.by %00110001
|
||||||
dta 1 ;"Nuke " ; 3
|
; "Napalm ","Hot Napalm ","Tracer ","Smoke Tracer "
|
||||||
dta 0 ;"LeapFrog " ; 4
|
; "Baby Roller ","Roller ","Heavy Roller ","Riot Charge "
|
||||||
dta 0 ;"Funky Bomb " ; 5
|
.by %01000000
|
||||||
dta 0 ;"MIRV " ; 6
|
; "Riot Blast ","Riot Bomb ","Heavy Riot Bomb ","Baby Digger "
|
||||||
dta 1 ;"Death's Head " ; 7
|
; "Digger ","Heavy Digger ","Baby Sandhog ","Sandhog "
|
||||||
dta 0 ;"Napalm " ; 8
|
.by %00000000
|
||||||
dta 1 ;"Hot Napalm " ; 9
|
; "Heavy Sandhog ","Dirt Clod ","Dirt Ball ","Ton of Dirt "
|
||||||
dta 0 ;"Tracer " ; 10
|
; "Liquid Dirt ","Dirt Charge ","Earth Disrupter ","Plasma Blast "
|
||||||
dta 0 ;"Smoke Tracer " ; 11
|
.by %00000000
|
||||||
dta 0 ;"Baby Roller " ; 12
|
; "Laser "
|
||||||
dta 0 ;"Roller " ; 13
|
.by %00000000
|
||||||
dta 0 ;"Heavy Roller " ; 14
|
.by 0 ; offset to defensives
|
||||||
dta 0 ;"Riot Charge " ; 15
|
; "White Flag ","Battery ","Bal Guidance ","Horz Guidance "
|
||||||
dta 0 ;"Riot Blast " ; 16
|
; "Vert Guidance ","Lazy Boy ","Parachute ","Strong Parachute"
|
||||||
dta 0 ;"Riot Bomb " ; 17
|
.by %01000001
|
||||||
dta 0 ;"Heavy Riot Bomb " ; 18
|
; "Mag Deflector ","Shield ","Heavy Shield ","Force Shield "
|
||||||
dta 0 ;"Baby Digger " ; 19
|
; "Super Mag ","Auto Defense ","Fuel Tank ","Nuclear Winter "
|
||||||
dta 0 ;"Digger " ; 20
|
.by %10110100
|
||||||
dta 0 ;"Heavy Digger " ; 21
|
|
||||||
dta 0 ;"Baby Sandhog " ; 22
|
|
||||||
dta 0 ;"Sandhog " ; 23
|
|
||||||
dta 0 ;"Heavy Sandhog " ; 24
|
|
||||||
dta 0 ;"Dirt Clod " ; 25
|
|
||||||
dta 0 ;"Dirt Ball " ; 26
|
|
||||||
dta 0 ;"Ton of Dirt " ; 27
|
|
||||||
dta 0 ;"Liquid Dirt " ; 28
|
|
||||||
dta 0 ;"Dirt Charge " ; 29
|
|
||||||
dta 0 ;"Earth Disrupter " ; 30
|
|
||||||
dta 0 ;"Plasma Blast " ; 31
|
|
||||||
dta 0 ;"Laser " ; 32
|
|
||||||
dta 0 ;"----------------" ; 33
|
|
||||||
dta 0 ;"----------------" ; 34
|
|
||||||
dta 0 ;"----------------" ; 35
|
|
||||||
dta 0 ;"----------------" ; 36
|
|
||||||
dta 0 ;"----------------" ; 37
|
|
||||||
dta 0 ;"----------------" ; 38
|
|
||||||
dta 0 ;"----------------" ; 39
|
|
||||||
dta 0 ;"----------------" ; 40
|
|
||||||
dta 0 ;"----------------" ; 41
|
|
||||||
dta 0 ;"----------------" ; 42
|
|
||||||
dta 0 ;"----------------" ; 43
|
|
||||||
dta 0 ;"----------------" ; 44
|
|
||||||
dta 0 ;"----------------" ; 45
|
|
||||||
dta 0 ;"----------------" ; 46
|
|
||||||
dta 0 ;"----------------" ; 47
|
|
||||||
dta 0 ;"White Flag " ; 48
|
|
||||||
dta 1 ;"Battery " ; 49
|
|
||||||
dta 0 ;"Bal Guidance " ; 50
|
|
||||||
dta 0 ;"Horz Guidance " ; 51
|
|
||||||
dta 0 ;"Vert Guidance " ; 52
|
|
||||||
dta 0 ;"Lazy Boy " ; 53
|
|
||||||
dta 0 ;"Parachute " ; 54
|
|
||||||
dta 1 ;"Strong Parachute" ; 55
|
|
||||||
dta 1 ;"Mag Deflector " ; 56
|
|
||||||
dta 0 ;"Shield " ; 57
|
|
||||||
dta 1 ;"Heavy Shield " ; 58
|
|
||||||
dta 1 ;"Force Shield " ; 59
|
|
||||||
dta 0 ;"Super Mag " ; 60
|
|
||||||
dta 1 ;"Auto Defense " ; 61
|
|
||||||
dta 0 ;"Fuel Tank " ; 62
|
|
||||||
dta 0 ;"Nuclear Winter " ; 63
|
|
||||||
|
|
||||||
;-------------------------------------------------
|
;-------------------------------------------------
|
||||||
; Screen codes of icons (chars) representing a given weapon
|
; Screen codes of icons (chars) representing a given weapon
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user