![]() |
Routines |
| Prev: 36710 | Up: Map | Next: 36758 |
|
Used by the routine at UpdateVelocity.
Converts a velocity, which has four bits after the point, to the number of whole pixels to move. This is the velocity divided by sixteen, rounded towards zero.
|
||||||||||||
| GetWholePixels | 36736 | AND A | Test the sign of the velocity. | |||||||||
| 36737 | JP P,GetWholePixels_Positive | Jump to GetWholePixels_Positive if it is positive. | ||||||||||
| 36740 | NEG | Make the velocity positive. | ||||||||||
| 36742 | RRCA | Shift the velocity right four times, to drop the bits after the point. | ||||||||||
| 36743 | RRCA | |||||||||||
| 36744 | RRCA | |||||||||||
| 36745 | RRCA | |||||||||||
| 36746 | AND %00001111 | Keep only bits 0-3. | ||||||||||
| 36748 | NEG | Make the result negative. | ||||||||||
| 36750 | RET | Return. | ||||||||||
| GetWholePixels_Positive | 36751 | RRCA | Shift the velocity right four times, to drop the bits after the point. | |||||||||
| 36752 | RRCA | |||||||||||
| 36753 | RRCA | |||||||||||
| 36754 | RRCA | |||||||||||
| 36755 | AND %00001111 | Keep only bits 0-3. | ||||||||||
| 36757 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 36710 | Up: Map | Next: 36758 |