Prev: 37790 Up: Map Next: 37997
37850: Action: Examine
Used by the routine at Event_TheDeepBog.
Examines the current object and prints what is special about it. Reached through the action table at ActionTable, dispatched by Turn_RunTheHandlerIfPresent.
Action_Examine 37850 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not examined.
37853 LD A,(46824) Read the current object.
37856 CALL LocateObject Call LocateObject to locate object.
37859 LD L,(IX+14) Read byte 14 of this object.
37862 LD H,(IX+15) Read byte 15 of this object.
37865 LD A,H Jump to PrintMessage when the pointer is not zero.
37866 OR L
37867 JP NZ,PrintMessage
37870 LD HL,45056 Point at the message "You see[0x16]" (45056).
37873 CALL PrintMessage Call PrintMessage to print message.
37876 PUSH IX Call MessageNameAnObject to name the object.
37878 POP IY
37880 CALL MessageNameAnObject
37883 LD A,46 Use the character '.'.
37885 CALL Print_Character Call Print_Character to print one character.
37888 CALL Print_LineBreak Call Print_LineBreak to print a newline.
37891 RET Return.
Reached through the action list of 19 - "Barrel" for action 34, dispatched by TriggerAction.
37892 LD IX,(46856) Read *46856.
37896 CALL Event_TestTheOpenFlag Call Event_TestTheOpenFlag to test whether the object is open.
37899 JP Z,Message_NameFromThisRecord Jump to Message_NameFromThisRecord if the object is not open.
37902 LD A,(46824) Read *CurrentObject.
Count the objects being held.
37905 CALL ObjectCount Call ObjectCount to count the visible objects.
37908 CP 0 Jump to Action_Examine_PrintTheName if ObjectCount counted nothing inside the current object.
37910 JR Z,Action_Examine_PrintTheName
If the message is held back, the object is not examined.
37912 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not examined.
37915 CALL Condition_WhereTheObjectIs Call Condition_WhereTheObjectIs to find where the object is.
37918 RES 2,(IX+7) Mark the object not full.
37922 RET Return.
Action_Examine_PrintTheName 37923 LD A,2 Pass code 2 on to the naming routine.
37925 JP Message_NameFromThisRecord Jump to Message_NameFromThisRecord to print the object's name.
Reached through the action lists of 9 - "Fast Black River" and 42 - "Fast River" for actions 14 and 17, dispatched by TriggerAction.
37928 CALL Action_StopIfTheObjectIsFixed Call Action_StopIfTheObjectIsFixed to stop the verb when the object is fixed or a fluid.
If the message is held back, the special description is not printed.
37931 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the special description is not printed.
37934 LD A,(46838) Read *46838.
37937 LD IX,(46858) Read *46858.
37941 LD B,(IX+0) Load the copy count into B.
Action_Examine_Loop 37944 CP (IX+16) Jump to Action_Examine_ReadTheCopyLocation if the script location is the object's location.
37947 JR Z,Action_Examine_ReadTheCopyLocation
37949 INC IX Step to the next byte of this object.
37951 DJNZ Action_Examine_Loop Loop back to Action_Examine_Loop until every copy's location has been checked.
37953 JP Response_ICannotDoThat Jump to Response_ICannotDoThat to say "i cannot do that".
Action_Examine_ReadTheCopyLocation 37956 LD A,(IX+17) Read byte +17 from the object record.
37959 DEC B Jump to Action_Examine_PrintSweptAway if this was not the last copy.
37960 JR NZ,Action_Examine_PrintSweptAway
37962 XOR A Take zero for this object's location.
Action_Examine_PrintSweptAway 37963 PUSH AF Point at the message "and it get(s|d|ing|es) swept away".
37964 LD HL,44540
37967 CALL PrintMessage Call PrintMessage to print message.
37970 POP AF Read *46856.
37971 LD IX,(46856)
37975 LD (IX+16),A Set this object's location to the next copy's location (or zero).
37978 LD (IX+1),255 Mark where this object is as unset.
37982 LD B,A Read *CurrentObject.
37983 LD A,(46824)
37986 CALL Object_MoveContents_0 Call Object_MoveContents_0 to move what is inside the current object to that location.
Test this flag.
37989 LD A,(49451) Jump to YouAreDead if *49451 is zero.
37992 AND A
37993 JP Z,YouAreDead
37996 RET Return.
Prev: 37790 Up: Map Next: 37997