aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAstatin <[email protected]>2025-03-19 17:31:51 +0900
committerAstatin <[email protected]>2025-03-19 17:31:51 +0900
commit2df3daa5128a27381fe5208fa4eac59ab10bdd9c (patch)
treeebfba43be7a310806b83433dc1816c49ada92a80
parent22f57d7e37626b81c045d7b9090dec47d3784bcc (diff)
Fix infinite loop on respawn enemy
-rw-r--r--entity/init.gbasm4
-rw-r--r--rng.gbasm6
2 files changed, 4 insertions, 6 deletions
diff --git a/entity/init.gbasm b/entity/init.gbasm
index ce9294f..4351265 100644
--- a/entity/init.gbasm
+++ b/entity/init.gbasm
@@ -167,7 +167,6 @@ Initialize_Entity: ; HL => pointer to entity struct, A => entity loaded index, 1
JR C, =Initialize_Enemy.Room_restriction.end
DEC A
- LD A, E
JR =Initialize_Enemy.Room_restriction.end
Initialize_Enemy.All_rooms_allowed:
@@ -225,7 +224,8 @@ Initialize_Entity: ; HL => pointer to entity struct, A => entity loaded index, 1
LD A, $tmp_var_3
CP $01
- RET Z
+
+ RET NZ
LD A, E
JP =Initialize_Entity
diff --git a/rng.gbasm b/rng.gbasm
index e2c30ae..8867c56 100644
--- a/rng.gbasm
+++ b/rng.gbasm
@@ -60,13 +60,11 @@ RNG_Step:
LD A, D
LD $mem_rng_state_1, A
- LD A, $mem_loop_frame_timer
- LD D, A
-
LD A, E
LD $mem_rng_state_2, A
- XOR D
+ LD A, $mem_loop_frame_timer
+ XOR E
POP DE
POP BC