diff options
Diffstat (limited to 'applications/init')
-rw-r--r-- | applications/init/main.cpp | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/applications/init/main.cpp b/applications/init/main.cpp index 06a8203..57ebd02 100644 --- a/applications/init/main.cpp +++ b/applications/init/main.cpp @@ -15,7 +15,7 @@ int main(int, char **) { daguerre::image<daguerre::color24> img; - std::FILE *file = std::fopen("/assets/burdon.ppm", "r"); + std::FILE *file = std::fopen("/init/burdon.ppm", "r"); assert(file != 0); assert(daguerre::try_load_ppm(file, img)); std::fclose(file); @@ -30,6 +30,21 @@ int main(int, char **) { daguerre::copy_image(img, fb, 0, 0, x_off, y_off, width, height); + while (true) { + + uint32_t kp = _syscall_read_key_packet(); + if ((kp & 0x0400ff) == 0x04005a) { + for (unsigned y = 0; y < img.get_height(); ++y) + for (unsigned x = 0; x < img.get_width(); ++x) { + img.get(x, y).r = ~img.get(x, y).r; + img.get(x, y).g = ~img.get(x, y).g; + img.get(x, y).b = ~img.get(x, y).b; + } + daguerre::copy_image(img, fb, 0, 0, x_off, y_off, width, height); + } + + } + return 0; } |