mirror of
https://github.com/lscharen/iigs-game-engine.git
synced 2025-02-19 13:30:30 +00:00
Fix bcc/bcs typo when initializing timers
This commit is contained in:
parent
87ded17e20
commit
4006f76c02
@ -36,6 +36,9 @@ DoTimers EXT
|
|||||||
StartScript EXT
|
StartScript EXT
|
||||||
StopScript EXT
|
StopScript EXT
|
||||||
|
|
||||||
|
; Direct access to internals
|
||||||
|
DoScriptSeq EXT
|
||||||
|
|
||||||
; Allocate a full 64K bank
|
; Allocate a full 64K bank
|
||||||
AllocBank EXT
|
AllocBank EXT
|
||||||
|
|
||||||
@ -45,7 +48,3 @@ AllocBank EXT
|
|||||||
ScreenAddr EXT
|
ScreenAddr EXT
|
||||||
OneSecondCounter EXT
|
OneSecondCounter EXT
|
||||||
BlitBuff EXT
|
BlitBuff EXT
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
13
src/Script.s
13
src/Script.s
@ -69,6 +69,14 @@ ARG1 equ 2
|
|||||||
ARG2 equ 4
|
ARG2 equ 4
|
||||||
ARG3 equ 6
|
ARG3 equ 6
|
||||||
|
|
||||||
|
DoScriptSeq ENT
|
||||||
|
phb
|
||||||
|
phk
|
||||||
|
plb
|
||||||
|
jsl _DoScriptSeq ; Yes, this is a special JSL, because _DoScriptSeq is a time callback
|
||||||
|
plb
|
||||||
|
rtl
|
||||||
|
|
||||||
_DoScriptSeq
|
_DoScriptSeq
|
||||||
phx ; save the timer index; will need to update user data at the end
|
phx ; save the timer index; will need to update user data at the end
|
||||||
phb ; save the current data bank
|
phb ; save the current data bank
|
||||||
@ -178,8 +186,3 @@ _UserCallback
|
|||||||
lda: ARG3,y
|
lda: ARG3,y
|
||||||
:dispatch jsl $000000
|
:dispatch jsl $000000
|
||||||
brl _dss_cmd_rtn
|
brl _dss_cmd_rtn
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
64
src/Timer.s
64
src/Timer.s
@ -101,7 +101,7 @@ AddTimer ENT
|
|||||||
stz Timers+14,x ; Clear the user data space
|
stz Timers+14,x ; Clear the user data space
|
||||||
|
|
||||||
plp
|
plp
|
||||||
bcc :oneshot
|
bcs :oneshot
|
||||||
lda Timers+0,x ; if not a one-shot, put the counter
|
lda Timers+0,x ; if not a one-shot, put the counter
|
||||||
sta Timers+2,x ; value into the reset field
|
sta Timers+2,x ; value into the reset field
|
||||||
|
|
||||||
@ -147,6 +147,7 @@ DoTimers ENT
|
|||||||
plb
|
plb
|
||||||
|
|
||||||
jsr _GetVBLTicks
|
jsr _GetVBLTicks
|
||||||
|
|
||||||
cmp lastTick ; Throttle to 60 fps
|
cmp lastTick ; Throttle to 60 fps
|
||||||
beq :exit
|
beq :exit
|
||||||
tax ; Calculate the increment
|
tax ; Calculate the increment
|
||||||
@ -212,64 +213,3 @@ _DoTimers
|
|||||||
|
|
||||||
pla
|
pla
|
||||||
rts
|
rts
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user