Prev: CEC8 Up: Map Next: CF14
CEDB: A column on the view's left or right edge
Used by the routine at landscape_step_loop.
From landscape_step_loop when the edge flags hold just bit 2 or 3. For a slope going the way that matters for its tile (right in the upper tiles, left in the lower), the piece is cut to at most two more steps (C). The first such column of the piece takes its screen position (step_screen_address) and clears +1 of the piece state; every one is counted in piece_steps_done and clipped_columns by after_step_drawn and is not drawn here.
edge_column CEDB LD A,(piece_dx_copy) A slope going the right way: no more than two more steps.
CEDE AND A
CEDF JR Z,edge_column_2
CEE1 LD A,(ground_cell)
CEE4 BIT 1,A
CEE6 JR NZ,edge_column_1
CEE8 LD A,(direction_flag)
CEEB CP $01
CEED JR NZ,edge_column_2
edge_column_0 CEEF LD A,C
CEF0 CP $02
CEF2 JR C,edge_column_2
CEF4 LD C,$02
CEF6 JR edge_column_2
edge_column_1 CEF8 LD A,(direction_flag)
CEFB CP $FF
CEFD JR NZ,edge_column_2
CEFF JR edge_column_0
edge_column_2 CF01 LD A,(piece_steps_done) Not the first: count it.
CF04 AND A
CF05 JP NZ,after_step_drawn_1
CF08 EXX The first: its screen position; then count it.
CF09 CALL step_screen_address
CF0C XOR A
CF0D LD (IX+$01),A
CF10 EXX
CF11 JP after_step_drawn_1
Prev: CEC8 Up: Map Next: CF14