progress on sprites
This commit is contained in:
+7
-1
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user