This commit is contained in:
asrael 2025-09-28 13:10:29 -05:00
parent 9f96626ea7
commit 6a02b24ae6
29 changed files with 653 additions and 583 deletions

View file

@ -153,6 +153,7 @@ void pxl8_gfx_shutdown(pxl8_gfx_ctx* ctx) {
ctx->initialized = false;
}
// resource loading
pxl8_result pxl8_gfx_init_atlas(pxl8_gfx_ctx* ctx, u32 width, u32 height) {
if (!ctx || !ctx->initialized) return PXL8_ERROR_INVALID_ARGUMENT;
@ -328,6 +329,7 @@ pxl8_result pxl8_gfx_load_font_atlas(pxl8_gfx_ctx* ctx) {
return PXL8_OK;
}
// rendering pipeline
void pxl8_gfx_upload_framebuffer(pxl8_gfx_ctx* ctx) {
if (!ctx || !ctx->initialized || !ctx->framebuffer_texture) return;
@ -405,6 +407,7 @@ void pxl8_gfx_project(pxl8_gfx_ctx* ctx, f32 left, f32 right, f32 top, f32 botto
(void)ctx; (void)left; (void)right; (void)top; (void)bottom;
}
// drawing primitives
void pxl8_clr(pxl8_gfx_ctx* ctx, u32 color) {
if (!ctx || !ctx->framebuffer) return;
@ -590,6 +593,7 @@ void pxl8_sprite(pxl8_gfx_ctx* ctx, u32 sprite_id, i32 x, i32 y, i32 w, i32 h) {
}
}
// palette effects
void pxl8_gfx_cycle_palette(pxl8_gfx_ctx* ctx, u8 start, u8 count, i32 step) {
if (!ctx || !ctx->palette || count == 0) return;