progress on sprites

This commit is contained in:
JJ Bliss
2026-04-25 22:07:55 -04:00
parent c94e19c434
commit caf345df15
2 changed files with 26 additions and 6 deletions
+7 -1
View File
@@ -132,6 +132,9 @@ export fn main() void = {
// fmt::printfln("Setting window to width: {:x} height: {:x}", dims.width, dims.height)!;
if((dims.width != 0) && (dims.height !=0)){
sdl3::DestroyTexture(meadow_texture);
free(pixeldata);
pixeldata = alloc([0...])!; //TODO figure out actual size
let w: int = dims.width: int;
let h: int = dims.height: int;
@@ -184,11 +187,14 @@ export fn main() void = {
if((dims.width != w: u16) || (dims.height != h: u16)){
// fmt::println("Dimensions not allowed!")!;
//TODO handle this maybe
uxn::set_window_size(w: u16,h: u16,state);
sdl3::DestroyTexture(meadow_texture);
free(pixeldata);
pixeldata = alloc([0...])!; //TODO figure out actual size
let old_w: int = dims.width: int;
let old_h: int = dims.height: int;
fmt::printfln("Setting window to width: {} height: {}", w, h)!;
fmt::printfln("User setting window to width: {} height: {}", w, h)!;
sdl3::SetWindowSize(win,w,h)!;
meadow_texture = sdl3::CreateTexture(render,