Prev: 62788 Up: Map Next: 62904
62843: Process: Place Ladder Against Platform
Process_PlaceLadderAgainstPlatform 62843 LD HL,58309 Call CheckItemGroupPresent with Data_ItemGroup_Ladder.
62846 CALL CheckItemGroupPresent
If the version of the ladder which exists in the room is one where it's already been used, print "You've done that already.".
62849 CP 94 Jump to Response_YouveDoneThatAlready if either of "A ladder,leading upward" or "A ladder,leading down" are in the current room.
62851 JP Z,Response_YouveDoneThatAlready
62854 CP 92
62856 JP Z,Response_YouveDoneThatAlready
This doesn't need to happen...
62859 CALL IsPlayerCarryingItem Call IsPlayerCarryingItem.
62862 LD A,90 Call Handler_DestroyItemEvent with item 90: "A ladder".
62864 CALL Handler_DestroyItemEvent
62867 LD A,94 Call Handler_UpdateItemEventCurrentRoom with item 94: "A ladder,leading upward".
62869 CALL Handler_UpdateItemEventCurrentRoom
The ladder has been used so handle the inventory count.
62872 LD HL,42896 Decrease *Count_InventoryItems by one.
62875 DEC (HL)
62876 LD A,96 Write 96 to *59754.
62878 LD (59754),A
62881 LD A,99 Write 99 to *59737.
62883 LD (59737),A
62886 LD HL,42860 Jump to Response_OK_Duplicate if bit 6 of *Flag_GameStates_01 is set.
62889 BIT 6,(HL)
62891 JP NZ,Response_OK_Duplicate
62894 SET 6,(HL) Set bit 6 of *HL which relates to placing the ladder.
62896 LD A,4 Call AddToScore to add 4 points to the score.
62898 CALL AddToScore
62901 JP Response_OK_Duplicate Jump to Response_OK_Duplicate.
Prev: 62788 Up: Map Next: 62904