![]() |
Routines |
| Prev: 50563 | Up: Map | Next: 50684 |
|
Used by the routine at ReadCharactersRoom.
HL points at a display record. Copies the low nibbles of its flags and value byte to DisplayMode/40976, clears 40971 and checks the record against the current room before drawing it.
|
||||
| ProcessDisplayRecordFromScript | 50577 | PUSH HL | Point IX at the record and copy the low nibble of its flags to DisplayMode via CopyRecordFlagNibble. | |
| 50578 | POP IX | |||
| 50580 | CALL CopyRecordFlagNibble | |||
| 50583 | CALL CopyRecordValueNibble | Copy the low nibble of the value byte via CopyRecordValueNibble. | ||
| 50586 | XOR A | Clear the parser. | ||
| 50587 | LD (40971),A | |||
| 50590 | LD A,(40975) | |||
| 50593 | LD HL,40976 | Take the display mode. | ||
| 50596 | OR (HL) | Merge the flag at 40976, and go to ProcessDisplayRecordFromScript_RunObjectDisplay when both flags are clear. | ||
| 50597 | JR Z,ProcessDisplayRecordFromScript_RunObjectDisplay | |||
| 50599 | LD A,(40975) | Jump to ProcessDisplayRecordFromScript_CompareRoom if the display mode is 5. | ||
| 50602 | CP 5 | |||
| 50604 | JR Z,ProcessDisplayRecordFromScript_CompareRoom | |||
| 50606 | CP 6 | Jump ahead to ProcessDisplayRecordFromScript_DisplayMode if the display mode is not 6. | ||
| 50608 | JR NZ,ProcessDisplayRecordFromScript_DisplayMode | |||
| ProcessDisplayRecordFromScript_CompareRoom | 50610 | LD A,(41012) | Jump to DispatchLookedUpHandlerThird_0 if the room display parameter is not 254. | |
| 50613 | CP 254 | |||
| 50615 | JP NZ,DispatchLookedUpHandlerThird_0 | |||
| ProcessDisplayRecordFromScript_DisplayMode | 50618 | LD A,(40976) | Jump to ProcessDisplayRecordFromScript_TestGraphics if the display mode is 5. | |
| 50621 | CP 5 | |||
| 50623 | JR Z,ProcessDisplayRecordFromScript_TestGraphics | |||
| 50625 | CP 6 | Jump ahead to ProcessDisplayRecordFromScript_DisplayModeZero if the display mode is not 6. | ||
| 50627 | JR NZ,ProcessDisplayRecordFromScript_DisplayModeZero | |||
| ProcessDisplayRecordFromScript_TestGraphics | 50629 | LD A,(41013) | Jump to DispatchLookedUpHandlerThird_0 if the room graphics parameter is not 254. | |
| 50632 | CP 254 | |||
| 50634 | JP NZ,DispatchLookedUpHandlerThird_0 | |||
| ProcessDisplayRecordFromScript_DisplayModeZero | 50637 | LD A,(40975) | Jump to ProcessDisplayRecordFromScript_AcceptGraphics if the display mode is zero. | |
| 50640 | AND A | |||
| 50641 | JR Z,ProcessDisplayRecordFromScript_AcceptGraphics | |||
| 50643 | LD A,(41012) | Jump to ProcessDisplayRecordFromScript_AcceptGraphics if the room display parameter is not 255. | ||
| 50646 | CP 255 | |||
| 50648 | JR NZ,ProcessDisplayRecordFromScript_AcceptGraphics | |||
| 50650 | LD B,0 | Start the picture count at zero. | ||
| ProcessDisplayRecordFromScript_TestDisplay | 50652 | CALL ReadDisplayModeForPicture | Return if the count has reached the graphics limit. | |
| 50655 | RET Z | |||
| 50656 | LD (41012),A | Store it in the room display parameter, then call RecordResultRoomGraphics_ClearHighByte to run display action. | ||
| 50659 | CALL RecordResultRoomGraphics_ClearHighByte | |||
| 50662 | JR NZ,ProcessDisplayRecordFromScript_RunObjectDisplay | Go to ProcessDisplayRecordFromScript_RunObjectDisplay if RecordResultRoomGraphics_ClearHighByte found a picture. | ||
| 50664 | INC B | Try the next display value from ProcessDisplayRecordFromScript_TestDisplay. | ||
| 50665 | JR ProcessDisplayRecordFromScript_TestDisplay | |||
|
Accept a set graphics parameter, and return when it is empty.
|
||||
| ProcessDisplayRecordFromScript_AcceptGraphics | 50667 | CALL AcceptSetGraphicsParameter | Go to ProcessDisplayRecordFromScript_RunObjectDisplay if the set graphics parameter is not accepted. | |
| 50670 | JR Z,ProcessDisplayRecordFromScript_RunObjectDisplay | |||
| 50672 | CALL RecordResultRoomGraphics_CountGraphicsSteps | Return if the graphics count has reached its limit. | ||
| 50675 | RET Z | |||
| ProcessDisplayRecordFromScript_RunObjectDisplay | 50676 | LD A,1 | Set the parser flag at 40971 to 1 and continue at ProcessObjectDisplayWithPointer. | |
| 50678 | LD (40971),A | |||
| 50681 | JP ProcessObjectDisplayWithPointer | |||
| Prev: 50563 | Up: Map | Next: 50684 |