quill | Routines |
Prev: 25141 | Up: Map | Next: 25231 |
Reset flags and reset objects to start location
|
||||||||
RESET_GAME | 25177 | SET 3,(IY+48) | ||||||
25181 | LD (IY+7),0 | |||||||
25185 | SET 3,(IY+1) | |||||||
25189 | LD HL,(23672) | HL=frame counter (effectively random number) | ||||||
25192 | LD (23670),HL | Set random number seed to whatever frame counter was | ||||||
25195 | CALL SET_COLOURS | Set default colours | ||||||
25198 | CALL RESET_PICTURES | Initialise Illustrator code | ||||||
25201 | PUSH HL | |||||||
25202 | POP IX | |||||||
25204 | LD B,37 | Loop 37 times (for the 37 flags used by the Quill) | ||||||
25206 | XOR A | A=0 | ||||||
RESET_FLAGS | 25207 | LD (HL),A | Set flag to 0 | |||||
25208 | INC HL | Next entry in table | ||||||
25209 | DJNZ RESET_FLAGS | Loop until done | ||||||
25211 | LD HL,(27559) | HL = Address of object start position table | ||||||
25214 | LD DE,23333 | DE = Address of object current position table | ||||||
RESET_OBJ_LOCS | 25217 | LD A,(HL) | A=start position of object | |||||
25218 | LDI | Set current location to start location. Increment HL and DE | ||||||
25220 | CP 254 | Is object carried? (Or are we finished?) | ||||||
25222 | JR C,RESET_OBJ_LOCS | If neither, process next object | ||||||
25224 | JR NZ,DESC_LOCATION | If finished, describe current location | ||||||
25226 | INC (IX+1) | Increment flag 1 | ||||||
25229 | JR RESET_OBJ_LOCS | Process next object |
Prev: 25141 | Up: Map | Next: 25231 |