Prev: F4D2 Up: Map Next: F4FF
F4D3: Room logic : Motor Way
Check the pipe is patched, and display the flame if not
F4D3 LD A,($BD7D) Is the pipe in the cave?
F4D6 CP $1D
F4D8 JR NZ,$F4E0 Jump forward if it isn't.
F4DA LD A,$05 Is flag 5 (pipe patched) set?
F4DC CALL $EC1D
F4DF RET NZ Return if it is.
The pipe is either leaking or not in the cave, so the gas leak means there's a fire here that needs drawing.
F4E0 LD HL,$A880 Set the location of the flame.
F4E3 LD ($A838),HL
F4E6 LD A,$04 Touching the flame (if it's there) drops endurance by 4.
F4E8 LD ($F26E),A
F4EB LD A,($F4D2) Get the current frame ID. (F4D2)
F4EE INC A Increment it.
F4EF CP $50 Does it equal 50?
F4F1 JR NZ,$F4F5 Skip the next bit if it doesn't.
F4F3 LD A,$4C Otherwise reset it back to 4C.
F4F5 LD ($F4D2),A Set the new frame ID.
F4F8 CALL $A83D Draw the object.
F4FB CALL $E329 Check for collision detection.
F4FE RET Return.
Prev: F4D2 Up: Map Next: F4FF