![]() |
Routines |
| Prev: 43764 | Up: Map | Next: 43860 |
|
Used by the routine at Update_Rope.
Makes the rope shorter by two, which raises Sabreman. The length never gets below 32.
When the length falls to a multiple of 128 he is at the top of the room. The length is then made shorter by two more, the second byte of the world map entry of the room is cleared, Sabreman moves up to the room above and the room is drawn.
|
||||||||||||
| Raise_Rope | 43824 | PUSH AF | Keep the controls on the stack. | |||||||||
| 43825 | LD A,H | Copy the high byte of the length to A. | ||||||||||
| 43826 | AND A | Jump to Raise_Rope_Shorten if the length is more than 255. | ||||||||||
| 43827 | JR NZ,Raise_Rope_Shorten | |||||||||||
| 43829 | LD A,L | Copy the low byte of the length to A. | ||||||||||
| 43830 | CP 32 | Jump to Lower_Rope_Store_Length if the rope is already at its shortest (the length is less than 32). | ||||||||||
| 43832 | JR C,Lower_Rope_Store_Length | |||||||||||
| Raise_Rope_Shorten | 43834 | DEC HL | Make the length of the rope shorter by two. | |||||||||
| 43835 | DEC HL | |||||||||||
| 43836 | LD A,L | Copy the low byte of the length to A. | ||||||||||
| 43837 | AND %01111110 | Keep only bits 1 to 6. | ||||||||||
| 43839 | JR NZ,Lower_Rope_Store_Length | Jump to Lower_Rope_Store_Length if the rope has not reached the top of the room (the length is not a multiple of 128). | ||||||||||
| 43841 | DEC HL | Make the length shorter by two, to raise the rope into the room above. | ||||||||||
| 43842 | DEC HL | |||||||||||
| 43843 | LD (43685),HL | Store the new length of the rope. | ||||||||||
| 43846 | CALL Find_World_Map_Address | Find the address of the world map entry of the room. | ||||||||||
| 43849 | INC HL | Point at the second byte of the entry. | ||||||||||
| 43850 | LD (HL),0 | Clear the second byte of the entry. | ||||||||||
| 43852 | DEC (IX+4) | Move Sabreman up to the room above. | ||||||||||
| 43855 | CALL Draw_Room | Draw the new room. | ||||||||||
| 43858 | POP AF | Fetch the controls again from the stack. | ||||||||||
| 43859 | RET | Return. | ||||||||||
| Prev: 43764 | Up: Map | Next: 43860 |