IA code optimisation

and "better" shields shapes.
This commit is contained in:
Pecusx
2022-07-13 09:06:37 +02:00
parent 6868eb8626
commit 9ece051472
3 changed files with 14 additions and 16 deletions
+10 -12
View File
@@ -186,16 +186,15 @@ EnoughEnergy
beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable
beq @-
tya
; decrease in inventory
clc
sbc #1
sta (temp),y ; has address of TanksWeaponsTable
; activate defensive weapon
tya ; number of selectet defensive weapon
sta ActiveDefenceWeapon,x
lda DefensiveEnergy,y
sta ShieldEnergy,x
; decrease in inventory
clc
lda (temp),y
sbc #1
sta (temp),y ; has address of TanksWeaponsTable
NoUseDefensive
DefensiveInUse
firstShoot
@@ -300,16 +299,15 @@ AngleTable ; 16 bytes ;ba w $348b L$3350
beq NoUseDefensive
lda (temp),y ; has address of TanksWeaponsTable
beq @-
tya
; decrease in inventory
clc
sbc #1
sta (temp),y ; has address of TanksWeaponsTable
; activate defensive weapon
tya ; number of selectet defensive weapon
sta ActiveDefenceWeapon,x
lda DefensiveEnergy,y
sta ShieldEnergy,x
; decrease in inventory
clc
lda (temp),y
sbc #1
sta (temp),y
DefensiveInUse
NoUseDefensive
; Toosser is like Poolshark but allways uses defensives
+4 -4
View File
@@ -774,7 +774,7 @@ ShieldVisible
dec temp
bne @-
; draw left oblique line of shield ( / )
mva #4 temp
mva #3 temp
@
jsr plot
.nowarn dew ydraw
@@ -782,14 +782,14 @@ ShieldVisible
dec temp
bne @-
; draw top horizontal line of shield ( _ )
mva #5 temp
mva #7 temp
@
jsr plot
inw xdraw
dec temp
bne @-
; draw right oblique line of shield ( \ )
mva #4 temp
mva #3 temp
@
jsr plot
inw ydraw
@@ -831,7 +831,7 @@ ShieldVisible
; Symbol of ablative shield ? :)
;--------------------------------------------------
sbw xdraw #$04 ; 5 pixels left
sbw ydraw #$0a ; 10 pixels up
sbw ydraw #$0b ; 11 pixels up
; draw additional top horizontal line of shield ( _ )
mva #6 temp
@
BIN
View File
Binary file not shown.