Prev: 39563 Up: Map Next: 39609
39593: Graphic layout routine: (245) Decrease timer value, and if zero, reset and write random graphic index from list into next instruction
Decrease timer value (1st parameter). If now zero, then reset timer to value in 2nd parameter, then load one of the n (3rd parameter) following values chosen at random into the graphic index field of the next instruction.
Input
IX Address of first parameter in current graphic layout data instruction
Output
B Do-not-recalculate-display-buffer-address flag (0)
IX Address of next graphic layout data instruction to process
39593 LD B,0 Prepare to recalculate display buffer address.
39595 DEC (IX+0) Decrease timer value.
39598 JR NZ,39616 If timer is not zero, then advance IX to start of next instruction and process.
39600 CALL 39631 Reset timer to maximum, advance IX to start of next instruction and set value here (graphic index) to random value from sequence of data following previous instruction.
39603 LD (IX+0),E
39606 JP 39070 Read / process data at address in IX.
Prev: 39563 Up: Map Next: 39609