Routines |
Prev: 57721 | Up: Map | Next: 58005 |
Used by the routine at RunHandlers.
|
||||
Handler_Humans | 57949 | LD B,16 | B=16 (maximum possible number of on-screen humans). | |
57951 | XOR A | Write 0 to *Flag_Orientation. | ||
57952 | LD (53831),A | |||
57955 | LD HL,53845 | 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 | 57958 | PUSH BC | Stash the countdown on the stack. | |
57959 | LD A,(HL) | A=human type. | ||
57960 | INC HL | Increment human table pointer by one. | ||
57961 | AND A | Jump to Handler_Humans_Skip if the currently processed human is not in-use. | ||
57962 | JP Z,Handler_Humans_Skip | |||
57965 | EX AF,AF' | Exchange the AF register with the shadow AF register. | ||
57966 | PUSH HL | Stash the human table pointer on the stack. | ||
Fetch the humans screen co-ordinates and store them in BC.
|
||||
57967 | INC HL | Increment human table pointer by one. | ||
57968 | LD C,(HL) | C=*HL. | ||
57969 | INC HL | Increment human table pointer by one. | ||
57970 | LD B,(HL) | B=*HL. | ||
57971 | LD DE,264 | DE=264 (TODO; probably sprite size 1 byte by 8 lines). | ||
57974 | CALL 57551 | Call 57551. | ||
57977 | 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.
|
||||
57979 | POP HL | Restore human table pointer from the stack. | ||
57980 | DEC HL | Decrease the human table pointer by one (back to the "type"). | ||
57981 | XOR A | Mark this human as no longer in-use. | ||
57982 | LD (HL),A | |||
57983 | INC HL | Move the human table pointer to the next human. | ||
57984 | INC HL | |||
57985 | INC HL | |||
57986 | INC HL | |||
57987 | 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 | 57990 | EX AF,AF' | Exchange the AF register with the shadow AF register. | |
57991 | DEC A | Decrease A by one. | ||
57992 | ADD A,A | A*=2. | ||
57993 | LD D,0 | Create an offset using DE. | ||
57995 | LD E,A | |||
57996 | LD HL,58710 | HL=Table_HumanTypes+DE. | ||
57999 | ADD HL,DE | |||
58000 | LD A,(HL) | A=*HL. | ||
58001 | INC HL | Increment HL by one. | ||
58002 | LD H,(HL) | H=*HL. | ||
58003 | LD L,A | L=A. | ||
58004 | JP (HL) | Jump to *HL. |
Prev: 57721 | Up: Map | Next: 58005 |