More formatting updates. Reduced whitespace, looks even better.
This commit is contained in:
@@ -9,7 +9,6 @@
|
||||
#include "lcd.h"
|
||||
#include "debug.h"
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
////////////////////// For Debugging Output //////////////////////////////
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
@@ -17,7 +16,6 @@
|
||||
// TODO: somehow allow access to the driver->framebuffer to each
|
||||
// function...
|
||||
|
||||
|
||||
int
|
||||
debug_init (struct lcd_logical_driver *driver, char *args)
|
||||
{
|
||||
@@ -28,7 +26,6 @@ debug_init (struct lcd_logical_driver *driver, char *args)
|
||||
driver->framebuf = malloc (lcd.wid * lcd.hgt);
|
||||
}
|
||||
|
||||
|
||||
if (!driver->framebuf) {
|
||||
debug_close ();
|
||||
return -1;
|
||||
@@ -61,7 +58,6 @@ debug_init (struct lcd_logical_driver *driver, char *args)
|
||||
|
||||
driver->getkey = debug_getkey;
|
||||
|
||||
|
||||
return 200; // 200 is arbitrary. (must be 1 or more)
|
||||
}
|
||||
|
||||
@@ -70,7 +66,6 @@ debug_close ()
|
||||
{
|
||||
// Ack! This shouldn't crash the program, but does.. Why??
|
||||
|
||||
|
||||
printf ("debug_close()\n");
|
||||
|
||||
// This is the line which crashes.
|
||||
@@ -95,7 +90,6 @@ debug_clear ()
|
||||
|
||||
}
|
||||
|
||||
|
||||
//////////////////////////////////////////////////////////////////
|
||||
// Flushes all output to the lcd...
|
||||
//
|
||||
@@ -107,7 +101,6 @@ debug_flush ()
|
||||
lcd.draw_frame ();
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Prints a string on the lcd display, at position (x,y). The
|
||||
// upper-left is (1,1), and the lower right should be (20,4).
|
||||
@@ -120,7 +113,6 @@ debug_string (int x, int y, char string[])
|
||||
|
||||
printf ("string(%i, %i):%s \n", x, y, string);
|
||||
|
||||
|
||||
x -= 1; // Convert 1-based coords to 0-based...
|
||||
y -= 1;
|
||||
|
||||
@@ -138,15 +130,12 @@ debug_chr (int x, int y, char c)
|
||||
{
|
||||
printf ("character(%i, %i):%c\n", x, y, c);
|
||||
|
||||
|
||||
y--;
|
||||
x--;
|
||||
|
||||
lcd.framebuf[(y * lcd.wid) + x] = c;
|
||||
}
|
||||
|
||||
|
||||
|
||||
void
|
||||
debug_contrast (int contrast)
|
||||
{
|
||||
@@ -203,7 +192,6 @@ debug_vbar (int x, int len)
|
||||
|
||||
printf ("Vbar(%i, %i)\n", x, len);
|
||||
|
||||
|
||||
for (y = lcd.hgt; y > 0 && len > 0; y--) {
|
||||
debug_chr (x, y, '|');
|
||||
|
||||
@@ -220,7 +208,6 @@ debug_hbar (int x, int y, int len)
|
||||
{
|
||||
printf ("Hbar(%i, %i, %i)\n", x, y, len);
|
||||
|
||||
|
||||
for (; x < lcd.wid && len > 0; x++) {
|
||||
debug_chr (x, y, '-');
|
||||
|
||||
@@ -229,7 +216,6 @@ debug_hbar (int x, int y, int len)
|
||||
|
||||
}
|
||||
|
||||
|
||||
/////////////////////////////////////////////////////////////////
|
||||
// Sets character 0 to an icon...
|
||||
//
|
||||
@@ -239,18 +225,15 @@ debug_icon (int which, char dest)
|
||||
printf ("Char %i is icon %i\n", dest, which);
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
debug_flush_box (int lft, int top, int rgt, int bot)
|
||||
{
|
||||
printf ("Flush Box(%i, %i)-(%i, %i)\n", lft, top, rgt, bot);
|
||||
|
||||
|
||||
debug_flush ();
|
||||
|
||||
}
|
||||
|
||||
|
||||
void
|
||||
debug_draw_frame (char *dat)
|
||||
{
|
||||
@@ -260,7 +243,6 @@ debug_draw_frame (char *dat)
|
||||
|
||||
printf ("draw_frame()\n");
|
||||
|
||||
|
||||
if (!dat)
|
||||
return;
|
||||
|
||||
@@ -272,7 +254,6 @@ debug_draw_frame (char *dat)
|
||||
out[lcd.wid] = 0;
|
||||
printf ("+%s+\n", out);
|
||||
|
||||
|
||||
for (i = 0; i < lcd.hgt; i++) {
|
||||
for (j = 0; j < lcd.wid; j++) {
|
||||
out[j] = dat[j + (i * lcd.wid)];
|
||||
@@ -290,7 +271,6 @@ debug_draw_frame (char *dat)
|
||||
|
||||
}
|
||||
|
||||
|
||||
char
|
||||
debug_getkey ()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user