![]() |
Routines |
| Prev: 45783 | Up: Map | Next: 45881 |
|
Set bit 7 (falling) on world slots 1 and 2 unless they are carried, clear the low flag bits of slot 3, update the bomb flags and turn an occupied slot 4 into a platform.
|
||||
|
Set bit 7 (falling) on world slot 1 unless bit 3 (carried) is set.
|
||||
| HideDistantObjects | 45817 | LD A,(24752) | Fetch World_Slot_1_Flags. | |
| 45820 | BIT 3,A | Jump to HideDistantObjects_Slot2Flags if bit 3 is set. | ||
| 45822 | JR NZ,HideDistantObjects_Slot2Flags | |||
| 45824 | OR %10000000 | Set bit 7. | ||
| 45826 | LD (24752),A | Write it back. | ||
|
Do the same for world slot 2.
|
||||
| HideDistantObjects_Slot2Flags | 45829 | LD A,(24776) | Fetch World_Slot_2_Flags. | |
| 45832 | BIT 3,A | Jump to HideDistantObjects_Slot3Flags if bit 3 is set. | ||
| 45834 | JR NZ,HideDistantObjects_Slot3Flags | |||
| 45836 | OR %10000000 | Set bit 7. | ||
| 45838 | LD (24776),A | Write it back. | ||
|
Clear bits 0-1 of the flags of world slot 3.
|
||||
| HideDistantObjects_Slot3Flags | 45841 | LD A,(24800) | Fetch World_Slot_3_Flags. | |
| 45844 | AND %11111100 | Keep only bits 2-7. | ||
| 45846 | LD (24800),A | Write it back. | ||
|
Update the bomb flag when it is not on the ground.
|
||||
| 45849 | LD A,(24992) | Fetch 24992. | ||
| 45852 | BIT 2,A | Jump to HideDistantObjects_WriteBomb if bit 2 is set. | ||
| 45854 | JR NZ,HideDistantObjects_WriteBomb | |||
| 45856 | LD A,(24988) | Fetch 24988. | ||
| 45859 | CP 175 | Compare it against 175. | ||
| 45861 | LD A,0 | A=0. | ||
| 45863 | JR Z,HideDistantObjects_WriteBomb | Jump to HideDistantObjects_WriteBomb if they are equal. | ||
| 45865 | OR %00000010 | Set bit 1. | ||
| HideDistantObjects_WriteBomb | 45867 | LD (24992),A | Write it to 24992. | |
|
Turn world slot 4 into a platform if it is occupied.
|
||||
| 45870 | LD A,(24816) | Fetch World_Slot_4. | ||
| 45873 | AND A | Return if it is free. | ||
| 45874 | RET Z | |||
| 45875 | LD A,47 | Write 47 to World_Slot_4. | ||
| 45877 | LD (24816),A | |||
| 45880 | RET | Return. | ||
| Prev: 45783 | Up: Map | Next: 45881 |