Prev: 751C Up: Map Next: 7568
7542: Actor: Get Position/ Direction
Used by the routine at 74A5.
ActorFindPosDir 7542 LD A,($5E0B) A=actor X position.
7545 AND %00000110 Keep only bits 1-2.
7547 LD C,A Store the result in C.
7548 LD A,($5E0D) A=actor movement direction.
Actor: Get Sprite Address
ActorGetSpriteAddress 754B BIT 6,A Jump to ActorFindPosDir_0 if bit 6 of sprite header is reset.
754D JR Z,ActorFindPosDir_0
754F SET 3,C
ActorFindPosDir_0 7551 DEC A
7552 CP $03
7554 JR NC,$7568
7556 RLCA
7557 RLCA
7558 RLCA
7559 RLCA
755A AND %11110000 Keep only bits 4-7.
755C OR C
755D LD HL,$761A HL=SpritesTable.
This entry point is used by the routine at 7568.
ActorFindPosDir_1 7560 LD C,A Create an offset in BC.
7561 LD B,$00
7563 ADD HL,BC HL=sprite table + offset.
7564 LD E,(HL) DE=sprite address.
7565 INC HL
7566 LD D,(HL)
7567 RET Return.
Prev: 751C Up: Map Next: 7568