aboutsummaryrefslogtreecommitdiff
path: root/src/graphics
diff options
context:
space:
mode:
authorChristian Cunningham <cc@localhost>2021-12-23 14:35:38 -0800
committerChristian Cunningham <cc@localhost>2021-12-23 14:35:38 -0800
commit599af82d6d264c84118cd9407dd03323f0a1cb38 (patch)
tree8da1ed2a4cfa51ff686844e4c4222203f7fb5319 /src/graphics
parent96f5bdd43e12c1c26e65e3a8e8d9ab0b95cd506e (diff)
Added Graphics Initialization Output
Diffstat (limited to 'src/graphics')
-rw-r--r--src/graphics/lfb.c3
-rw-r--r--src/graphics/lfb.h4
2 files changed, 6 insertions, 1 deletions
diff --git a/src/graphics/lfb.c b/src/graphics/lfb.c
index 5e307f4..5494dde 100644
--- a/src/graphics/lfb.c
+++ b/src/graphics/lfb.c
@@ -4,6 +4,7 @@
#include "../graphics/homer.h"
#include "../graphics/glyphs.h"
+#define GRAPHICS_LFB_C
unsigned int width, height, pitch, isrgb; /* dimensions and channel order */
unsigned char *lfb; /* raw frame buffer address */
@@ -79,7 +80,7 @@ void lfb_showpicture()
unsigned char *ptr=lfb;
char *data=homer_data, pixel[4];
- ptr += (height-homer_height)/2*pitch + (width-homer_width)*2;
+ ptr = lfb + (height-homer_height)*pitch + (width-homer_width)*4;
for(y=0;y<homer_height;y++) {
for(x=0;x<homer_width;x++) {
HEADER_PIXEL(data, pixel);
diff --git a/src/graphics/lfb.h b/src/graphics/lfb.h
index ac2e284..2361ec4 100644
--- a/src/graphics/lfb.h
+++ b/src/graphics/lfb.h
@@ -4,6 +4,10 @@
#define GG_MAX_X 128
#define GG_MAX_Y 96
+#ifndef GRAPHICS_LFB_C
+extern unsigned int width, height, pitch, isrgb; /* dimensions and channel order */
+#endif
+
void lfb_init();
void lfb_showpicture();