Routines |
Prev: 9F21 | Up: Map | Next: A01A |
This checks that the hero is in the specified room or camp bounds.
Used by the routine at in_permitted_area.
|
||||||||||||
in_permitted_area_end_bit | A007 | LD HL,$68A0 | Point HL at the global current room index | |||||||||
A00A | BIT 7,A | Was the permitted_route_ROOM flag set on entry? ($80) | ||||||||||
A00C | JR Z,end_bit_area | Jump if not | ||||||||||
A00E | AND $7F | Mask off the room flag | ||||||||||
A010 | CP (HL) | Does the specified room match the global current room index? | ||||||||||
A011 | RET | Return immediately with the result in flags | ||||||||||
end_bit_area | A012 | EX AF,AF' | Bank A | |||||||||
A013 | LD A,(HL) | Fetch the global current room index | ||||||||||
A014 | AND A | Is it room_0_OUTDOORS? (0) | ||||||||||
A015 | RET NZ | Return if not | ||||||||||
A016 | LD DE,$81B8 | Point DE at hero_map_position | ||||||||||
A019 | EX AF,AF' | Unbank A - restoring original A | ||||||||||
FALL THROUGH to within_camp_bounds.
|
Prev: 9F21 | Up: Map | Next: A01A |