mirror of
https://github.com/TomHarte/CLK.git
synced 2025-01-12 15:31:09 +00:00
Merge pull request #1068 from TomHarte/HAM
HAM: correct red/blue confusion.
This commit is contained in:
commit
52c3e0592a
@ -44,7 +44,7 @@ template <typename Performer> struct TaskQueueStorage {
|
||||
};
|
||||
|
||||
/// An implementation detail; provides a no-op implementation of time advances for TaskQueues without a Performer.
|
||||
template <> struct TaskQueueStorage<int> {
|
||||
template <> struct TaskQueueStorage<void> {
|
||||
TaskQueueStorage() {}
|
||||
|
||||
protected:
|
||||
@ -65,7 +65,7 @@ template <> struct TaskQueueStorage<int> {
|
||||
with the arguments supplied to TaskQueue's constructor, and that class will receive calls of the
|
||||
form @c .perform(nanos) to update it to every batch of new actions.
|
||||
*/
|
||||
template <bool perform_automatically, typename Performer = int> class TaskQueue: public TaskQueueStorage<Performer> {
|
||||
template <bool perform_automatically, typename Performer = void> class TaskQueue: public TaskQueueStorage<Performer> {
|
||||
public:
|
||||
template <typename... Args> TaskQueue(Args&&... args) :
|
||||
TaskQueueStorage<Performer>(std::forward<Args>(args)...),
|
||||
|
@ -102,17 +102,17 @@ void Chipset::apply_ham(uint8_t modification) {
|
||||
case 0x00: // Direct palette lookup.
|
||||
last_colour_ = swizzled_palette_[modification & 0x1b];
|
||||
break;
|
||||
case 0x04: // Replace red.
|
||||
colour[0] = uint8_t(
|
||||
case 0x04: // Replace blue.
|
||||
colour[1] = uint8_t(
|
||||
(colour[1] & 0xf0) |
|
||||
((modification & 0x10) >> 1) | // bit 3.
|
||||
((modification & 0x02) << 1) | // bit 2.
|
||||
((modification & 0x08) >> 2) | // bit 1.
|
||||
(modification & 0x01) // bit 0.
|
||||
);
|
||||
break;
|
||||
case 0x20: // Replace blue.
|
||||
colour[1] = uint8_t(
|
||||
(colour[1] & 0xf0) |
|
||||
case 0x20: // Replace red.
|
||||
colour[0] = uint8_t(
|
||||
((modification & 0x10) >> 1) | // bit 3.
|
||||
((modification & 0x02) << 1) | // bit 2.
|
||||
((modification & 0x08) >> 2) | // bit 1.
|
||||
|
Loading…
x
Reference in New Issue
Block a user