Implement color based debugging
This commit is contained in:
22
src/Library/internal-include/BootLoader/color_debug.hpp
Normal file
22
src/Library/internal-include/BootLoader/color_debug.hpp
Normal file
@@ -0,0 +1,22 @@
|
||||
#pragma once
|
||||
#include "../GPU/gpu_internal.hpp"
|
||||
#include <stdio.h>
|
||||
|
||||
namespace JabyEngine {
|
||||
#define __debug_boot_color_at(color, diag) { \
|
||||
::JabyEngine::GPU::internal::quick_fill_fast(color, {{diag*64, diag*64}, {64, 64}}); \
|
||||
}
|
||||
|
||||
#define __debug_boot_print_at(color, diag, ...) { \
|
||||
__debug_boot_color_at(color, diag); \
|
||||
printf(__VA_ARGS__); \
|
||||
}
|
||||
|
||||
#define __debug_boot_color0(color) __debug_boot_color_at(color, 0)
|
||||
#define __debug_boot_color1(color) __debug_boot_color_at(color, 1)
|
||||
#define __debug_boot_color2(color) __debug_boot_color_at(color, 2)
|
||||
|
||||
#define __debug_boot_print0(color, ...) __debug_boot_print_at(color, 0, __VA_ARGS__)
|
||||
#define __debug_boot_print1(color, ...) __debug_boot_print_at(color, 1, __VA_ARGS__)
|
||||
#define __debug_boot_print2(color, ...) __debug_boot_print_at(color, 2, __VA_ARGS__)
|
||||
}
|
||||
Reference in New Issue
Block a user