Prev: 58281 Up: Map Next: 58619
58357: Check The Character For Room Graphics
Used by the routine at ReadSourceDisplayPointer.
Checks the character id and returns when the room has nothing to draw. Reached through the display record at 58378, dispatched by DispatchLookedUpHandlerThird. A non-zero return means the script step succeeded.
CheckCharacterForRoomGraphics 58357 CALL CheckFlagAndJumpToNewline Call CheckFlagAndJumpToNewline, then return if ApplyRoomDisplay returns zero.
58360 CALL ApplyRoomDisplay
58363 RET Z
58364 LD IX,(40983) Read the current character record and read the current object.
58368 LD IY,(40979)
58372 LD A,(41012) Take the room display parameter and jump back to CombineCharacterRoom.
58375 JP CombineCharacterRoom
58378 DEFB 120,32,245,227,144,64,40,0 Display record read by ProcessDisplayRecord: flags 120 value 32 handler CheckCharacterForRoomGraphics, parameters 144 64 40 0 0.
58386 DEFB 0
This entry point is used by the routine at ReadSourceDisplayPointer.
Run by 51812 after the display record at 58378.
CheckCharacterForRoomGraphics_CharacterRecord 58387 LD IY,(40983) Read the current character record.
58391 LD A,(41012)
58394 LD (IY+1),A Store the room display parameter at IY+1.
58397 OR %00000001 Reset the zero flag.
58399 RET Return.
Reached through the display record at 58418, dispatched by DispatchLookedUpHandlerThird.
58400 CALL CheckFlagAndJumpToNewline Call CheckFlagAndJumpToNewline to move to the next line when the flag is set.
58403 LD A,(41014) Read the character being processed and take the room display parameter, then call 53880 to test character id range.
58406 LD HL,41012
58409 CALL 53880
58412 JP NC,ParseInputNumber_ReturnZero Go to ParseInputNumber_ReturnZero if 53880 rejects this character.
58415 OR %00000001 Reset the zero flag.
58417 RET Return.
58418 DEFB 120,32,32,228,16,128,40,0 Display record read by ProcessDisplayRecord: flags 120 value 32 handler 58400, parameters 16 128 40 0 0.
58426 DEFB 0
Run by 51812 after the display record at 58418.
CheckCharacterForRoomGraphics_CurrentObject 58427 LD IY,(40979) Read the current object.
58431 LD A,(IY+1) Keep the object's marker and read the current character record.
58434 LD IY,(40983)
58438 LD (IY+1),A Store the object's marker on the character at IY+1.
58441 OR %00000001 Reset the zero flag.
58443 RET Return.
Reached through the display record at 58450, dispatched by DispatchLookedUpHandlerThird.
58444 CALL CheckFlagAndJumpToNewline Check the flag at CheckFlagAndJumpToNewline and compare the character from TestCharacterAgainstRoom.
58447 JP TestCharacterAgainstRoom
58450 DEFB 236,0,76,228 Display record read by ProcessDisplayRecord: flags 236 value 0 handler 58444.
58454 DEFB 7,47,229,10,255 Refresh the room from the text at 58671, using Maid, 255.
58459 DEFB 71,136,228,253,255 Refresh the room from the text at 58504, using the low byte of the location, 255.
58464 DEFB 87,82,221,250,255,107,228 Refresh the room from the text at 56658, using the current room, 255 and otherwise continue at 58475.
58471 DEFB 67,136,229 Show the message at 58760.
58474 DEFB 11 Run the nested character script.
58475 DEFB 199,253,229,253,255,129,228 Refresh the room from the text at 58877, using the low byte of the location, 255 and otherwise continue at 58497.
58482 DEFB 193,13,129,228 Perform the simple action for Tricia Fender and otherwise continue at 58497.
58486 DEFB 87,132,221,253,255,129,228 Refresh the room from the text at 56708, using the low byte of the location, 255 and otherwise continue at 58497.
58493 DEFB 66,12,250,255 Copy room parameters Local Police Man, the current room, 255 into the display.
58497 DEFB 15 Mark a script error and carry on.
58498 DEFB 195,122,229,91,228 Show the message at 58746 and otherwise continue at 58459.
58503 DEFB 10 Run the nested character script.
58504 DEFB 39,0 Display record read by ProcessDisplayRecord: flags 39 value 0.
Run by 51812 after the display record at 58504.
58506 LD IX,(40979) Read the current object.
58510 LD A,(IX+15) Record the current room.
58513 LD (40918),A
58516 OR %00000001 Reset the zero flag.
58518 RET Return.
58519 DEFB 71,36,176,228 Display record read by ProcessDisplayRecord: flags 71 value 36 handler 58544.
Run by 51812 after the display record at 58519.
58523 LD A,(41013) Read the room graphics parameter and keep it in B.
58526 LD B,A
58527 LD A,(41012) Read the room display parameter.
58530 LD IX,(40979) Read the current object.
58534 LD (IX+1),255 Store 255 in the moved marker, then call StoreMatchedCharacterRoom to compare the room display parameter with the current character.
58538 CALL StoreMatchedCharacterRoom
58541 OR %00000001 Reset the zero flag.
58543 RET Return.
Reached through the display record at 58519, dispatched by DispatchLookedUpHandlerThird.
58544 LD IX,(40979) Read the current object.
58548 BIT 6,(IX+5) Jump to CheckCharacterForRoomGraphics_Succeed if the special-description flag is clear.
58552 JR Z,CheckCharacterForRoomGraphics_Succeed
58554 LD A,(IX+15) Read the character attribute, then call FetchLocationDataPointer to look up this room.
58557 CALL FetchLocationDataPointer
58560 LD A,(IX+9) Record the saved character.
58563 LD (41011),A
CheckCharacterForRoomGraphics_Succeed 58566 OR %00000001 Reset the zero flag.
58568 RET Return.
58569 DEFB 4,0 Display record read by ProcessDisplayRecord: flags 4 value 0.
Run by 51812 after the display record at 58569.
58571 LD HL,40022 Point HL at SetObjectHeldMark and read the room display parameter.
58574 LD A,(41012)
58577 PUSH AF
58578 CP 2 Jump ahead to CheckCharacterForRoomGraphics_PrintMessage if the room display parameter is 2.
58580 JR Z,CheckCharacterForRoomGraphics_PrintMessage
58582 CP 3 Jump ahead to CheckCharacterForRoomGraphics_PrintMessage if the room display parameter is 3.
58584 JR Z,CheckCharacterForRoomGraphics_PrintMessage
58586 CP 4 Jump ahead to CheckCharacterForRoomGraphics_ReadCharacter if the room display parameter is not 4.
58588 JR NZ,CheckCharacterForRoomGraphics_ReadCharacter
CheckCharacterForRoomGraphics_PrintMessage 58590 LD HL,30225 Take the message, then call PrintTextAndHandleControlCharacters to print the message.
58593 CALL PrintTextAndHandleControlCharacters
58596 LD HL,40032 Take the routine at ClearObjectHeldMark.
CheckCharacterForRoomGraphics_ReadCharacter 58599 LD A,(41014) Keep the current character, call DispatchLookedUpHandler.
58602 PUSH AF
58603 CALL DispatchLookedUpHandler
58606 POP AF Restore that character from the stack.
58607 POP BC Restore the room display parameter from the stack.
58608 CALL StoreMatchedCharacterRoom Call StoreMatchedCharacterRoom.
58611 LD HL,(56575) Read the record at 56575 and clear its marker.
58614 RES 6,(HL)
58616 OR %00000001 Reset the zero flag.
58618 RET Return.
Prev: 58281 Up: Map Next: 58619