Prev: F544 Up: Map Next: F5B8
F57B: Process: Place Ladder Against Platform
Process_PlaceLadderAgainstPlatform F57B LD HL,$E3C5 Call CheckItemGroupPresent with Data_ItemGroup_Ladder.
F57E 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.".
F581 CP $5E Jump to Response_YouveDoneThatAlready if either of "A ladder,leading upward" or "A ladder,leading down" are in the current room.
F583 JP Z,Response_YouveDoneThatAlready
F586 CP $5C
F588 JP Z,Response_YouveDoneThatAlready
This doesn't need to happen...
F58B CALL IsPlayerCarryingItem Call IsPlayerCarryingItem.
F58E LD A,$5A Call Handler_DestroyItemEvent with item 5A: "A ladder".
F590 CALL Handler_DestroyItemEvent
F593 LD A,$5E Call Handler_UpdateItemEventCurrentRoom with item 5E: "A ladder,leading upward".
F595 CALL Handler_UpdateItemEventCurrentRoom
The ladder has been used so handle the inventory count.
F598 LD HL,$A790 Decrease *Count_InventoryItems by one.
F59B DEC (HL)
F59C LD A,$60 Write 60 to *E96A.
F59E LD ($E96A),A
F5A1 LD A,$63 Write 63 to *E959.
F5A3 LD ($E959),A
F5A6 LD HL,$A76C Jump to Response_OK_Duplicate if bit 6 of *Flag_GameStates_01 is set.
F5A9 BIT 6,(HL)
F5AB JP NZ,Response_OK_Duplicate
F5AE SET 6,(HL) Set bit 6 of *HL which relates to placing the ladder.
F5B0 LD A,$04 Call AddToScore to add 04 points to the score.
F5B2 CALL AddToScore
F5B5 JP Response_OK_Duplicate Jump to Response_OK_Duplicate.
Prev: F544 Up: Map Next: F5B8