| The Hobbit (v1.0) | Routines |
| Prev: 8149 | Up: Map | Next: 8185 |
|
HELP gives a hint that depends on where Bilbo is. His room is looked up in the table at 8185; if it is there, that message is printed, otherwise the general one at B358: 'you're doing fine.' The message goes to the lower window. HELP is ignored if a character is the actor (for example inside SAY TO).
|
||||
| 8158 | LD A,($B5DB) | Is the current actor Bilbo, not a character (e.g. during SAY TO)? | ||
| 815B | AND A | |||
| 815C | JP NZ,$7C7E | Not Bilbo: ignore HELP entirely and carry on parsing | ||
| 815F | PUSH HL | Save HL and IX | ||
| 8160 | PUSH IX | |||
| 8162 | LD HL,$B358 | "you're doing fine." - the general hint | ||
| 8165 | LD A,($C01B) | A = Bilbo's own room | ||
| 8168 | LD IX,$8185 | Is there a specific hint for this room? | ||
| 816C | CALL $9D12 | |||
| 816F | JR Z,$8177 | No: keep the general hint | ||
| 8171 | LD L,(IX+$01) | Yes: HL = that room's own hint instead | ||
| 8174 | LD H,(IX+$02) | |||
| 8177 | LD A,$01 | Print it in the lower window | ||
| 8179 | LD ($B5F2),A | |||
| 817C | CALL $72D4 | |||
| 817F | POP IX | Restore IX and HL | ||
| 8181 | POP HL | |||
| 8182 | JP $806B | Carry on parsing | ||
| Prev: 8149 | Up: Map | Next: 8185 |