summaryrefslogtreecommitdiff
path: root/stage3/gfx.c
diff options
context:
space:
mode:
authorLizzy Fleckenstein <eliasfleckenstein@web.de>2022-10-07 16:42:35 +0200
committerLizzy Fleckenstein <eliasfleckenstein@web.de>2022-10-07 16:42:35 +0200
commit1155e97dab101fd1215e12ff8737048b0f6bedaf (patch)
tree91ac7806d9c39593a5c6972e9fe02fa6fbb882b0 /stage3/gfx.c
parentf8397815545adb7d0da36614e0065aa68453a2e4 (diff)
downloadcuddles-1155e97dab101fd1215e12ff8737048b0f6bedaf.tar.xz
Font rendering
Diffstat (limited to 'stage3/gfx.c')
-rw-r--r--stage3/gfx.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/stage3/gfx.c b/stage3/gfx.c
index 0ecf423..2afc766 100644
--- a/stage3/gfx.c
+++ b/stage3/gfx.c
@@ -1,6 +1,6 @@
#include "gfx.h"
-struct GfxInfo *gfxinfo = (void *) (0x1000-10);
+struct GfxInfo *gfx_info = (void *) (0x1000-10);
// byteswap
u32 make_color(color col)
@@ -12,17 +12,17 @@ u32 make_color(color col)
& ((u32) col.a << 24);
}
-void set_pixel(u16 x, u16 y, u32 col)
+void gfx_set_pixel(u16 x, u16 y, u32 col)
{
- *((u32 *) (u64) (gfxinfo->framebuffer + y * gfxinfo->pitch + x * sizeof col)) = col;
+ *((u32 *) (u64) (gfx_info->framebuffer + y * gfx_info->pitch + x * sizeof col)) = col;
}
-void set_region(u16 x, u16 y, u16 w, u16 h, u32 col)
+void gfx_set_area(u16 x, u16 y, u16 w, u16 h, u32 col)
{
- void *cbeg = (void *) (u64) (gfxinfo->framebuffer + y * gfxinfo->pitch + x * sizeof col);
- void *cend = cbeg + h * gfxinfo->pitch;
+ void *cbeg = (void *) (u64) (gfx_info->framebuffer + y * gfx_info->pitch + x * sizeof col);
+ void *cend = cbeg + h * gfx_info->pitch;
- for (; cbeg < cend; cbeg += gfxinfo->pitch) {
+ for (; cbeg < cend; cbeg += gfx_info->pitch) {
void *rbeg = cbeg;
void *rend = rbeg + w * sizeof col;