Prev: 939E Up: Map Next: 95ED
93DA: Action Examine
Used by the routine at ActionClimbOut.
Action_Examine 93DA CALL $9D44 Call 9D44.
93DD LD A,($B6E8) A=CurrentObject
93E0 CALL LocateObject Call LocateObject.
93E3 LD L,(IX+$0E) HL=offset for object help text.
93E6 LD H,(IX+$0F)
93E9 LD A,H If this value is not $0000 then jump to PrintMsg.
93EA OR L
93EB JP NZ,PrintMsg
93EE LD HL,$B000 HL="You see[0x16]"
93F1 CALL PrintMsg Call PrintMsg.
93F4 PUSH IX IY=IX
93F6 POP IY
93F8 CALL $9EC7 Call 9EC7.
93FB LD A,$2E
93FD CALL $858B Call 858B.
9400 CALL $8583 Call 8583.
9403 RET Return.
9404 LD IX,($B708)
9408 CALL ActionClimbOut_4
940B JP Z,DisplayExits_3
940E LD A,($B6E8)
9411 CALL ObjectCount
9414 CP $00
9416 JR Z,Action_Examine_0
9418 CALL $9D44
941B CALL $9D50
941E RES 2,(IX+$07)
9422 RET
Action_Examine_0 9423 LD A,$02
9425 JP DisplayExits_3
9428 CALL Action_Putdown_4
942B CALL $9D44
942E LD A,($B6F6)
9431 LD IX,($B70A)
9435 LD B,(IX+$00)
Action_Examine_1 9438 CP (IX+$10)
943B JR Z,Action_Examine_2
943D INC IX
943F DJNZ Action_Examine_1
9441 JP ICannotDoThat
Action_Examine_2 9444 LD A,(IX+$11)
9447 DEC B
9448 JR NZ,Action_Examine_3
944A XOR A
Action_Examine_3 944B PUSH AF
944C LD HL,$ADFC HL="and it get(s|d|ing|es) swept away"
944F CALL PrintMsg Call PrintMsg.
9452 POP AF
9453 LD IX,($B708)
9457 LD (IX+$10),A
945A LD (IX+$01),$FF
945E LD B,A
945F LD A,($B6E8)
9462 CALL $9BDD
9465 LD A,($C12B)
9468 AND A
9469 JP Z,YouAreDead
946C RET
This entry point is used by the routine at ActionBurn.
Action_Examine_4 946D CALL DisplayExits_15
9470 JP NZ,DisplayExits_3
9473 LD A,$C6
Action_Examine_5 9475 LD ($948B),A
9478 LD IY,($B70A)
947C BIT 3,(IY+$07)
9480 LD A,$83
9482 JP NZ,DisplayExits_2
9485 CALL $9D44
9488 SET 0,(IX+$07)
948C RET
This entry point is used by the routine at ActionBurn.
Action_Examine_6 948D LD IX,($B708)
9491 BIT 0,(IX+$07)
9495 LD A,$00
9497 JP Z,DisplayExits_3
949A CALL DisplayExits_16
949D JP NZ,DisplayExits_3
94A0 LD A,$86
94A2 JR Action_Examine_5
94A4 CALL Action_Look_1
94A7 LD A,($B6E9)
94AA CALL $9F28
94AD CP $FF
94AF JP Z,$9F76
94B2 LD IY,($B70A)
94B6 BIT 5,(IY+$07)
94BA LD A,$05
94BC JP Z,DisplayExits_2
94BF CALL $9D44
94C2 LD B,(IX+$02)
94C5 LD IX,($B708)
94C9 LD (IX+$01),$FF
94CD LD (IX+$10),B
94D0 LD A,($B6E8)
94D3 JP $9BDD
This entry point is used by the routine at 77D1.
Action_Examine_7 94D6 PUSH IX
94D8 PUSH HL
94D9 CALL $9B44
94DC LD A,$00
94DE JR Z,Action_Examine_8
94E0 LD A,($B6E7)
94E3 LD IX,$C730
94E7 CALL IndexIdTable
94EA CP $FF
94EC LD A,$01
94EE JR NZ,Action_Examine_8
94F0 CALL DisplayExits_11
94F3 LD A,$01
94F5 JR Z,Action_Examine_8
94F7 LD A,($B6E8)
94FA CALL LocateObject
94FD LD A,($B6E7)
9500 CALL $9B81
9503 LD A,$01
9505 JR C,Action_Examine_8
9507 SUB A
Action_Examine_8 9508 LD ($B6FB),A
950B POP HL
950C POP IX
950E RET
This entry point is used by the routines at 77D1 and 96B3.
Action_Examine_9 950F PUSH HL
9510 PUSH IX
9512 PUSH BC
9513 CALL $9B44
9516 JP Z,Action_Examine_15
9519 CALL LocationLit
951C JR NC,Action_Examine_11
951E LD A,($B711)
9521 AND A
9522 JR NZ,Action_Examine_10
9524 CALL $9C78
9527 JR NC,Action_Examine_10
9529 LD A,($B6E9)
952C CALL $9C7B
952F JR C,Action_Examine_11
Action_Examine_10 9531 LD HL,$AFC4 HL="i see nothing here"
9534 CALL PrintMsg Call PrintMsg.
9537 JR CheckLit
Action_Examine_11 9539 LD A,($B6FE)
953C CP $01
953E JP Z,CheckValidAction
9541 LD A,($B6E8)
9544 CP $FF
9546 JP Z,CheckValidAction
9549 CALL LocateObject
954C LD ($B708),IX
9550 LD A,($B6E8)
9553 CALL $9728
9556 JR NZ,CheckLit
9558 LD A,($B6E9)
955B CP $FF
955D JR Z,Action_Examine_12
955F LD A,($B6FF)
9562 CP $01
9564 JR Z,CheckValidAction
9566 LD A,($B6E9)
9569 CALL LocateObject
956C LD ($B70A),IX
9570 CALL $9728
9573 JR NZ,CheckLit
9575 CALL DisplayExits_11
9578 JR Z,Action_Examine_13
Action_Examine_12 957A LD IX,($B708)
Action_Examine_13 957E LD A,($B6E7)
9581 CALL $9B81
9584 JR NC,CheckValidAction
Action_Examine_14 9586 LD L,(IX+$01) Fetch the action address from the action table and store it in HL.
9589 LD H,(IX+$02)
958C CALL TriggerAction Call TriggerAction.
958F INC IX
9591 INC IX
9593 INC IX
9595 SUB A
9596 CP (IX+$00)
9599 JR Z,Action_Examine_14
CheckLit 959B LD A,($B6FA) If B6FA is not $01 then jump to CheckReturn.
959E CP $01
95A0 JR NZ,CheckReturn
This check is a little unnecessary as the first thing the routine at LocationLit does, is to check exactly this...
95A2 LD A,($B6EA) If CurrentCharacter is not $00 (i.e. "You") then skip the "is location lit" check, instead jump to CheckAction.
95A5 CP $00
95A7 JR NZ,CheckAction
LocationLit uses the carry flag to indicate if it is light or dark.
95A9 CALL LocationLit If the location is dark then call PrintMsg to tell the user "it is dark".
95AC CALL C,PrintMsg
CheckAction 95AF LD A,($B6E7) B=CurrentAction.
95B2 LD B,A
95B3 LD A,($B6E8) Call Action_Examine_16 with IX=B708 and A=CurrentObject.
95B6 LD IX,($B708)
95BA CALL Action_Examine_16
95BD LD A,($B6E9) Call Action_Examine_16 with IX=B70A and A=B6E9.
95C0 LD IX,($B70A)
95C4 CALL Action_Examine_16
Performs housekeeping and returns.
CheckReturn 95C7 POP BC Restore BC, IX and HL from the stack.
95C8 POP IX
95CA POP HL
95CB RET Return.
Checks if the action given is valid.
CheckValidAction 95CC LD A,($B6E7) Call IndexIdTable with ActionTable, to match the key value of CurrentAction.
95CF LD IX,$C730
95D3 CALL IndexIdTable
95D6 CP $FF If the termination character was not reached because an action did match, jump to Action_Examine_14.
95D8 JR NZ,Action_Examine_14
Action_Examine_15 95DA CALL ICannotDoThat Else, call ICannotDoThat and jump to CheckReturn.
95DD JR CheckReturn
This entry point is used by the routine at Action_ThrowAt.
Action_Examine_16 95DF BIT 6,(IX+$07) Return if the object is marked as being a "Fluid".
95E3 RET Z
95E4 BIT 3,(IX+$07) Return if the object is not marked as "Gives Light".
95E8 RET NZ
95E9 CALL $9AA0 Call 9AA0.
95EC RET Return.
Prev: 939E Up: Map Next: 95ED