Prev: 57707 Up: Map Next: 57852
57723: Dispatch Room Graphics
Chooses the picture and the room-display handler for the location on screen. A non-zero return means the script step succeeded. Reached through the object display table at Table_ObjectDisplayData, read by 51558.
DispatchRoomGraphics 57723 DEFB 141,7 Display record read by ProcessDisplayRecord: flags 141 value 7.
57725 DEFB 7,136,225,253,252 Refresh the room from the text at 57736, using the low byte of the location, the high byte of the location.
57730 DEFB 7,214,225,253,252 Refresh the room from the text at 57814, using the low byte of the location, the high byte of the location.
57735 DEFB 11 Run the nested character script.
57736 DEFB 13,7 Display record read by ProcessDisplayRecord: flags 13 value 7.
Run by 51812 after the display record at 57736.
57738 LD A,(41013) Read the room graphics parameter.
57741 CP 16 Go to DispatchRoomGraphics_Next if it is 16.
57743 JR Z,DispatchRoomGraphics_Next
57745 CP 67 Go to DispatchRoomGraphics_Next if it is Sitting Room.
57747 JR Z,DispatchRoomGraphics_Next
57749 CP 17 Go to DispatchRoomGraphics_TestActionSucceeded if it is not Platform Two (Aldergate Station).
57751 JR NZ,DispatchRoomGraphics_TestActionSucceeded
DispatchRoomGraphics_Next 57753 LD IX,39315 Point IX at the character state at 39315.
57757 SET 1,(IX+3) Set bit 1 of the action flags.
57761 JR DispatchRoomGraphics_TestActionSucceeded Return non-zero through DispatchRoomGraphics_TestActionSucceeded.
57763 DEFB 141,7 Display record read by ProcessDisplayRecord: flags 141 value 7.
57765 DEFB 23,178,225,255,252,177,225 Refresh the room from the text at 57778, using 255 the high byte of the location and otherwise continue at 57777.
57772 DEFB 7,214,225,253,252 Refresh the room from the text at 57814, using the low byte of the location, the high byte of the location.
57777 DEFB 11 Run the nested character script.
57778 DEFB 0,7 Display record read by ProcessDisplayRecord: flags 0 value 7.
Run by 51812 after the display record at 57778.
57780 LD A,(41013) Read the room graphics parameter.
57783 CP 67 Go to DispatchRoomGraphics_TestActionSucceeded if it is not Sitting Room.
57785 JR NZ,DispatchRoomGraphics_TestActionSucceeded
57787 CALL CheckObjectLocationMatch Go to DispatchRoomGraphics_LeaveResultCharacter if the object is in this location.
57790 JR NZ,DispatchRoomGraphics_LeaveResultCharacter
57792 CALL PrintLineAboutYou Call PrintLineAboutYou and return zero through ParseInputNumber_ReturnZero.
57795 JP ParseInputNumber_ReturnZero
Leave 95 as the result, then use the character Pairs as the character record, then mark bit 1 of the action flags.
DispatchRoomGraphics_LeaveResultCharacter 57798 LD A,95 Call PlaceCharacter to place character.
57800 CALL PlaceCharacter
57803 LD IX,39311 Set the action-taken flag.
57807 SET 1,(IX+3)
DispatchRoomGraphics_TestActionSucceeded 57811 OR %00000001 Reset the zero flag.
57813 RET Return.
57814 DEFB 13,23 Display record read by ProcessDisplayRecord: flags 13 value 23.
Run by 51812 after the display record at 57814.
57816 LD A,(41014) Read the character being processed.
57819 CALL FindResponseForThisId Call FindResponseForThisId to see whether the id matches a record flag.
57822 JR Z,PrintLineAboutYou Go to PrintLineAboutYou if no record flag matches.
57824 INC IX Move to the next graphics entry, read the room graphics parameter and call TestEndMarker_WalksThreeByte.
57826 LD A,(41013)
57829 CALL TestEndMarker_WalksThreeByte
57832 JR Z,PrintLineAboutYou Go to PrintLineAboutYou if the looked-up entry is 255.
57834 LD L,(IX+1) Read the message address.
57837 LD H,(IX+2)
This entry point is used by the routine at PrintLineAboutYou.
DispatchRoomGraphics_Loop 57840 PUSH AF Take the message, then call PrintTextAndHandleControlCharacters to print the message, saving result and the pointer.
57841 PUSH HL
57842 LD HL,26672
57845 CALL PrintTextAndHandleControlCharacters
This entry point is used by the routine at FindResponseForThisId.
DispatchRoomGraphics_ActionSucceeded 57848 POP AF Restore the saved character from the stack.
This entry point is used by the routine at FindResponseForThisId.
DispatchRoomGraphics_0 57849 OR %00000001 Reset the zero flag.
57851 RET Return.
Prev: 57707 Up: Map Next: 57852