For this a new special flag to pause update was added.
This pause needs to be handeled in update routines.
This is done to keep rendering some objects while not processing gameplay code.
; gameplay flags
.se 1
+ ; if this is set units do not update
+ ; but draw calls still happen
+ ; this is useful when waiting for an animation
+.de GPF_PAUSE_UPDATE, 1
; cell flags
.se 1
ld a, 0x40
ld [de], a
+ ; set gameplay flag to pause object updates
+ ld a, [gameplay_flags]
+ or a, GPF_PAUSE_UPDATE
+ ld [gameplay_flags], a
+
ret
; state function for door opening animation
ldnull bc
ret
-@timer_done:
+@timer_done:
ld bc, st_null
+
+ ; unset pause object update
+ ld a, [gameplay_flags]
+ and a, ~GPF_PAUSE_UPDATE & 0xFF
+ ld [gameplay_flags], a
ret
#undefine TMP_X
#undefine TMP_Y
push hl
push hl
pop de ; need hl in de for parameter
- call st_update
+ ld a, [gameplay_flags]
+ and a, GPF_PAUSE_UPDATE
+ call z, st_update
pop hl