Prev: C784 Up: Map Next: C7A8
C789: Run Door Frame
The handler of the object types 07 and 09, which are the frames of the doors in the walls. They only have to be placed on the screen: the doors themselves are the object types 06 and 08, run by HandleNearArch.
Input
IX Object record
Choose the sprite offsets for this frame.
RunDoorFrame C789 BIT 6,(IX+$07) Jump to RunDoorFrame_Mirrored if the frame is mirrored.
C78D JR NZ,RunDoorFrame_Mirrored
C78F LD A,(IX+$00) Fetch the type.
C792 CP $09 Jump to RunDoorFrame_TypeNine if it is type 09.
C794 JR Z,RunDoorFrame_TypeNine
C796 LD HL,$FBF9 Set the offsets for type 07, which are F9 horizontally and FB vertically.
C799 JP StorePixelAdjustments Jump to StorePixelAdjustments to set them.
Use the offsets for a mirrored frame.
RunDoorFrame_Mirrored C79C LD HL,$FCF9 Set the offsets for a mirrored frame, which are F9 horizontally and FC vertically.
C79F JP StorePixelAdjustments Jump to StorePixelAdjustments to set them.
Use the offsets for type 09.
RunDoorFrame_TypeNine C7A2 LD HL,$FBF0 Set the offsets for type 09, which are F0 horizontally and FB vertically.
C7A5 JP StorePixelAdjustments Jump to StorePixelAdjustments to set them.
Prev: C784 Up: Map Next: C7A8