![]() |
Routines |
| Prev: 46745 | Up: Map | Next: 46799 |
|
Add the actor's horizontal speed to its world X and return the Y plus thrust in A.
|
||||||||
|
Add the actor's horizontal speed to its world X.
|
||||||||
| MoveBySpeed | 46766 | LD A,(IX+5) | Copy the actor speed into C. | |||||
| 46769 | LD C,A | |||||||
| 46770 | LD B,0 | Clear B. | ||||||
| 46772 | AND A | Jump to MoveBySpeed_AddWorldX if the speed is positive. | ||||||
| 46773 | JP P,MoveBySpeed_AddWorldX | |||||||
| 46776 | DEC B | Sign-extend the speed into BC. | ||||||
|
Add the sign-extended speed to the world X and wrap it.
|
||||||||
| MoveBySpeed_AddWorldX | 46777 | LD L,(IX+2) | Fetch the actor world X. | |||||
| 46780 | LD H,(IX+3) | Fetch the high byte. | ||||||
| 46783 | CALL MaskWorldX | Call MaskWorldX. | ||||||
| 46786 | LD (IX+2),L | Write the wrapped low byte back. | ||||||
| 46789 | LD (IX+3),H | Write the wrapped high byte back. | ||||||
|
Return the actor Y plus its thrust.
|
||||||||
| 46792 | LD A,(IX+4) | Fetch the actor Y. | ||||||
| 46795 | ADD A,(IX+6) | Add the actor thrust. | ||||||
| 46798 | RET | Return. | ||||||
| Prev: 46745 | Up: Map | Next: 46799 |