Routines |
Prev: A404 | Up: Map | Next: A444 |
This makes a character disappear when it sits down and updates the room definition to show them sitting.
Used by the routine at character_event.
|
||||||||||
character_sits | A420 | PUSH AF | Save the route index | |||||||
A421 | EX DE,HL | Move the route pointer into DE for the common part later | ||||||||
A422 | SUB $12 | Bias the route index by 18 | ||||||||
A424 | LD HL,$6F4F | Point HL at room definition 25's bench_D | ||||||||
A427 | CP $03 | Is A equal to two or lower? Jump if so | ||||||||
A429 | JR C,character_sits_0 | |||||||||
A42B | LD HL,$6F17 | Point HL at room definition 23's bench_A | ||||||||
A42E | SUB $03 | Bias... | ||||||||
Poke object.
|
||||||||||
character_sits_0 | A430 | LD C,A | Triple A | |||||||
A431 | ADD A,A | |||||||||
A432 | ADD A,C | |||||||||
A433 | LD B,$00 | Move it into BC | ||||||||
A435 | LD C,A | |||||||||
A436 | ADD HL,BC | Point to the required object | ||||||||
A437 | LD (HL),$05 | Set the object at HL to interiorobject_PRISONER_SAT_MID_TABLE ($05) | ||||||||
A439 | POP AF | Restore the route index | ||||||||
A43A | LD C,$19 | Room is room_25_MESS_HALL | ||||||||
A43C | CP $15 | Is the route index less than routeindex_21_PRISONER_SITS_1? | ||||||||
A43E | JR C,character_sit_sleep_common | Jump if so | ||||||||
A440 | LD C,$17 | Otherwise room is room_23_MESS_HALL | ||||||||
A442 | JR character_sit_sleep_common | Jump to character_sit_sleep_common |
Prev: A404 | Up: Map | Next: A444 |