Prev: 57513 Up: Map Next: 57623
57576: 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 10 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 57576 DEC (IX+10) Decrease the countdown and jump to Remove_Unseen_Weapon to remove the bubble when it reaches zero.
57579 JP Z,Remove_Unseen_Weapon
57582 SET 0,(IX+15) Set bit 0 of the redraw flags, as the bubble is not on the screen.
57586 LD A,(IX+3) Fetch the y position.
57589 SUB 2 Subtract two.
57591 LD (IX+3),A Store the y position.
57594 BIT 0,(IX+11) Jump to Move_Distant_Bubble_No_Ceiling if the room had no ceiling.
57598 JR Z,Move_Distant_Bubble_No_Ceiling
57600 CP 66 Remove the bubble if the y position is less than 66.
57602 JP C,Remove_Unseen_Weapon
57605 RET Return.
Move_Distant_Bubble_No_Ceiling 57606 CP 34 Return if the y position is 34 or more.
57608 RET NC
57609 LD (IX+3),191 Set the y position to 191.
57613 DEC (IX+4) Move the bubble to the room above.
57616 CALL Read_World_Map Read the world map entry of the room that the bubble is in now.
57619 LD (IX+11),E Store the flags of the room in the contact flags.
57622 RET Return.
Prev: 57513 Up: Map Next: 57623