![]() |
Routines |
| Prev: 37781 | Up: Map | Next: 37864 |
|
Copy Jetman_Position into the actor's world position and draw it. On action, turn it into type 47 handled by Handler_FallingPlatform, and play SoundsDropItem.
|
||||||||
|
Place the actor at Jetman's scroll position.
|
||||||||
| PlaceActorAtScroll | 37798 | LD HL,(24698) | Fetch Jetman_Position. | |||||
| 37801 | LD (IX+3),H | Write the high byte to the actor's world X. | ||||||
| 37804 | LD (IX+2),L | Write the low byte to the actor's world X. | ||||||
| 37807 | LD A,(24700) | Fetch Jetman_Y. | ||||||
| 37810 | ADD A,8 | Add 8 to the Y position. | ||||||
| 37812 | CP 175 | Jump to PlaceActorAtScroll_Draw if it is still above the ground line. | ||||||
| 37814 | JR C,PlaceActorAtScroll_Draw | |||||||
|
175 is the ground line.
|
||||||||
| 37816 | LD A,175 | A=175. | ||||||
|
Redraw the actor and test the action key.
|
||||||||
| PlaceActorAtScroll_Draw | 37818 | LD (IX+4),A | Write the Y position to *IX+4. | |||||
| 37821 | CALL DrawSprite | Call DrawSprite. | ||||||
| 37824 | CALL ColouriseSprite | Call ColouriseSprite. | ||||||
| 37827 | CALL TestActionKey | Call TestActionKey. | ||||||
| 37830 | JR Z,PlaceActorAtScroll_ClearAttached | Jump to PlaceActorAtScroll_ClearAttached if the action key is not pressed. | ||||||
| 37832 | BIT 0,(IX+8) | Return if bit 0 of the actor flags is already set. | ||||||
| 37836 | RET NZ | |||||||
|
Turn the actor into type 47 and give it Jetman's speed.
|
||||||||
| 37837 | LD (IX+0),47 | Write type 47 to the actor. | ||||||
| 37841 | LD HL,24704 | HL=Jetman_Flags. | ||||||
| 37844 | RES 0,(HL) | Reset bit 0 of Jetman's flags. | ||||||
| 37846 | LD A,(24701) | Fetch Jetman_Speed. | ||||||
| 37849 | LD (IX+5),A | Copy that speed to the actor. | ||||||
|
16 is a signed +16 downward throw.
|
||||||||
| 37852 | LD (IX+6),16 | Write 16 to the vertical thrust. | ||||||
| 37856 | JP SoundsDropItem | Jump to SoundsDropItem. | ||||||
| PlaceActorAtScroll_ClearAttached | 37859 | RES 0,(IX+8) | Reset bit 0 of the actor flags. | |||||
| 37863 | RET | Return. | ||||||
| Prev: 37781 | Up: Map | Next: 37864 |