Prev: 939E Up: Map Next: 946D
93DA: 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 93DA CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not examined.
93DD LD A,($B6E8) Read the current object.
93E0 CALL LocateObject Call LocateObject to locate object.
93E3 LD L,(IX+$0E) Read byte 0E of this object.
93E6 LD H,(IX+$0F) Read byte 0F of this object.
93E9 LD A,H Jump to PrintMessage when the pointer is not zero.
93EA OR L
93EB JP NZ,PrintMessage
93EE LD HL,$B000 Point at the message "You see[0x16]" (B000).
93F1 CALL PrintMessage Call PrintMessage to print message.
93F4 PUSH IX Call MessageNameAnObject to name the object.
93F6 POP IY
93F8 CALL MessageNameAnObject
93FB LD A,$2E Use the character '.'.
93FD CALL Print_Character Call Print_Character to print one character.
9400 CALL Print_LineBreak Call Print_LineBreak to print a newline.
9403 RET Return.
Reached through the action list of $13 - "Barrel" for action 22, dispatched by TriggerAction.
9404 LD IX,($B708) Read *B708.
9408 CALL Event_TestTheOpenFlag Call Event_TestTheOpenFlag to test whether the object is open.
940B JP Z,Message_NameFromThisRecord Jump to Message_NameFromThisRecord if the object is not open.
940E LD A,($B6E8) Read *CurrentObject.
Count the objects being held.
9411 CALL ObjectCount Call ObjectCount to count the visible objects.
9414 CP $00 Jump to Action_Examine_PrintTheName if ObjectCount counted nothing inside the current object.
9416 JR Z,Action_Examine_PrintTheName
If the message is held back, the object is not examined.
9418 CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the object is not examined.
941B CALL Condition_WhereTheObjectIs Call Condition_WhereTheObjectIs to find where the object is.
941E RES 2,(IX+$07) Mark the object not full.
9422 RET Return.
Action_Examine_PrintTheName 9423 LD A,$02 Pass code 02 on to the naming routine.
9425 JP Message_NameFromThisRecord Jump to Message_NameFromThisRecord to print the object's name.
Reached through the action lists of $09 - "Fast Black River" and $2A - "Fast River" for actions 0E and 11, dispatched by TriggerAction.
9428 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.
942B CALL ConditionSuppressTheMessage Call ConditionSuppressTheMessage. If the message is held back, the special description is not printed.
942E LD A,($B6F6) Read *B6F6.
9431 LD IX,($B70A) Read *B70A.
9435 LD B,(IX+$00) Load the copy count into B.
Action_Examine_Loop 9438 CP (IX+$10) Jump to Action_Examine_ReadTheCopyLocation if the script location is the object's location.
943B JR Z,Action_Examine_ReadTheCopyLocation
943D INC IX Step to the next byte of this object.
943F DJNZ Action_Examine_Loop Loop back to Action_Examine_Loop until every copy's location has been checked.
9441 JP Response_ICannotDoThat Jump to Response_ICannotDoThat to say "i cannot do that".
Action_Examine_ReadTheCopyLocation 9444 LD A,(IX+$11) Read byte +11 from the object record.
9447 DEC B Jump to Action_Examine_PrintSweptAway if this was not the last copy.
9448 JR NZ,Action_Examine_PrintSweptAway
944A XOR A Take zero for this object's location.
Action_Examine_PrintSweptAway 944B PUSH AF Point at the message "and it get(s|d|ing|es) swept away".
944C LD HL,$ADFC
944F CALL PrintMessage Call PrintMessage to print message.
9452 POP AF Read *B708.
9453 LD IX,($B708)
9457 LD (IX+$10),A Set this object's location to the next copy's location (or zero).
945A LD (IX+$01),$FF Mark where this object is as unset.
945E LD B,A Read *CurrentObject.
945F LD A,($B6E8)
9462 CALL Object_MoveContents_0 Call Object_MoveContents_0 to move what is inside the current object to that location.
Test this flag.
9465 LD A,($C12B) Jump to YouAreDead if *C12B is zero.
9468 AND A
9469 JP Z,YouAreDead
946C RET Return.
Prev: 939E Up: Map Next: 946D