refactor: add helpers for file I/O, main script detection, safe strncpy, & make hal generic

This commit is contained in:
asrael 2025-12-06 15:04:53 -06:00
parent a33d4c0068
commit db82efe269
No known key found for this signature in database
GPG key ID: 2786557804DFAE24
19 changed files with 327 additions and 457 deletions

View file

@ -39,7 +39,6 @@ pxl8.sprite = gfx2d.sprite
pxl8.load_palette = gfx2d.load_palette
pxl8.load_sprite = gfx2d.load_sprite
pxl8.create_texture = gfx2d.create_texture
pxl8.upload_atlas = gfx2d.upload_atlas
pxl8.gfx_color_ramp = gfx2d.color_ramp
pxl8.gfx_fade_palette = gfx2d.fade_palette
pxl8.gfx_cycle_palette = gfx2d.cycle_palette

View file

@ -70,10 +70,6 @@ function graphics.create_texture(pixels, width, height)
return result
end
function graphics.upload_atlas()
C.pxl8_gfx_upload_atlas(core.gfx)
end
function graphics.color_ramp(start, count, from_color, to_color)
C.pxl8_gfx_color_ramp(core.gfx, start, count, from_color, to_color)
end