Prev: F31C Up: Map Next: F3CA
F352: Routine at F352
Used by the routines at Handler_JumpPunch, ED31 and EDC2.
F352 CALL Monster_CalculatePosition Call Monster_CalculatePosition.
F355 LD HL,($D224) HL=*D224.
F358 LD (HL),B Write B to *HL.
F359 INC HL Increment HL by one.
F35A LD (HL),C Write C to *HL.
F35B INC HL Increment HL by one.
F35C LD A,($D246) A=*Flag_MonsterClimbing.
F35F LD (HL),A Write A to *HL.
F360 INC HL Increment HL by one.
F361 LD A,($D248) A=*Flag_MonsterJumping.
F364 LD (HL),A Write A to *HL.
F365 INC HL Increment HL by one.
F366 LD A,($D244) A=*JumpTable_Pointer.
F369 LD (HL),A Write A to *HL.
F36A INC HL Increment HL by one.
F36B LD A,($D247) A=*Flag_Orientation.
F36E LD (HL),A Write A to *HL.
F36F INC HL Increment HL by one.
F370 LD ($D224),HL Write HL to *D224.
This entry point is used by the routines at F3EF and F41A.
F373 CALL GetSpriteID Call GetSpriteID.
F376 LD B,A B=A.
F377 LD C,$00 C=00.
F379 LD A,(HL) A=*HL.
F37A CP $C1 Jump to F38B if A is higher than C1.
F37C JR NC,$F38B
F37E AND %00111111 Keep only bits 0-5.
F380 CP $32 Jump to F38B if A is higher than 32.
F382 JR NC,$F38B
F384 LD A,(HL) A=*HL.
F385 AND %11000000 Keep only bits 6-7.
F387 RLCA Rotate A left two positions (bits 6 to 7 are now in positions 0 to 1).
F388 RLCA
F389 INC A Increment A by one.
F38A LD C,A C=A.
F38B CALL $F3AF Call F3AF.
F38E INC HL Increment HL by one.
F38F CALL $F3AF Call F3AF.
F392 LD E,$1F E=1F.
F394 ADD HL,DE HL+=DE.
F395 CALL $F3AF Call F3AF.
F398 INC HL Increment HL by one.
F399 CALL $F3AF Call F3AF.
F39C LD A,($D3FB) Return if *D3FB is not zero.
F39F AND A
F3A0 RET NZ
F3A1 LD HL,($D226) HL=*D226.
F3A4 LD (HL),B Write B to *HL.
F3A5 INC HL Increment HL by one.
F3A6 LD ($D226),HL Write HL to *D226.
F3A9 LD A,$01 Write 01 to *D218.
F3AB LD ($D218),A
F3AE RET Return.
F3AF LD A,(HL) Jump to F3C5 if *HL is zero.
F3B0 AND A
F3B1 JR Z,$F3C5
F3B3 CP $FF Jump to F3C5 if A is equal to FF.
F3B5 JR Z,$F3C5
F3B7 CP B Return if A is equal to B.
F3B8 RET Z
F3B9 LD A,C Jump to F3C5 if C is zero.
F3BA AND A
F3BB JR Z,$F3C5
F3BD LD A,(HL) A=*HL.
F3BE AND %11000000 Keep only bits 6-7.
F3C0 RLCA Rotate A left two positions (bits 6 to 7 are now in positions 0 to 1).
F3C1 RLCA
F3C2 INC A Increment A by one.
F3C3 CP C Return if A is equal to C.
F3C4 RET Z
F3C5 POP DE Restore DE from the stack.
F3C6 LD B,$00 B=00.
F3C8 JR $F39C Jump to F39C.
Prev: F31C Up: Map Next: F3CA