![]() |
Routines |
| Prev: FD20 | Up: Map | Next: FE47 |
|
Entered at its end from ROOMST, with HL at the first record after the knight's and THIS_RECORD at 7. Each record is drawn now, once, if it is a door or still: nothing in the low five bits of +16, a thing that never moves and that CHE3D never updates. With bit 4 of GAME_FLAGS set, REDRAW_OBJECT draws it among the other still things only. When all are done the screen is copied to the clean copy again (RESTOR), so from now on they are part of the room's picture, drawn again only where something passes in front of them.
Then THINGS_NOTED is cleared and GAME_FLAGS set to 5 -- LIFE to be printed (bit 0) and the room's first pass (bit 2), everything else off, a freeze included -- and the main loop starts with its keys (MAIN_LOOP).
|
||||||||
| DRAW_STILL_THINGS | FE15 | PUSH HL | IX = the record; THIS_RECORD = its number | |||||
| FE16 | POP IX | |||||||
| FE18 | INC (IY+THIS_RECORD-V) | |||||||
| FE1B | LD A,(IX+OBJ_KIND) | A door: draw it | ||||||
| FE1E | AND $0F | |||||||
| FE20 | CP $01 | |||||||
| FE22 | JR Z,DRAW_STILL_THINGS_0 | |||||||
| FE24 | LD A,(IX+OBJ_WEIGHT) | Anything else only if still | ||||||
| FE27 | AND $1F | |||||||
| DRAW_STILL_THINGS_0 | FE29 | PUSH HL | Draw it (REDRAW_OBJECT) | |||||
| FE2A | CALL Z,REDRAW_OBJECT | |||||||
| FE2D | POP HL | |||||||
| FE2E | LD DE,$0014 | Next record | ||||||
| FE31 | ADD HL,DE | |||||||
|
This entry point is used by the routine at ROOMST.
|
||||||||
| DRAW_STILL_THINGS_1 | FE32 | LD A,(OBJECT_COUNT) | Until the last in use | |||||
| FE35 | CP (IY+THIS_RECORD-V) | |||||||
| FE38 | JR NZ,DRAW_STILL_THINGS | |||||||
| FE3A | CALL RESTOR | Copy the screen, still things and all, to the clean copy | ||||||
| FE3D | LD (IY+THINGS_NOTED-V),$00 | A new room's flags, and into the main loop | ||||||
| FE41 | LD (IY+GAME_FLAGS-V),$05 | |||||||
| FE45 | JR PASS_KEYS | |||||||
| Prev: FD20 | Up: Map | Next: FE47 |