Prev: A63F Up: Map Next: A8A9
A64B: Handle all actors.
Used by the routine at Stage_Draw.
Input
Output
People_Main A64B XOR A
A64C LD ($A637),A
A64F LD IX,Ptr_PersonLinkList Get address to the start of person data link list.
People_Main_0 A653 LD L,(IX+$00) Get address of next node in list.
A656 LD H,(IX+$01)
A659 LD A,L Check for end of list.
A65A OR H
A65B JP Z,People_Main_19
A65E LD (Actor_CurrentPtr),HL Store address and..
A661 CALL Person_MoveForward
A664 LD IX,(Actor_CurrentPtr) Get node address back.
A668 LD HL,(Hero_PathPtr) Check to see on the same path as the player.
A66B LD E,(IX+$11)
A66E LD D,(IX+$12)
A671 AND A
A672 SBC HL,DE
A674 JR Z,People_Main_2
Next person.
People_Main_1 A676 LD (IX+$17),$00 Not near enough, clear action flag.
A67A JR People_Main_0
People_Main_2 A67C LD A,(Room_CurrentIndex)
A67F CP (IX+$18)
A682 JR NZ,People_Main_1
A684 LD A,(Camera_Compass) Based on compass, get the coords of both player and person along the path axis.
A687 BIT 0,A
A689 JR NZ,People_Main_3
A68B LD HL,(Coords_EW)
A68E LD E,(IX+$07)
A691 LD D,(IX+$08)
A694 JR People_Main_4
People_Main_3 A696 LD HL,(Coords_NS)
A699 LD E,(IX+$05)
A69C LD D,(IX+$06)
People_Main_4 A69F BIT 1,A
A6A1 JR NZ,People_Main_5
A6A3 EX DE,HL
People_Main_5 A6A4 LD (TempAl),HL Store players position.
A6A7 CALL sub_abs Get difference between the two.
A6AA LD A,H If difference is larger than $FF, go onto next person in list.
A6AB AND A
A6AC JR NZ,People_Main_1
A6AE LD C,$22
A6B0 BIT 4,(IX+$13)
A6B4 JR NZ,People_Main_6
A6B6 LD A,(IX+$0B)
A6B9 CP (IX+$04)
A6BC JR Z,People_Main_6
A6BE LD C,$24
People_Main_6 A6C0 LD A,L
A6C1 CP C
A6C2 JR NC,People_Main_1
A6C4 LD A,(Skar_ShowCount)
A6C7 AND A
A6C8 JP NZ,People_Main_11
A6CB LD A,L
A6CC CP $0C
A6CE JP NC,People_Main_10
A6D1 LD (TempBl),A
A6D4 LD A,(IX+$0E)
A6D7 CP $02
A6D9 JR NZ,People_Main_7
A6DB LD HL,(Inv_Pocket1)
A6DE LD A,(Inv_Pocket3)
A6E1 OR L
A6E2 OR H
A6E3 JP P,People_Main_7
A6E6 LD A,(IX+$16)
A6E9 LD HL,$A630
A6EC LD BC,$0005
A6EF CPIR
A6F1 JR NZ,People_Main_7
A6F3 LD A,$01
A6F5 LD (Hero_ArrestCount),A
A6F8 LD A,$0C
A6FA JR People_Main_8
People_Main_7 A6FC CALL Person_Greet
A6FF LD A,(Offer_Count)
A702 AND A
A703 JR Z,People_Main_9
A705 LD HL,(Bg_ItemTableMid)
A708 LD A,H
A709 OR L
A70A BIT 4,A
A70C JR NZ,People_Main_10
A70E LD HL,(Offer_PersonPtr)
A711 LD A,L
A712 OR H
A713 JR NZ,People_Main_10
A715 LD A,(IX+$16)
A718 LD HL,$A630
A71B LD BC,$0007
A71E CPIR
A720 JR NZ,People_Main_10
A722 LD (Offer_PersonPtr),IX
A726 BIT 6,(IX+$13)
A72A JR NZ,People_Main_10
A72C LD BC,$0002
A72F LD HL,$A635
A732 CPIR
A734 LD A,$0E
A736 JR Z,People_Main_8
A738 LD A,$0C
People_Main_8 A73A LD (IX+$16),A
A73D XOR A
A73E LD (IX+$0A),A
A741 LD (IX+$15),A
A744 LD (IX+$14),A
A747 LD (IX+$0D),A
A74A JR People_Main_10
People_Main_9 A74C BIT 3,(IX+$13)
A750 CALL NZ,Thief_TryToSteal
People_Main_10 A753 BIT 0,(IX+$13)
A757 JP NZ,People_Main_0
People_Main_11 A75A LD A,$39
A75C BIT 4,(IX+$13)
A760 JP NZ,People_Main_14
A763 LD HL,(TempAl)
A766 AND A
A767 SBC HL,DE
A769 LD DE,$001E
A76C AND A
A76D ADC HL,DE
A76F JP M,People_Main_12
A772 RES 0,L
A774 LD DE,$003D
A777 AND A
A778 SBC HL,DE
A77A JR NC,People_Main_12
A77C ADD HL,DE
A77D ADD HL,HL
A77E ADD HL,HL
A77F LD C,L
A780 LD B,$80
A782 PUSH IX
A784 PUSH BC
A785 LD HL,$A637
A788 INC (HL)
People_Main_12 A789 LD A,(IX+$0B)
A78C CP $3C
A78E JR C,People_Main_13
A790 SUB $14
People_Main_13 A792 LD E,A
A793 LD D,$00
A795 LD HL,$A5FA
A798 ADD HL,DE
A799 LD A,(HL)
People_Main_14 A79A LD (IX+$0C),A
A79D LD A,(Camera_Compass)
A7A0 SUB (IX+$02)
A7A3 BIT 0,A
A7A5 JR Z,People_Main_16
A7A7 RRCA
A7A8 RRCA
A7A9 PUSH AF
A7AA LD L,(IX+$0B)
A7AD CALL Bitmap_CopyFrame
A7B0 POP AF
A7B1 PUSH AF
A7B2 XOR (HL)
A7B3 JP M,People_Main_15
A7B6 LD L,(IX+$0B)
A7B9 CALL Bitmap_Reverse
People_Main_15 A7BC LD L,(IX+$0C)
A7BF CALL Bitmap_CopyFrame
A7C2 POP AF
A7C3 XOR (HL)
A7C4 JP M,People_Main_16
A7C7 LD L,(IX+$0C)
A7CA CALL Bitmap_Reverse
People_Main_16 A7CD LD A,$11
A7CF LD HL,Camera_Compass
A7D2 BIT 1,(HL)
A7D4 JR Z,People_Main_17
A7D6 LD A,$13
People_Main_17 A7D8 BIT 4,(IX+$13)
A7DC JR Z,People_Main_18
A7DE ADD A,$28
People_Main_18 A7E0 LD (IX+$09),A
A7E3 XOR A
A7E4 CALL ObjNode_BlitShft
A7E7 JP People_Main_0
People_Main_19 A7EA LD HL,CharPtr_Current
A7ED LD DE,_a638
A7F0 LD BC,$0004
A7F3 LDIR
A7F5 LD HL,TempStore
A7F8 LD BC,$0004
A7FB LDIR
A7FD LD HL,$5A00
A800 LD DE,$5A01
A803 LD BC,$003F
A806 LD (HL),$00
A808 LDIR
A80A LD A,($A637)
People_Main_20 A80D AND A
A80E JR Z,People_Main_21
A810 POP BC
A811 LD HL,($A63E)
A814 LD (CharPtr_Current),HL
A817 POP IX
A819 LD ($A63E),IX
A81D PUSH AF
A81E PUSH BC
Draw a symbol
A81F LD A,(IX+$25) Get the first letter in the character's name.
A822 AND $DF Make sure it is within the range of the ASCII letters.
A824 LD HL,($BEDC) Get the address of the bitmap for the badge sprite from its bitmap information.
A827 LD DE,$0008 Create an offset, this is within the bitmap and is where the letter is drawn to.
A82A LD BC,$0002
A82D CALL Char_BlitToMemory Blit the letter into the middle of the badge.
A830 POP BC
Draw identity badge for character.
A831 LD E,(IX+$0E) Get index for person type.
A834 LD D,$00 Use as an offset to get the colour to use from the badge colour table.
A836 LD HL,Table_BadgeCols
A839 ADD HL,DE
A83A LD A,(HL)
A83B LD L,$D4 Index for the information on the badge.
A83D CALL Bmp_BlitAtCharPos
A840 POP AF
A841 DEC A
A842 JR People_Main_20
People_Main_21 A844 LD B,$04
A846 LD IX,_a638
People_Main_22 A84A LD A,(IX+$00)
A84D CP (IX+$04)
A850 JR NZ,People_Main_23
A852 INC IX
A854 DJNZ People_Main_22
A856 RET
Print names of characters visible on screen.
People_Main_23 A857 LD A,$01 Set channel 1 for output stream.
A859 CALL $1601
A85C LD DE,$5A76 Colour name displayed on screen using the values in the temporary store.
A85F LD HL,TempStore
A862 LD BC,$0004
A865 LDIR
A867 LD DE,$5A96 Do same for next line down.
A86A LD BC,$0004
A86D LDIR
A86F CALL Print_StrFromStack PRINT PAPER BLACK, INK WHITE, BRIGHT ON
A872 DEFB $11
A873 DEFB $00
A874 DEFB $10
A875 DEFB $07
A876 DEFB $13
A877 DEFB $01
A878 DEFB $5E
A879 LD IX,CharPtr_Current Table of pointers to characters on screen.
A87D LD B,$02 Limited to two other characters on screen.
People_Main_24 A87F PUSH BC
A880 LD L,(IX+$00) Get address of character
A883 LD H,(IX+$01)
A886 LD A,L
A887 OR H
A888 JR Z,People_Main_26
A88A LD A,$16 PRINT AT (B+2), 16
A88C RST $10
A88D LD A,B
A88E ADD A,$02
A890 RST $10
A891 LD A,$16
A893 RST $10
A894 LD DE,$0025 Get address of name from character's data and display it.
A897 ADD HL,DE
A898 LD B,$04
People_Main_25 A89A LD A,(HL)
A89B CALL Print_SelectChar
A89E INC HL
A89F DJNZ People_Main_25
People_Main_26 A8A1 POP BC
A8A2 INC IX
A8A4 INC IX
A8A6 DJNZ People_Main_24
A8A8 RET
Prev: A63F Up: Map Next: A8A9