diff --git a/res/fonts/fixedsys.ttf b/res/font/fixedsys.ttf similarity index 100% rename from res/fonts/fixedsys.ttf rename to res/font/fixedsys.ttf diff --git a/res/sounds/test.mp3 b/res/sound/test.mp3 similarity index 100% rename from res/sounds/test.mp3 rename to res/sound/test.mp3 diff --git a/res/sprites/blood.ase b/res/sprite/blood.ase similarity index 100% rename from res/sprites/blood.ase rename to res/sprite/blood.ase diff --git a/res/sprites/box.ase b/res/sprite/box.ase similarity index 100% rename from res/sprites/box.ase rename to res/sprite/box.ase diff --git a/res/sprites/box_rounded.ase b/res/sprite/box_rounded.ase similarity index 100% rename from res/sprites/box_rounded.ase rename to res/sprite/box_rounded.ase diff --git a/res/sprites/bullet.ase b/res/sprite/bullet.ase similarity index 100% rename from res/sprites/bullet.ase rename to res/sprite/bullet.ase diff --git a/res/sprites/crosshair.ase b/res/sprite/crosshair.ase similarity index 100% rename from res/sprites/crosshair.ase rename to res/sprite/crosshair.ase diff --git a/res/sprites/gun.ase b/res/sprite/gun.ase similarity index 100% rename from res/sprites/gun.ase rename to res/sprite/gun.ase diff --git a/res/sprites/tile.ase b/res/sprite/tile.ase similarity index 100% rename from res/sprites/tile.ase rename to res/sprite/tile.ase diff --git a/res/sprites/tim.ase b/res/sprite/tim.ase similarity index 100% rename from res/sprites/tim.ase rename to res/sprite/tim.ase diff --git a/src/sim_step.c b/src/sim_step.c index cba6f772..29960493 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("sprites/gun.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/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("sprites/gun.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/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("sprites/gun.ase")); + chucker->sprite = sprite_tag_from_path(LIT("sprite/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("sprites/tim.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/tim.ase")); e->mass_unscaled = 10; e->inertia_unscaled = 5; } - //e->sprite = sprite_tag_from_path(LIT("sprites/box_rounded.ase")); + //e->sprite = sprite_tag_from_path(LIT("sprite/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("sprites/box.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/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("sprites/bullet.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/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("sprites/box.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/box.ase")); e->layer = SIM_LAYER_SHOULDERS; e->sprite_tint = COLOR_RED; @@ -339,7 +339,7 @@ INTERNAL void test_spawn_entities4(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("sprites/box.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/box.ase")); e->layer = SIM_LAYER_SHOULDERS; sim_ent_enable_prop(e, SEPROP_LIGHT_TEST); @@ -367,7 +367,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("sprites/tile.ase")); + e->sprite = sprite_tag_from_path(LIT("sprite/tile.ase")); e->sprite_tint = COLOR_RED; { @@ -739,7 +739,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("sprites/blood.ase")); + decal->sprite = sprite_tag_from_path(LIT("sprite/blood.ase")); decal->sprite_tint = RGBA_F(1, 1, 1, 0.25f); decal->layer = SIM_LAYER_FLOOR_DECALS; sim_ent_set_xform(decal, xf); @@ -1366,7 +1366,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("sprites/bullet.ase")); + bullet->sprite = sprite_tag_from_path(LIT("sprite/bullet.ase")); bullet->sprite_collider_slice = LIT("shape"); #endif } diff --git a/src/user.c b/src/user.c index 72020bf3..8b673d55 100644 --- a/src/user.c +++ b/src/user.c @@ -528,7 +528,7 @@ INTERNAL void draw_debug_console(i32 level, b32 minimized) G.console_logs_height = 0; i64 now_ns = sys_time_ns(); - struct font *font = font_load_async(LIT("fonts/fixedsys.ttf"), 12.0f); + struct font *font = font_load_async(LIT("font/fixedsys.ttf"), 12.0f); if (font) { struct sys_lock lock = sys_mutex_lock_e(&G.console_logs_mutex); { @@ -1289,7 +1289,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("sprites/tile.ase")); + struct sprite_tag tile_sprite = sprite_tag_from_path(LIT("sprite/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) { @@ -1481,7 +1481,7 @@ INTERNAL void user_update(void) #if 0 /* Draw contact info */ { - struct font *disp_font = font_load_async(LIT("fonts/fixedsys.ttf"), 12.0f); + struct font *disp_font = font_load_async(LIT("font/fixedsys.ttf"), 12.0f); if (disp_font) { f32 offset_px = 10; @@ -1598,7 +1598,7 @@ INTERNAL void user_update(void) #if 0 /* Test info */ { - struct font *disp_font = font_load_async(LIT("fonts/fixedsys.ttf"), 12.0f); + struct font *disp_font = font_load_async(LIT("font/fixedsys.ttf"), 12.0f); if (disp_font) { f32 offset_px = 10; struct string fmt = LIT( @@ -1739,7 +1739,7 @@ INTERNAL void user_update(void) __profscope(draw_crosshair); struct v2 crosshair_pos = G.user_cursor; - struct sprite_tag crosshair_tag = sprite_tag_from_path(LIT("sprites/crosshair.ase")); + struct sprite_tag crosshair_tag = sprite_tag_from_path(LIT("sprite/crosshair.ase")); struct sprite_texture *t = sprite_texture_from_tag_async(sprite_frame_scope, crosshair_tag); struct v2 size = V2(t->width, t->height); @@ -1935,7 +1935,7 @@ INTERNAL void user_update(void) struct sim_ent *ent = hovered_ent; struct v2 pos = v2_add(G.user_cursor, V2(15, 15)); - struct font *font = font_load_async(LIT("fonts/fixedsys.ttf"), 12.0f); + struct font *font = font_load_async(LIT("font/fixedsys.ttf"), 12.0f); if (font) { struct arena_temp temp = arena_temp_begin(scratch.arena); @@ -1953,7 +1953,7 @@ INTERNAL void user_update(void) * ========================== */ if (G.debug_draw) { - struct font *font = font_load_async(LIT("fonts/fixedsys.ttf"), 12.0f); + struct font *font = font_load_async(LIT("font/fixedsys.ttf"), 12.0f); if (font) { struct arena_temp temp = arena_temp_begin(scratch.arena); struct string text = ZI;