commit 21296bd

Devine Lu Linvega  ·  2024-11-13 16:48:04 +0000 UTC
parent 57e969e
Removed the screen debugger
1 files changed,  +0, -50
+0, -50
 1@@ -90,54 +90,6 @@ screen_change(int x1, int y1, int x2, int y2)
 2 	if(y2 > uxn_screen.y2) uxn_screen.y2 = y2;
 3 }
 4 
 5-/* clang-format off */
 6-
 7-static Uint8 icons[] = {
 8-	0x00, 0x7c, 0x82, 0x82, 0x82, 0x82, 0x82, 0x7c, 0x00, 0x30, 0x10, 0x10, 0x10, 0x10, 0x10, 
 9-	0x10, 0x00, 0x7c, 0x82, 0x02, 0x7c, 0x80, 0x80, 0xfe, 0x00, 0x7c, 0x82, 0x02, 0x1c, 0x02, 
10-	0x82, 0x7c, 0x00, 0x0c, 0x14, 0x24, 0x44, 0x84, 0xfe, 0x04, 0x00, 0xfe, 0x80, 0x80, 0x7c, 
11-	0x02, 0x82, 0x7c, 0x00, 0x7c, 0x82, 0x80, 0xfc, 0x82, 0x82, 0x7c, 0x00, 0x7c, 0x82, 0x02, 
12-	0x1e, 0x02, 0x02, 0x02, 0x00, 0x7c, 0x82, 0x82, 0x7c, 0x82, 0x82, 0x7c, 0x00, 0x7c, 0x82, 
13-	0x82, 0x7e, 0x02, 0x82, 0x7c, 0x00, 0x7c, 0x82, 0x02, 0x7e, 0x82, 0x82, 0x7e, 0x00, 0xfc, 
14-	0x82, 0x82, 0xfc, 0x82, 0x82, 0xfc, 0x00, 0x7c, 0x82, 0x80, 0x80, 0x80, 0x82, 0x7c, 0x00, 
15-	0xfc, 0x82, 0x82, 0x82, 0x82, 0x82, 0xfc, 0x00, 0x7c, 0x82, 0x80, 0xf0, 0x80, 0x82, 0x7c,
16-	0x00, 0x7c, 0x82, 0x80, 0xf0, 0x80, 0x80, 0x80 };
17-static Uint8 arrow[] = {
18-	0x00, 0x00, 0x00, 0xfe, 0x7c, 0x38, 0x10, 0x00 };
19-
20-/* clang-format on */
21-
22-static void
23-draw_byte(Uint8 b, Uint16 x, Uint16 y, Uint8 color)
24-{
25-	screen_1bpp(uxn_screen.fg, &icons[(b >> 4) << 3], x, y, color, 1, 1);
26-	screen_1bpp(uxn_screen.fg, &icons[(b & 0xf) << 3], x + 8, y, color, 1, 1);
27-	screen_change(x, y, x + 0x10, y + 0x8);
28-}
29-
30-static void
31-screen_debugger(void)
32-{
33-	int i;
34-	for(i = 0; i < 0x08; i++) {
35-		Uint8 pos = uxn.wst.ptr - 4 + i;
36-		Uint8 color = i > 4 ? 0x01 : !pos ? 0xc :
37-			i == 4                        ? 0x8 :
38-											0x2;
39-		draw_byte(uxn.wst.dat[pos], i * 0x18 + 0x8, uxn_screen.height - 0x18, color);
40-	}
41-	for(i = 0; i < 0x08; i++) {
42-		Uint8 pos = uxn.rst.ptr - 4 + i;
43-		Uint8 color = i > 4 ? 0x01 : !pos ? 0xc :
44-			i == 4                        ? 0x8 :
45-											0x2;
46-		draw_byte(uxn.rst.dat[pos], i * 0x18 + 0x8, uxn_screen.height - 0x10, color);
47-	}
48-	screen_1bpp(uxn_screen.fg, &arrow[0], 0x68, uxn_screen.height - 0x20, 3, 1, 1);
49-	for(i = 0; i < 0x20; i++)
50-		draw_byte(uxn.ram[i], (i & 0x7) * 0x18 + 0x8, ((i >> 3) << 3) + 0x8, 1 + !!uxn.ram[i]);
51-}
52-
53 void
54 screen_fill(Uint8 *layer, int color)
55 {
56@@ -215,8 +167,6 @@ screen_redraw(void)
57 	Uint32 palette[16], *pixels = uxn_screen.pixels;
58 	uxn_screen.x1 = uxn_screen.y1 = 9000;
59 	uxn_screen.x2 = uxn_screen.y2 = 0;
60-	if(uxn.dev[0x0e])
61-		screen_debugger();
62 	for(i = 0; i < 16; i++)
63 		palette[i] = uxn_screen.palette[(i >> 2) ? (i >> 2) : (i & 3)];
64 	for(y = y1; y < y2; y++) {