mirror of
https://github.com/Pecusx/scorch_src.git
synced 2026-05-20 22:33:43 +02:00
Shooter optimization
This commit is contained in:
@@ -127,24 +127,27 @@ shootingLeftAtThisMomentOfTime
|
|||||||
|
|
||||||
firstShoot
|
firstShoot
|
||||||
; compare the x position with the middle of the screen
|
; compare the x position with the middle of the screen
|
||||||
lda xTanksTableH,x
|
lda LowResDistances,x
|
||||||
cmp #>(screenwidth/2)
|
cmp #(screenwidth/8) ; screenwidth/2 but LowResDistances are already /4
|
||||||
bne @+
|
|
||||||
lda xTanksTableL,x
|
|
||||||
cmp #<(screenwidth/2)
|
|
||||||
@ bcc tankIsOnTheRight
|
@ bcc tankIsOnTheRight
|
||||||
|
|
||||||
; enemy tank is on the left
|
; enemy tank is on the left
|
||||||
randomize 95 125
|
;randomize 95 125
|
||||||
|
lda RANDOM ; Shorter an faster randomize
|
||||||
|
and #%00011111 ; 0 - 31
|
||||||
|
adc #95 ; Carry doesn't matter :)
|
||||||
sta NewAngle
|
sta NewAngle
|
||||||
bne forceNow
|
bne forceNow
|
||||||
|
|
||||||
tankIsOnTheRight
|
tankIsOnTheRight
|
||||||
randomize 55 85
|
;randomize 55 85
|
||||||
|
lda RANDOM ; Shorter an faster randomize
|
||||||
|
and #%00011111 ; 0 - 31
|
||||||
|
adc #54 ; Carry doesn't matter :)
|
||||||
sta NewAngle
|
sta NewAngle
|
||||||
|
|
||||||
forceNow
|
forceNow
|
||||||
mwa #100 RandBoundaryLow
|
mwa #200 RandBoundaryLow
|
||||||
mwa #800 RandBoundaryHigh
|
mwa #800 RandBoundaryHigh
|
||||||
;ldx TankNr ;this is possibly not necessary
|
;ldx TankNr ;this is possibly not necessary
|
||||||
jsr RandomizeForce
|
jsr RandomizeForce
|
||||||
|
|||||||
BIN
Binary file not shown.
BIN
Binary file not shown.
Reference in New Issue
Block a user