1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-10-01 13:58:20 +00:00

Fix sections.

This commit is contained in:
Thomas Harte 2023-02-02 21:55:00 -05:00
parent ec227ce021
commit d41081c59f

View File

@ -108,10 +108,10 @@ struct Command {
}
};
// MARK: - Line drawing.
namespace Commands {
// MARK: - Line drawing.
/// Implements the LINE command, which is plain-old Bresenham.
///
/// Per Grauw timing is:
@ -173,6 +173,8 @@ struct Line: public Command {
int position_, numerator_, denominator_, duration_;
};
// MARK: - Single pixel manipulation.
/// Implements the PSET command, which plots a single pixel.
///
/// No timings are documented, so this'll output as quickly as possible.
@ -195,6 +197,10 @@ struct PointSet: public Command {
bool done_ = false;
};
// TODO: point.
// MARK: - Rectangular base.
/// Useful base class for anything that does logical work in a rectangle.
template <bool logical, bool include_source> struct Rectangle: public Command {
public:
@ -242,6 +248,8 @@ template <bool logical, bool include_source> struct Rectangle: public Command {
int start_x_ = 0, width_ = 0;
};
// MARK: - Rectangular manipulations; logical.
struct LogicalMoveFromCPU: public Rectangle<true, false> {
LogicalMoveFromCPU(CommandContext &context) : Rectangle(context) {
is_cpu_transfer = true;
@ -272,6 +280,8 @@ struct LogicalMoveFromCPU: public Rectangle<true, false> {
}
};
// MARK: - Rectangular manipulations; fast.
struct HighSpeedFill: public Rectangle<false, false> {
HighSpeedFill(CommandContext &context) : Rectangle(context) {
cycles = 56;