Prev: 62986 Up: Map Next: 63146
63074: Print Clipped
Used by the routine at JumpTable_PrintClipped.
Prints a clipped rectangular run of characters.
Print_Clipped 63074 LD L,A Keep the tile ID in L.
63075 LD A,E Store the width in *Print_Width.
63076 LD (25622),A
Print_Clipped_Target 63079 LD A,(25622) Reload the remaining width from *Print_Width.
63082 LD E,A
63083 LD A,(25625) Jump to Print_Clipped_Branch if this row is inside *ClipWindow.
63086 CP B
63087 JR NC,Print_Clipped_Branch
Print_Clipped_Continue 63089 DEC D Skip down until the row is inside the clip window.
63090 RET Z
63091 DEC B
63092 CP B
63093 JR NZ,Print_Clipped_Continue
Print_Clipped_Branch 63095 LD A,(25626) Return if this row is below *ClipWindow_MaximumRow.
63098 CP B
63099 RET NC
63100 LD A,(25628) Return if this column is past *25628.
63103 CP C
63104 RET NC
63105 PUSH BC Stash the position on the stack.
63106 LD A,(25627) Jump to Print_Clipped_Branch3 if this column is inside *ClipWindow_MinimumColumn.
63109 CP C
63110 JR NC,Print_Clipped_Branch3
Print_Clipped_Branch2 63112 DEC E Skip left until the column is inside the clip window.
63113 JR Z,Print_Clipped_Skip
63115 DEC C
63116 CP C
63117 JR C,Print_Clipped_Branch2
Print_Clipped_Branch3 63119 PUSH BC Copy BC to the shadow registers (using the stack).
63120 EXX
63121 POP BC
63122 CALL Convert_Coordinate Call Convert_Coordinate.
63125 EXX Switch back.
63126 LD A,L A=the tile ID.
63127 CALL Write_Tile Call Write_Tile.
63130 DEC C Move left one column and loop back to Print_Clipped_Branch3 until the row is done.
63131 LD A,(25628)
63134 CP C
63135 JR NC,Print_Clipped_Skip
63137 DEC E
63138 JR NZ,Print_Clipped_Branch3
Print_Clipped_Skip 63140 POP BC Restore the position from the stack.
63141 DEC D Return if the remaining height is zero.
63142 RET Z
63143 DEC B Move up one row.
63144 JR Print_Clipped_Target Jump to Print_Clipped_Target.
Prev: 62986 Up: Map Next: 63146