Prev: E0A9 Up: Map Next: E117
E0E8: Move Distant Bubble
Used by the routine at Handle_Bubble.
Moves a bubble that is not in the room that Sabreman is in. The bubble rises by two pixels each time. The countdown in byte 0A removes the bubble when it reaches zero. A bubble in a room with a ceiling is removed when it reaches the ceiling. A bubble in a room with no ceiling moves into the room above when it reaches the top.
Input
IX Object record
Move_Distant_Bubble E0E8 DEC (IX+$0A) Decrease the countdown and jump to Remove_Unseen_Weapon to remove the bubble when it reaches zero.
E0EB JP Z,Remove_Unseen_Weapon
E0EE SET 0,(IX+$0F) Set bit 0 of the redraw flags, as the bubble is not on the screen.
E0F2 LD A,(IX+$03) Fetch the y position.
E0F5 SUB $02 Subtract two.
E0F7 LD (IX+$03),A Store the y position.
E0FA BIT 0,(IX+$0B) Jump to Move_Distant_Bubble_No_Ceiling if the room had no ceiling.
E0FE JR Z,Move_Distant_Bubble_No_Ceiling
E100 CP $42 Remove the bubble if the y position is less than 42.
E102 JP C,Remove_Unseen_Weapon
E105 RET Return.
Move_Distant_Bubble_No_Ceiling E106 CP $22 Return if the y position is 22 or more.
E108 RET NC
E109 LD (IX+$03),$BF Set the y position to BF.
E10D DEC (IX+$04) Move the bubble to the room above.
E110 CALL Read_World_Map Read the world map entry of the room that the bubble is in now.
E113 LD (IX+$0B),E Store the flags of the room in the contact flags.
E116 RET Return.
Prev: E0A9 Up: Map Next: E117