From e2d7e8475495053bd20b8fcea35900709321b455 Mon Sep 17 00:00:00 2001 From: jacob Date: Fri, 23 May 2025 23:37:26 -0500 Subject: [PATCH] rename res/graphics -> res/sprites --- res/{graphics => sprites}/blood.ase | 0 res/{graphics => sprites}/box.ase | 0 res/{graphics => sprites}/box_rounded.ase | 0 res/{graphics => sprites}/bullet.ase | 0 res/{graphics => sprites}/crosshair.ase | 0 res/{graphics => sprites}/gun.ase | 0 res/{graphics => sprites}/tile.ase | 0 res/{graphics => sprites}/tim.ase | 0 src/sim_step.c | 22 +++++++++++----------- src/user.c | 4 ++-- 10 files changed, 13 insertions(+), 13 deletions(-) rename res/{graphics => sprites}/blood.ase (100%) rename res/{graphics => sprites}/box.ase (100%) rename res/{graphics => sprites}/box_rounded.ase (100%) rename res/{graphics => sprites}/bullet.ase (100%) rename res/{graphics => sprites}/crosshair.ase (100%) rename res/{graphics => sprites}/gun.ase (100%) rename res/{graphics => sprites}/tile.ase (100%) rename res/{graphics => sprites}/tim.ase (100%) diff --git a/res/graphics/blood.ase b/res/sprites/blood.ase similarity index 100% rename from res/graphics/blood.ase rename to res/sprites/blood.ase diff --git a/res/graphics/box.ase b/res/sprites/box.ase similarity index 100% rename from res/graphics/box.ase rename to res/sprites/box.ase diff --git a/res/graphics/box_rounded.ase b/res/sprites/box_rounded.ase similarity index 100% rename from res/graphics/box_rounded.ase rename to res/sprites/box_rounded.ase diff --git a/res/graphics/bullet.ase b/res/sprites/bullet.ase similarity index 100% rename from res/graphics/bullet.ase rename to res/sprites/bullet.ase diff --git a/res/graphics/crosshair.ase b/res/sprites/crosshair.ase similarity index 100% rename from res/graphics/crosshair.ase rename to res/sprites/crosshair.ase diff --git a/res/graphics/gun.ase b/res/sprites/gun.ase similarity index 100% rename from res/graphics/gun.ase rename to res/sprites/gun.ase diff --git a/res/graphics/tile.ase b/res/sprites/tile.ase similarity index 100% rename from res/graphics/tile.ase rename to res/sprites/tile.ase diff --git a/res/graphics/tim.ase b/res/sprites/tim.ase similarity index 100% rename from res/graphics/tim.ase rename to res/sprites/tim.ase diff --git a/src/sim_step.c b/src/sim_step.c index b1cc288d..1e4584bd 100644 --- a/src/sim_step.c +++ b/src/sim_step.c @@ -54,7 +54,7 @@ void sim_accel_reset(struct sim_snapshot *ss, struct sim_accel *accel) INTERNAL struct sim_ent *test_spawn_smg(struct sim_ent *parent) { struct sim_ent *e = sim_ent_alloc_sync_src(parent); - e->sprite = sprite_tag_from_path(LIT("graphics/gun.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/gun.ase")); sim_ent_enable_prop(e, SEPROP_ATTACHED); e->attach_slice = LIT("attach.wep"); @@ -70,7 +70,7 @@ INTERNAL struct sim_ent *test_spawn_smg(struct sim_ent *parent) INTERNAL struct sim_ent *test_spawn_launcher(struct sim_ent *parent) { struct sim_ent *e = sim_ent_alloc_sync_src(parent); - e->sprite = sprite_tag_from_path(LIT("graphics/gun.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/gun.ase")); sim_ent_enable_prop(e, SEPROP_ATTACHED); e->attach_slice = LIT("attach.wep"); @@ -86,7 +86,7 @@ INTERNAL struct sim_ent *test_spawn_launcher(struct sim_ent *parent) INTERNAL struct sim_ent *test_spawn_chucker(struct sim_ent *parent) { struct sim_ent *chucker = sim_ent_alloc_sync_src(parent); - chucker->sprite = sprite_tag_from_path(LIT("graphics/gun.ase")); + chucker->sprite = sprite_tag_from_path(LIT("sprites/gun.ase")); sim_ent_enable_prop(chucker, SEPROP_ATTACHED); chucker->attach_slice = LIT("attach.wep"); @@ -137,12 +137,12 @@ INTERNAL struct sim_ent *test_spawn_employee(struct sim_ent *parent) { sim_ent_enable_prop(e, SEPROP_TEST); - e->sprite = sprite_tag_from_path(LIT("graphics/tim.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/tim.ase")); e->mass_unscaled = 10; e->inertia_unscaled = 5; } - //e->sprite = sprite_tag_from_path(LIT("graphics/box_rounded.ase")); + //e->sprite = sprite_tag_from_path(LIT("sprites/box_rounded.ase")); //e->sprite_span_name = LIT("idle.unarmed"); //e->sprite_span_name = LIT("idle.one_handed"); e->sprite_span_name = LIT("idle.two_handed"); @@ -259,7 +259,7 @@ INTERNAL void test_spawn_entities2(struct sim_ent *parent, struct v2 pos) struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size); sim_ent_set_xform(e, xf); - e->sprite = sprite_tag_from_path(LIT("graphics/box.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/box.ase")); e->layer = SIM_LAYER_SHOULDERS; e->sprite_tint = ALPHA_F(COLOR_BLUE, 0.75); @@ -288,7 +288,7 @@ INTERNAL void test_spawn_entities2(struct sim_ent *parent, struct v2 pos) struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size); sim_ent_set_xform(e, xf); - e->sprite = sprite_tag_from_path(LIT("graphics/bullet.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/bullet.ase")); e->sprite_collider_slice = LIT("shape"); e->layer = SIM_LAYER_SHOULDERS; @@ -316,7 +316,7 @@ INTERNAL void test_spawn_entities3(struct sim_ent *parent, struct v2 pos) struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size); sim_ent_set_xform(e, xf); - e->sprite = sprite_tag_from_path(LIT("graphics/box.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/box.ase")); e->layer = SIM_LAYER_SHOULDERS; e->sprite_tint = COLOR_RED; @@ -347,7 +347,7 @@ INTERNAL void test_spawn_tile(struct sim_snapshot *world, struct v2 world_pos) sim_ent_set_xform(e, xf); e->layer = SIM_LAYER_WALLS; - e->sprite = sprite_tag_from_path(LIT("graphics/tile.ase")); + e->sprite = sprite_tag_from_path(LIT("sprites/tile.ase")); e->sprite_tint = COLOR_RED; { @@ -719,7 +719,7 @@ INTERNAL PHYS_COLLISION_CALLBACK_FUNC_DEF(on_collision, data, step_ctx) { struct xform xf = XFORM_TRS(.t = point, .r = rand_f64_from_state(&step_ctx->rand, 0, TAU)); struct sim_ent *decal = sim_ent_alloc_sync_src(root); - decal->sprite = sprite_tag_from_path(LIT("graphics/blood.ase")); + decal->sprite = sprite_tag_from_path(LIT("sprites/blood.ase")); decal->sprite_tint = RGBA_F(1, 1, 1, 0.25f); decal->layer = SIM_LAYER_FLOOR_DECALS; sim_ent_set_xform(decal, xf); @@ -1336,7 +1336,7 @@ void sim_step(struct sim_step_ctx *ctx) bullet->local_collider.points[0] = V2(0, 0); bullet->local_collider.count = 1; #else - bullet->sprite = sprite_tag_from_path(LIT("graphics/bullet.ase")); + bullet->sprite = sprite_tag_from_path(LIT("sprites/bullet.ase")); bullet->sprite_collider_slice = LIT("shape"); #endif } diff --git a/src/user.c b/src/user.c index 134283c4..c5b5b168 100644 --- a/src/user.c +++ b/src/user.c @@ -1110,7 +1110,7 @@ INTERNAL void user_update(void) /* TODO: Something better */ if (sim_ent_has_prop(ent, SEPROP_TILE_CHUNK)) { struct v2i32 chunk_index = ent->tile_chunk_index; - struct sprite_tag tile_sprite = sprite_tag_from_path(LIT("graphics/tile.ase")); + struct sprite_tag tile_sprite = sprite_tag_from_path(LIT("sprites/tile.ase")); f32 tile_size = 1.f / SIM_TILES_PER_UNIT_SQRT; for (i32 tile_y = 0; tile_y < SIM_TILES_PER_CHUNK_SQRT; ++tile_y) { for (i32 tile_x = 0; tile_x < SIM_TILES_PER_CHUNK_SQRT; ++tile_x) { @@ -1567,7 +1567,7 @@ INTERNAL void user_update(void) struct v2 crosshair_pos = G.ui_cursor; u32 tint = RGBA_F(1, 1, 1, 1); - struct sprite_tag crosshair_tag = sprite_tag_from_path(LIT("graphics/crosshair.ase")); + struct sprite_tag crosshair_tag = sprite_tag_from_path(LIT("sprites/crosshair.ase")); struct sprite_texture *t = sprite_texture_from_tag_async(sprite_frame_scope, crosshair_tag); struct v2 size = V2(t->width, t->height);