![]() |
Routines |
| Prev: A289 | Up: Map | Next: A33F |
|
This makes the hero and the six other prisoners finish breakfast.
Used by the routine at event_breakfast_time.
|
||||
| end_of_breakfast | A2E2 | LD A,($A137) | If the hero's not at breakfast, jump forward (note: it could jump one instruction later instead) | |
| A2E5 | AND A | |||
| A2E6 | JP Z,end_of_breakfast_0 | |||
| A2E9 | LD HL,$800F | Set the hero's vischar position to (52,62) | ||
| A2EC | LD (HL),$34 | |||
| A2EE | INC L | |||
| A2EF | INC L | |||
| A2F0 | LD (HL),$3E | |||
| end_of_breakfast_0 | A2F2 | XOR A | Clear the 'at breakfast' flag | |
| A2F3 | LD ($A137),A | |||
| A2F6 | LD BC,$9003 | Set the hero's route to (REVERSED routeindex_16_BREAKFAST_25, 3) | ||
| A2F9 | CALL set_hero_route | |||
|
Position all six prisoners.
|
||||
| A2FC | LD HL,$769F | Point HL at characterstruct 20's room field (character 20 is the first of the prisoners) | ||
| A2FF | LD DE,$0007 | Prepare the characterstruct stride | ||
| A302 | LD A,$19 | Prepare room_25_MESS_HALL | ||
| A304 | LD B,$03 | Do the first three prisoner characters | ||
|
Start loop
|
||||
| end_of_breakfast_1 | A306 | LD (HL),A | Set this characterstruct's room to room_25_MESS_HALL | |
| A307 | ADD HL,DE | Advance to the next characterstruct | ||
| A308 | DJNZ end_of_breakfast_1 | ...loop | ||
| A30A | LD A,$17 | Prepare room_23_MESS_HALL | ||
| A30C | LD B,$03 | Do the second three prisoner characters | ||
|
Start loop
|
||||
| end_of_breakfast_2 | A30E | LD (HL),A | Set this characterstruct's room to room_23_MESS_HALL | |
| A30F | ADD HL,DE | Advance to the next characterstruct | ||
| A310 | DJNZ end_of_breakfast_2 | ...loop | ||
| A312 | LD A,$90 | Set initial route index in A'. This gets incremented by set_prisoners_and_guards_route_B for every route it assigns | ||
| A314 | EX AF,AF' | |||
| A315 | LD C,$03 | Set route step to 3 | ||
| A317 | CALL set_prisoners_and_guards_route_B | Set the routes of all characters in prisoners_and_guards | ||
|
Update all the benches to be empty.
|
||||
| A31A | LD A,$0D | Prepare interiorobject_EMPTY_BENCH | ||
| A31C | LD ($6F17),A | Set room definition 23's bench_A object to interiorobject_EMPTY_BENCH | ||
| A31F | LD ($6F1A),A | Set room definition 23's bench_B object to interiorobject_EMPTY_BENCH | ||
| A322 | LD ($6F1D),A | Set room definition 23's bench_C object to interiorobject_EMPTY_BENCH | ||
| A325 | LD ($6F4F),A | Set room definition 25's bench_D object to interiorobject_EMPTY_BENCH | ||
| A328 | LD ($6F52),A | Set room definition 25's bench_E object to interiorobject_EMPTY_BENCH | ||
| A32B | LD ($6F55),A | Set room definition 25's bench_F object to interiorobject_EMPTY_BENCH | ||
| A32E | LD ($6F58),A | Set room definition 25's bench_G object to interiorobject_EMPTY_BENCH | ||
| A331 | LD A,($68A0) | If the global current room index is outdoors, or a tunnel room then return | ||
| A334 | AND A | |||
| A335 | RET Z | |||
| A336 | CP $1D | |||
| A338 | RET NC | |||
| A339 | CALL setup_room | Expand out the room definition for room_index | ||
| A33C | JP plot_interior_tiles | Render visible tiles array into the screen buffer and exit via (note: different to wake_up's end) | ||
| Prev: A289 | Up: Map | Next: A33F |