Prev: E7CF Up: Map Next: E881
E863: Evaluate and Spawn Tracked Enemies
Used by the routine at Stage_Next_Wave.
Entry point called from Stage_Next_Wave. Reads the tracked enemy active count at C42C; if non-zero, jumps immediately to the spawn step at Evaluate_And_Spawn_Tracked_Enemies_Go. Otherwise checks C42D; if zero, also jumps to Evaluate_And_Spawn_Tracked_Enemies_Go. If C42D is non-zero, halves it twice: if the result is still non-zero, jumps to Evaluate_And_Spawn_Tracked_Enemies_Go; otherwise increments A to 01 and falls through to store the spawn count and call Spawn_Tracked_Enemy_Entities.
Evaluate_And_Spawn_Tracked_Enemies E863 LD A,($C42C) If the tracked enemy active count at C42C is non-zero, skip to Evaluate_And_Spawn_Tracked_Enemies_Go.
E866 AND A
E867 JP NZ,Evaluate_And_Spawn_Tracked_Enemies_Go
E86A LD A,($C42D)
E86D AND A If the set count at C42D is also zero, skip to Evaluate_And_Spawn_Tracked_Enemies_Go.
E86E JP Z,Evaluate_And_Spawn_Tracked_Enemies_Go
E871 SRL A Halve C42D twice; if the result is still non-zero, skip to Evaluate_And_Spawn_Tracked_Enemies_Go.
E873 SRL A
E875 JP NZ,Evaluate_And_Spawn_Tracked_Enemies_Go
E878 INC A Set spawn count to 1.
Evaluate_And_Spawn_Tracked_Enemies_Go E879 LD ($C42C),A Store the spawn count at C42C.
E87C CALL Spawn_Tracked_Enemy_Entities Call Spawn_Tracked_Enemy_Entities to spawn the tracked enemy wave and advance.
E87F INC HL
E880 RET
Prev: E7CF Up: Map Next: E881