c++/rgb-assembler/commands/Color.h
author František Kučera <franta-hg@frantovo.cz>
Sat, 23 Dec 2017 23:47:37 +0100
changeset 24 e24883b00180
parent 20 c++/rgb-assembler/commands/Goto.h@b9ceffdcaf14
child 29 10d6964e7b4a
permissions -rw-r--r--
COLOR in class
     1 #pragma once
     2 
     3 #include <wchar.h>
     4 
     5 #include "../Command.h"
     6 
     7 namespace commands {
     8 
     9 class Color : public Command {
    10 public:
    11 
    12 	void process(octet_t* memory, address_t& index) override {
    13 		led_t led = read<led_t>(memory, index);
    14 		color_t r = read<color_t>(memory, index);
    15 		color_t g = read<color_t>(memory, index);
    16 		color_t b = read<color_t>(memory, index);
    17 		wprintf(L"COLOR  %02X %02X %02X → %d\n", r, g, b, led);
    18 	}
    19 private:
    20 
    21 };
    22 
    23 }