fix color to use argb

This commit is contained in:
Murphy 2023-04-24 16:01:22 -04:00
parent 3c25e6a318
commit 7585a93491

View file

@ -116,21 +116,13 @@ void render(Screen* screen, const Camera* camera) {
uint32_t color;
switch (hit) {
case 1: color = 0xFF0000FF; break;
case 1: color = 0xFFFF0000; break;
case 2: color = 0xFF00FF00; break;
case 3: color = 0xFFFF0000; break;
case 3: color = 0xFF0000FF; break;
case 4: color = 0xFFFF00FF; break;
case 5: color = 0xFFFFFF00; break;
case 5: color = 0xFF00FFFF; break;
default: color = 0xFF000000; break;
}
// switch (hit) {
// case 1: color = 0xFF0000FF; break;
// case 2: color = 0x00FF00FF; break;
// case 3: color = 0x0000FFFF; break;
// case 4: color = 0xFF00FFFF; break;
// case 5: color = 0x00FFFFFF; break;
// default: color = 0x000000FF; break;
// }
const int
h = (int) (swapchain->height / len),
@ -140,10 +132,6 @@ void render(Screen* screen, const Camera* camera) {
verline(swapchain, x, 0, y0, 0xFF202020);
verline(swapchain, x, y0, y1, color);
verline(swapchain, x, y1, swapchain->height - 1, 0xFF505050);
// verline(screen, x, 0, y0, 0x202020FF);
// verline(screen, x, y0, y1, color);
// verline(screen, x, y1, screen->height - 1, 0x505050FF);
}
swapchain_submit(swapchain);