Prev: 9B7D Up: Map Next: 9BA0
9B8F: Graphic layout routine: (247) Jump to randomly selected graphic layout data address from list
Read current byte value (n) from graphic layout data, generate random number m (00 - n-01) then jump to address in m-th WORD after current position.
Input
A (Entry at 9B97) Number of words in graphic layout data to skip over
A (Entry at 9B98) Number of bytes in graphic layout data to skip over
IX Address of first parameter in current graphic layout data instruction
Output
IX Address of next graphic layout data instruction to process
9B8F LD A,(IX+$00) Load current byte of graphic layout data into A.
9B92 INC IX Advance pointer to next byte.
9B94 CALL $955A Load A with a random number between 00 and (A-01).
This entry point is used by the routine at 9BA0.
9B97 ADD A,A Double value in A.
This entry point is used by the routines at 9B7D and 9C04.
9B98 LD C,A Load BC with offset value in A.
9B99 LD B,$00
9B9B ADD IX,BC Advance IX by offset value.
9B9D JP $9B2F Jump to 9B2F (set current position in graphic layout data to value of WORD at this address).
Prev: 9B7D Up: Map Next: 9BA0