Prev: D494 Up: Map Next: D4B8
D4A7: Work out the column count for a mirrored step far into the right edge
Used by the routine at slope_step_at_right_edge.
A step of a piece running left that starts at screen x $E0 or more. The displacement for the patched JR in blit_mirrored_right_clip is $29 less the byte advance's size, one less again unless the step is on a byte boundary: the JR at the end of this routine (whose displacement is copied here from the byte-boundary flag landscape_step_loop left in the JR at the end of slope_step_at_right_edge) skips the DEC A at use_mirrored_right_clip or not.
mirrored_slope_far_right D4A7 LD A,($D480) Copy the byte-boundary flag into the JR's displacement.
D4AA LD ($D4B7),A
D4AD LD A,(piece_dcolumn) A = $29 - size of the byte advance (negative for these directions).
D4B0 NEG
D4B2 LD B,A
D4B3 LD A,$29
D4B5 SUB B
mirrored_slope_far_right_0 D4B6 JR mirrored_slope_far_right_0 Patched: into use_mirrored_right_clip (DEC A) or past it.
Prev: D494 Up: Map Next: D4B8