1
0
mirror of https://github.com/TomHarte/CLK.git synced 2024-06-25 18:30:07 +00:00

Implement point.

This commit is contained in:
Thomas Harte 2023-01-26 21:52:41 -05:00
parent 66ac089cc2
commit 515fa22bfe
2 changed files with 17 additions and 2 deletions

View File

@ -849,7 +849,9 @@ void Base<personality>::commit_register(int reg, uint8_t value) {
default: Storage<personality>::command_ = nullptr;
case 0b0000: break; // TODO: stop.
case 0b0100: break; // TODO: point.
case 0b0100:
Storage<personality>::command_ = std::make_unique<Commands::Point>(Storage<personality>::command_context_);
break;
case 0b0101: break; // TODO: pset.
case 0b0110: break; // TODO: srch.
case 0b0111:

View File

@ -63,7 +63,7 @@ struct Command {
virtual bool done() = 0;
/// Repopulates the fields above with the next action to take.
virtual void advance() = 0;
virtual void advance() {}
};
// MARK: - Line drawing.
@ -125,6 +125,19 @@ struct Line: public Command {
Vector major_, minor_;
};
struct Point: public Command {
public:
Point(CommandContext &context) : Command(context) {
cycles = 0;
access = AccessType::PlotPoint;
location = context.destination;
}
bool done() final {
return true;
}
};
}
}
}