Prev: C603 Up: Map Next: C64E
C645: 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 C645 LD BC,$C64E Point BC at the table of speeds, GhostSpeeds.
C648 LD L,A Use the number of the entry as the low byte of the offset.
C649 LD H,$00 Clear the high byte of the offset.
C64B ADD HL,BC Point HL at the entry.
C64C LD A,(HL) Fetch the speed.
C64D RET Return.
View the equivalent code in;
Prev: C603 Up: Map Next: C64E