![]() |
Routines |
| Prev: F5B6 | Up: Map | Next: F68C |
|
Open the named door, gate or chest.
|
||||
| Action_Open | F5F1 | CALL Parser_ValidateDirectObject | Call Parser_ValidateDirectObject. | |
| F5F4 | RET C | Return if the direct object is malformed. | ||
|
Was the player trying to open ... the door?
|
||||
| F5F5 | LD HL,$E8EA | Call Parser_AdvanceToSeparator with E8EA. | ||
| F5F8 | CALL Parser_AdvanceToSeparator | |||
| F5FB | JP NZ,Validate_Open_Chest | Jump to Validate_Open_Chest if the token isn't for the door. | ||
| F5FE | LD HL,$E797 | Call Parser_SkipToken with E797. | ||
| F601 | CALL Parser_SkipToken | |||
| F604 | BIT 0,A | Jump to Open_CheckRoom if the named door is closed. | ||
| F606 | JR Z,Open_CheckRoom | |||
|
Print "It's already open.".
|
||||
| F608 | LD HL,$E172 | HL=Messaging_ItsAlreadyOpen. | ||
| F60B | JP PrintResponse | Jump to PrintResponse. | ||
|
Which door is the player opening?
|
||||
| Open_CheckRoom | F60E | LD A,($BA9B) | Jump to Open_Farmhouse if *CurrentRoom is room 02: " Inside the Farmhouse". | |
| F611 | CP $02 | |||
| F613 | JR Z,Open_Farmhouse | |||
| F615 | CP $03 | Jump to Open_CheckWoodmansHut if *CurrentRoom isn't room 03: " At a large Farmhouse". | ||
| F617 | JR NZ,Open_CheckWoodmansHut | |||
|
Change the farmhouse door states!
|
||||
| Open_Farmhouse | F619 | LD BC,$3635 | Call TransformItem to transform "A closed door" into "An open door". | |
| F61C | CALL TransformItem | |||
| F61F | LD BC,$3837 | Call TransformItem to transform "A closed door" into "An open door". | ||
| F622 | CALL TransformItem | |||
|
This action changes the map:
|
||||
| F625 | LD A,$03 | Write 03 to *Exit_FarmhouseSouth to open up southbound access to At a large Farmhouse from Inside the Farmhouse. | ||
| F627 | LD ($E941),A | |||
| F62A | JP Response_OK_GameLoop | Jump to Response_OK_GameLoop. | ||
|
Is the player at the Woodman's Hut?
|
||||
| Open_CheckWoodmansHut | F62D | CP $0F | Jump to Open_WoodmansHut if *CurrentRoom is room 0F: " At the Woodman's Hut". | |
| F62F | JR Z,Open_WoodmansHut | |||
| F631 | CP $10 | Jump to Open_CheckWitchsHovel if *CurrentRoom isn't room 10: " Inside the Woodman's Hut". | ||
| F633 | JR NZ,Open_CheckWitchsHovel | |||
|
Change the Woodman's Hut door states!
|
||||
| Open_WoodmansHut | F635 | LD BC,$3A39 | Call TransformItem to transform "A closed door" into "An open door". | |
| F638 | CALL TransformItem | |||
| F63B | LD BC,$3C3B | Call TransformItem to transform "A closed door" into "An open door". | ||
| F63E | CALL TransformItem | |||
|
This action changes the map:
|
||||
| F641 | LD A,$0F | Write 0F to *Exit_WoodmansHutEast to open up eastbound access to At the Woodman's Hut from Inside the Woodman's Hut. | ||
| F643 | LD ($E996),A | |||
| F646 | JP Response_OK_GameLoop | Jump to Response_OK_GameLoop. | ||
|
Is the player at the Witch's Hovel?
|
||||
| Open_CheckWitchsHovel | F649 | CP $3C | Jump to Open_WitchsHovel if *CurrentRoom is room 3C: " At the Witch's Hovel". | |
| F64B | JR Z,Open_WitchsHovel | |||
| F64D | CP $3D | Jump to Validate_Open_Chest if *CurrentRoom isn't room 3D: " Inside the Witch's Hovel". | ||
| F64F | JR NZ,Validate_Open_Chest | |||
|
Change the Witch's Hovel door states!
|
||||
| Open_WitchsHovel | F651 | LD BC,$3E3D | Call TransformItem to transform "A closed door" into "An open door". | |
| F654 | CALL TransformItem | |||
| F657 | LD BC,$403F | Call TransformItem to transform "A closed door" into "An open door". | ||
| F65A | CALL TransformItem | |||
|
This action changes the map:
|
||||
| F65D | LD A,$3C | Write 3C to *Exit_WitchsHovelEast to open up eastbound access to At the Witch's Hovel from Inside the Witch's Hovel. | ||
| F65F | LD ($EAA4),A | |||
| F662 | JP Response_OK_GameLoop | Jump to Response_OK_GameLoop. | ||
|
Was the player trying to open ... the chest?
|
||||
| Validate_Open_Chest | F665 | LD HL,$E814 | Call Parser_AdvanceToSeparator with E814. | |
| F668 | CALL Parser_AdvanceToSeparator | |||
| F66B | JR NZ,Open_YouCant | Jump to Open_YouCant if the token isn't for the chest. | ||
| F66D | LD A,$0B | Jump to Response_YouCantItsLocked if ValidateItemPresent reports that "A chest" is in the current room. | ||
| F66F | CALL ValidateItemPresent | |||
| F672 | JP Z,Response_YouCantItsLocked | |||
| F675 | LD A,$0C | Jump to Response_ItsAlreadyOpen if ValidateItemPresent reports that "A closed chest" isn't in the current room. | ||
| F677 | CALL ValidateItemPresent | |||
| F67A | JP NZ,Response_ItsAlreadyOpen | |||
| F67D | LD BC,$0C0D | Call TransformItem to transform "A closed chest" into "An open chest containing the Crystals of Vulcan". | ||
| F680 | CALL TransformItem | |||
|
Print "You open the chest,revealing
the Crystals of Vulcan,within.".
|
||||
| F683 | LD HL,$D608 | HL=Messaging_YouOpenTheChestRevealing. | ||
| F686 | JP PrintResponse | Jump to PrintResponse. | ||
|
Nothing else is valid.
|
||||
| Open_YouCant | F689 | JP Response_YouCant_GameLoop | Jump to Response_YouCant_GameLoop. | |
|
View the equivalent code in;
|
||||
| Prev: F5B6 | Up: Map | Next: F68C |