![]() |
Routines |
| Prev: 26542 | Up: Map | Next: 26861 |
|
Used by the routine at UpdateMidges.
Prepares for the movement of the midges along one axis: a 16-bit value which has the position in H and the fraction of a pixel in L, and a distance to move which is 32 times the speed (so the distance is up to 480 which is just under two pixels).
|
||||||||||||||||||
| CalculateMidgesMovement | 26845 | LD L,B | L=the fraction. | |||||||||||||||
| 26846 | LD A,C | Multiply the speed by sixteen. | ||||||||||||||||
| 26847 | RLA | |||||||||||||||||
| 26848 | RLA | |||||||||||||||||
| 26849 | RLA | |||||||||||||||||
| 26850 | RLA | |||||||||||||||||
| 26851 | AND 240 | |||||||||||||||||
| 26853 | LD E,A | E=the speed multiplied by sixteen. | ||||||||||||||||
| 26854 | LD D,0 | Clear the high byte of the distance in D. | ||||||||||||||||
| 26856 | SLA E | Double DE. | ||||||||||||||||
| 26858 | RL D | |||||||||||||||||
| 26860 | RET | Return. | ||||||||||||||||
| Prev: 26542 | Up: Map | Next: 26861 |