Prev: 34385 Up: Map Next: 34418
34402: Point HL to current position data for current character
Used by the routines at 31804, 32035 and 33312.
Output
HL Points to entry for Current Character in current character positions table at 25440
34402 PUSH BC Store BC
34403 LD A,(30615) Load A with index of Current Character...
34406 LD C,A ...copy into C...
34407 ADD A,A ...and multiply by 3 (as there are three bytes per entry in character positions table; screen, x- and y-coordinates)...
34408 ADD A,C ...
34409 LD C,A Load new value back into BC...
34410 LD B,0 ...
34412 LD HL,25440 Point HL at table of characters' current positions
34415 ADD HL,BC Add offset so that HL points to position entry for Current Character
34416 POP BC Restore BC
34417 RET Return
Prev: 34385 Up: Map Next: 34418