From: Brendan Hansen Date: Wed, 2 Mar 2022 03:30:40 +0000 (-0600) Subject: removed silly code X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=a30dc60b114176379910d1b05ba66c8df3a95f4a;p=bar-game.git removed silly code --- 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