mirror of
https://github.com/TomHarte/CLK.git
synced 2025-02-21 05:29:13 +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;
|
default: Storage<personality>::command_ = nullptr;
|
||||||
|
|
||||||
case 0b0000: break; // TODO: stop.
|
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 0b0101: break; // TODO: pset.
|
||||||
case 0b0110: break; // TODO: srch.
|
case 0b0110: break; // TODO: srch.
|
||||||
case 0b0111:
|
case 0b0111:
|
||||||
|
@ -63,7 +63,7 @@ struct Command {
|
|||||||
virtual bool done() = 0;
|
virtual bool done() = 0;
|
||||||
|
|
||||||
/// Repopulates the fields above with the next action to take.
|
/// Repopulates the fields above with the next action to take.
|
||||||
virtual void advance() = 0;
|
virtual void advance() {}
|
||||||
};
|
};
|
||||||
|
|
||||||
// MARK: - Line drawing.
|
// MARK: - Line drawing.
|
||||||
@ -125,6 +125,19 @@ struct Line: public Command {
|
|||||||
Vector major_, minor_;
|
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…
x
Reference in New Issue
Block a user