Prev: 50691 Up: Map Next: 50766
50757: Look Up Ghost Speed
Used by the routine at HandleGhost.
Looks up a speed from the table at GhostSpeeds.
Input
A Number of the entry
Output
A Speed
LookUpGhostSpeed 50757 LD BC,50766 Point BC at the table of speeds, GhostSpeeds.
50760 LD L,A Use the number of the entry as the low byte of the offset.
50761 LD H,0 Clear the high byte of the offset.
50763 ADD HL,BC Point HL at the entry.
50764 LD A,(HL) Fetch the speed.
50765 RET Return.
View the equivalent code in;
Prev: 50691 Up: Map Next: 50766