| The Hobbit (v1.0) | Routines |
| Prev: 7578 | Up: Map | Next: 75A8 |
|
The main character output routine. It does nothing if 756B says printing is switched off.
If $B5F2 is set, the character goes to the lower (input) window via 75AD, which is how the player's own typing, and replies such as 'I don't know the word', appear down there. Otherwise it goes to the upper story window via 7694.
Then comes one of the game's jokes. If the flag at $B5F1 is set, every S (or s) printed in the story window is followed by an H. That flag is set when Bilbo drinks the wine (the wine's object record calls A9ED), and cleared five turns later by timer 7 (A9FF). So for a while after drinking, the game slurs: 'you drink shome wine. gandalf goesh easht.'
|
||||||||
| 7580 | CALL $756B | Printing switched off? | ||||||
| 7583 | RET Z | Return if the routine returned with Z set | ||||||
| 7584 | PUSH AF | Save AF | ||||||
| 7585 | LD A,($B5F2) | Input window or story window? | ||||||
| 7588 | AND A | Is A zero? | ||||||
| 7589 | JR NZ,$75AC | If it is not zero, go to Print a character in the input window (entry from 7580) (75AC) | ||||||
| 758B | POP AF | Restore AF | ||||||
| 758C | CALL $7694 | Call: Put a character on the screen (7694) | ||||||
| 758F | PUSH AF | Save AF | ||||||
| 7590 | LD A,($B5F1) | Has Bilbo been drinking? | ||||||
| 7593 | AND A | Is A zero? | ||||||
| 7594 | JR NZ,$7598 | If it is not zero, go to 7598 | ||||||
| 7596 | POP AF | Restore AF | ||||||
| 7597 | RET | Done | ||||||
| 7598 | POP AF | Restore AF | ||||||
| 7599 | CP $53 | If so, follow every S with an H | ||||||
| 759B | JR Z,$75A0 | If yes, go to 75A0 | ||||||
| 759D | CP $73 | Is it "s"? | ||||||
| 759F | RET NZ | Return if no | ||||||
| 75A0 | PUSH AF | Save AF | ||||||
| 75A1 | LD A,$48 | A = 72 | ||||||
| 75A3 | CALL $7694 | Call: Put a character on the screen (7694) | ||||||
| 75A6 | POP AF | Restore AF | ||||||
| 75A7 | RET | Done | ||||||
| Prev: 7578 | Up: Map | Next: 75A8 |