![]() |
Routines |
| Prev: 45850 | Up: Map | Next: 45887 |
|
The handler for a block which moves up and down when the player is standing on it (object 47). The highest point it reaches is 48 above its height when it was first handled, which is kept in BlockScratch. A block which has not been touched and has not landed is left alone.
|
||||||||
|
Set BlockScratch the first time this block is handled.
|
||||||||
| HandleRisingBlock | 45855 | CALL SetPixelAdjustments | Call SetPixelAdjustments. | |||||
| 45858 | LD A,(23333) | Fetch BlockScratch. | ||||||
| 45861 | AND A | Jump to HandleRisingBlock_TestTouched if it is not zero. | ||||||
| 45862 | JR NZ,HandleRisingBlock_TestTouched | |||||||
| 45864 | LD A,(IX+3) | Fetch the height of the block. | ||||||
| 45867 | ADD A,48 | Add 48. | ||||||
| 45869 | LD (23333),A | Set BlockScratch. | ||||||
|
Leave the block alone unless it has been touched or has landed.
|
||||||||
| HandleRisingBlock_TestTouched | 45872 | BIT 3,(IX+13) | Test bit 3 of the state. | |||||
| 45876 | RES 3,(IX+13) | Reset bit 3 of the state. | ||||||
| 45880 | JR NZ,HandleMovingBlock_Move | Jump to HandleMovingBlock_Move if something touched the block. | ||||||
| 45882 | BIT 2,(IX+12) | Return if the block has not landed. | ||||||
| 45886 | RET Z | |||||||
|
Continue on to HandleMovingBlock.
|
||||||||
| Prev: 45850 | Up: Map | Next: 45887 |