mirror of
https://github.com/pkali/scorch_src.git
synced 2026-05-20 22:34:21 +02:00
Small optimisation
This commit is contained in:
@@ -31,19 +31,19 @@ loop
|
|||||||
|
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
.proc ArtificialIntelligence ;
|
.proc ArtificialIntelligence ;
|
||||||
; A - skill of the TankNr
|
; A - skill of the TankNr (in X)
|
||||||
; returns shoot energy and angle in
|
; returns shoot energy and angle in
|
||||||
; ForceTable/L/H and AngleTable
|
; ForceTable/L/H and AngleTable
|
||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
asl
|
asl
|
||||||
tax
|
tay
|
||||||
:2 dex ;credit KK
|
:2 dey ;credit KK
|
||||||
lda AIRoutines+1,x
|
lda AIRoutines+1,y
|
||||||
pha
|
pha
|
||||||
lda AIRoutines,x
|
lda AIRoutines,y
|
||||||
pha
|
pha
|
||||||
|
|
||||||
ldx TankNr ; common values used in AI routines
|
; common values used in AI routines
|
||||||
; address of weapons table (for future use)
|
; address of weapons table (for future use)
|
||||||
lda TanksWeaponsTableL,x
|
lda TanksWeaponsTableL,x
|
||||||
sta temp
|
sta temp
|
||||||
|
|||||||
+1
-1
@@ -403,6 +403,7 @@ DoNotFinishTheRound
|
|||||||
|
|
||||||
RoboTanks
|
RoboTanks
|
||||||
; robotanks shoot here
|
; robotanks shoot here
|
||||||
|
; TankNr still in X
|
||||||
jsr ArtificialIntelligence
|
jsr ArtificialIntelligence
|
||||||
jsr PutTankNameOnScreen
|
jsr PutTankNameOnScreen
|
||||||
jsr DisplayStatus
|
jsr DisplayStatus
|
||||||
@@ -1146,7 +1147,6 @@ LimitForce
|
|||||||
;----------------------------------------------
|
;----------------------------------------------
|
||||||
.proc MoveBarrelToNewPosition
|
.proc MoveBarrelToNewPosition
|
||||||
jsr DrawTankNr
|
jsr DrawTankNr
|
||||||
ldx TankNr
|
|
||||||
jsr DisplayStatus.displayAngle
|
jsr DisplayStatus.displayAngle
|
||||||
ldx TankNr
|
ldx TankNr
|
||||||
lda NewAngle
|
lda NewAngle
|
||||||
|
|||||||
BIN
Binary file not shown.
Reference in New Issue
Block a user