Prev: E179 Up: Map Next: E295
E25D: Handler: Humans
Used by the routine at RunHandlers.
Handler_Humans E25D LD B,$10 B=10 (maximum possible number of on-screen humans).
E25F XOR A Write 00 to *Flag_Orientation.
E260 LD ($D247),A
E263 LD HL,$D255 HL=Table_Humans.
This entry point is used by the routines at Human_Hiding, Human_Reappearing, Handler_Human_Hide and Handler_Humans_Skip.
Handler_Humans_Loop E266 PUSH BC Stash the countdown on the stack.
E267 LD A,(HL) A=human type.
E268 INC HL Increment human table pointer by one.
E269 AND A Jump to Handler_Humans_Skip if the currently processed human is not in-use.
E26A JP Z,Handler_Humans_Skip
E26D EX AF,AF' Exchange the AF register with the shadow AF register.
E26E PUSH HL Stash the human table pointer on the stack.
Fetch the humans screen co-ordinates and store them in BC.
E26F INC HL Increment human table pointer by one.
E270 LD C,(HL) C=*HL.
E271 INC HL Increment human table pointer by one.
E272 LD B,(HL) B=*HL.
E273 LD DE,$0108 DE=0108 (TODO; probably sprite size 01 byte by 08 lines).
E276 CALL $E0CF Call E0CF.
E279 JR NZ,Controller_Humans Jump to Controller_Humans if this human is able to be processed (as in, is alive).
This human is no more (RIP) mark this position as no longer viable for holding human data.
E27B POP HL Restore human table pointer from the stack.
E27C DEC HL Decrease the human table pointer by one (back to the "type").
E27D XOR A Mark this human as no longer in-use.
E27E LD (HL),A
E27F INC HL Move the human table pointer to the next human.
E280 INC HL
E281 INC HL
E282 INC HL
E283 JP Handler_Humans_Next Jump to Handler_Humans_Next.
Convert the human type to an address from Table_HumanTypes and jump to it.
Controller_Humans E286 EX AF,AF' Exchange the AF register with the shadow AF register.
E287 DEC A Decrease A by one.
E288 ADD A,A A*=02.
E289 LD D,$00 Create an offset using DE.
E28B LD E,A
E28C LD HL,$E556 HL=Table_HumanTypes+DE.
E28F ADD HL,DE
E290 LD A,(HL) A=*HL.
E291 INC HL Increment HL by one.
E292 LD H,(HL) H=*HL.
E293 LD L,A L=A.
E294 JP (HL) Jump to *HL.
Prev: E179 Up: Map Next: E295