From a30dc60b114176379910d1b05ba66c8df3a95f4a Mon Sep 17 00:00:00 2001 From: Brendan Hansen Date: Tue, 1 Mar 2022 21:30:40 -0600 Subject: [PATCH] removed silly code --- src/entity/schematics/background.onyx | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/src/entity/schematics/background.onyx b/src/entity/schematics/background.onyx index 7aefc89..e9f66d8 100644 --- a/src/entity/schematics/background.onyx +++ b/src/entity/schematics/background.onyx @@ -1,6 +1,8 @@ use package core +#local background_texture: Texture; + Background :: struct { #struct_tag Entity_Schematic.{ (scene) => { @@ -12,8 +14,8 @@ Background :: struct { comp.func = Background.render; } - queue_assets(^Background.assets); - load_assets(); + background_texture', _ := texture_lookup("./assets/images/background.png"); + texture_wrap(^background_texture, .Repeat); return this; } @@ -22,12 +24,6 @@ Background :: struct { render :: (this: ^Entity) { size :: 10000.0f immediate_set_color(.{1, 1, 1}); - immediate_subimage(^assets.texture, this.pos.x, this.pos.y, size, size, 0, 0, size / 2, size / 2); - } - - #persist assets: struct { - #tag "./assets/images/background.png" - #tag Texture_Wrap.Repeat - texture: Texture; + immediate_subimage(^background_texture, this.pos.x, this.pos.y, size, size, 0, 0, size / 2, size / 2); } } \ No newline at end of file -- 2.25.1