![]() |
Routines |
| Prev: F60A | Up: Map | Next: F6AA |
|
Used by the routine at JumpTable_PrintClipped.
Prints a clipped rectangular run of characters.
|
||||
| Print_Clipped | F662 | LD L,A | Keep the tile ID in L. | |
| F663 | LD A,E | Store the width in *Print_Width. | ||
| F664 | LD ($6416),A | |||
| Print_Clipped_Target | F667 | LD A,($6416) | Reload the remaining width from *Print_Width. | |
| F66A | LD E,A | |||
| F66B | LD A,($6419) | Jump to Print_Clipped_Branch if this row is inside *ClipWindow. | ||
| F66E | CP B | |||
| F66F | JR NC,Print_Clipped_Branch | |||
| Print_Clipped_Continue | F671 | DEC D | Skip down until the row is inside the clip window. | |
| F672 | RET Z | |||
| F673 | DEC B | |||
| F674 | CP B | |||
| F675 | JR NZ,Print_Clipped_Continue | |||
| Print_Clipped_Branch | F677 | LD A,($641A) | Return if this row is below *ClipWindow_MaximumRow. | |
| F67A | CP B | |||
| F67B | RET NC | |||
| F67C | LD A,($641C) | Return if this column is past *641C. | ||
| F67F | CP C | |||
| F680 | RET NC | |||
| F681 | PUSH BC | Stash the position on the stack. | ||
| F682 | LD A,($641B) | Jump to Print_Clipped_Branch3 if this column is inside *ClipWindow_MinimumColumn. | ||
| F685 | CP C | |||
| F686 | JR NC,Print_Clipped_Branch3 | |||
| Print_Clipped_Branch2 | F688 | DEC E | Skip left until the column is inside the clip window. | |
| F689 | JR Z,Print_Clipped_Skip | |||
| F68B | DEC C | |||
| F68C | CP C | |||
| F68D | JR C,Print_Clipped_Branch2 | |||
| Print_Clipped_Branch3 | F68F | PUSH BC | Copy BC to the shadow registers (using the stack). | |
| F690 | EXX | |||
| F691 | POP BC | |||
| F692 | CALL Convert_Coordinate | Call Convert_Coordinate. | ||
| F695 | EXX | Switch back. | ||
| F696 | LD A,L | A=the tile ID. | ||
| F697 | CALL Write_Tile | Call Write_Tile. | ||
| F69A | DEC C | Move left one column and loop back to Print_Clipped_Branch3 until the row is done. | ||
| F69B | LD A,($641C) | |||
| F69E | CP C | |||
| F69F | JR NC,Print_Clipped_Skip | |||
| F6A1 | DEC E | |||
| F6A2 | JR NZ,Print_Clipped_Branch3 | |||
| Print_Clipped_Skip | F6A4 | POP BC | Restore the position from the stack. | |
| F6A5 | DEC D | Return if the remaining height is zero. | ||
| F6A6 | RET Z | |||
| F6A7 | DEC B | Move up one row. | ||
| F6A8 | JR Print_Clipped_Target | Jump to Print_Clipped_Target. | ||
| Prev: F60A | Up: Map | Next: F6AA |