summaryrefslogtreecommitdiff
path: root/engine/overworld/time.asm
diff options
context:
space:
mode:
Diffstat (limited to 'engine/overworld/time.asm')
-rw-r--r--engine/overworld/time.asm14
1 files changed, 14 insertions, 0 deletions
diff --git a/engine/overworld/time.asm b/engine/overworld/time.asm
index da6d6745a..86807119d 100644
--- a/engine/overworld/time.asm
+++ b/engine/overworld/time.asm
@@ -25,6 +25,20 @@ NextCallReceiveDelay:
ld hl, .ReceiveCallDelays
add hl, de
ld a, [hl]
+if DEF(_DEBUG)
+ ld h, a
+ ld a, BANK(sDebugTimeCyclesSinceLastCall)
+ call OpenSRAM
+ ld a, [sDebugTimeCyclesSinceLastCall]
+ call CloseSRAM
+ dec a
+ cp 2
+ jr nc, .debug_ok
+ xor 1
+ ld h, a
+.debug_ok
+ ld a, h
+endc
jp RestartReceiveCallDelay
.ReceiveCallDelays: