Prev: 47649 Up: Map Next: 48638
48625: Take Three Eighths
Used by the routine at CheckTerrainCollision.
Divides a signed number by eight and by four, and adds the two results.
Input
HL Number
Output
HL Three eighths of the number
TakeThreeEighths 48625 CALL HalveNumber Call HalveNumber.
48628 CALL HalveNumber Call HalveNumber.
48631 PUSH HL Stash HL on the stack.
48632 POP DE Bring DE back off the stack.
48633 CALL HalveNumber Call HalveNumber.
48636 ADD HL,DE HL gains DE.
48637 RET Return.
Prev: 47649 Up: Map Next: 48638