projects
/
gbrg
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
3b0d67b
)
act_sg: now saving type as well to prevent actors from rendering for a frame when...
author
Lukas Krickl
<lukas@krickl.dev>
Fri, 22 Aug 2025 16:00:30 +0000
(18:00 +0200)
committer
Lukas Krickl
<lukas@krickl.dev>
Fri, 22 Aug 2025 16:00:30 +0000
(18:00 +0200)
src/actsave.s
patch
|
blob
|
history
src/defs.s
patch
|
blob
|
history
diff --git
a/src/actsave.s
b/src/actsave.s
index edd6598ae0006a9f668305c5881eea88ca4ebf65..437f642171df08630fb1912c6f48894e0e331feb 100644
(file)
--- a/
src/actsave.s
+++ b/
src/actsave.s
@@
-28,7
+28,6
@@
act_sg_load_current_slot:
@done:
push hl
pop bc ; we want return value in bc
- BREAK
ret
@@
-60,6
+59,15
@@
act_sg_store:
; hl: next actor
; bc: next slot
act_sg_store_single:
+ ; store type
+ push hl
+ ld de, act_type
+ add hl, de
+ ld a, [hl]
+ ld [bc], a
+ inc bc
+ pop hl
+
push hl
; store flags
ld de, act_flags
@@
-146,6
+154,15
@@
act_sg_restore_single:
cp a, 0xFF
jp z, @skip ; skip if 0xFF
+ ; load type
+ push hl
+ ld de, act_type
+ add hl, de
+ ld a, [bc]
+ ld [hl], a
+ inc bc
+ pop hl
+
push hl
; load flags
ld de, act_flags
diff --git
a/src/defs.s
b/src/defs.s
index f2182dc0c00b89737c919cd38534bccc92e99c8d..8f78c52eeac3a3381be2ebbbb4e5cd09b7bcccff 100644
(file)
--- a/
src/defs.s
+++ b/
src/defs.s
@@
-250,6
+250,7
@@
; if pos y and x is 0xFF
; it is not restored
.se 0
+.de act_sg_type, 1
.de act_sg_flags, 1
.de act_sg_pos_y, 1
.de act_sg_pos_x, 1