mirror of
https://github.com/TomHarte/CLK.git
synced 2024-12-27 01:31:42 +00:00
Implement point.
This commit is contained in:
parent
66ac089cc2
commit
515fa22bfe
@ -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:
|
||||
|
@ -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;
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user