depluralize res dirs
This commit is contained in:
parent
67335eaa85
commit
1c18cba5f8
@ -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)
|
INTERNAL struct sim_ent *test_spawn_smg(struct sim_ent *parent)
|
||||||
{
|
{
|
||||||
struct sim_ent *e = sim_ent_alloc_sync_src(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);
|
sim_ent_enable_prop(e, SEPROP_ATTACHED);
|
||||||
e->attach_slice = LIT("attach.wep");
|
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)
|
INTERNAL struct sim_ent *test_spawn_launcher(struct sim_ent *parent)
|
||||||
{
|
{
|
||||||
struct sim_ent *e = sim_ent_alloc_sync_src(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);
|
sim_ent_enable_prop(e, SEPROP_ATTACHED);
|
||||||
e->attach_slice = LIT("attach.wep");
|
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)
|
INTERNAL struct sim_ent *test_spawn_chucker(struct sim_ent *parent)
|
||||||
{
|
{
|
||||||
struct sim_ent *chucker = sim_ent_alloc_sync_src(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);
|
sim_ent_enable_prop(chucker, SEPROP_ATTACHED);
|
||||||
chucker->attach_slice = LIT("attach.wep");
|
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);
|
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->mass_unscaled = 10;
|
||||||
e->inertia_unscaled = 5;
|
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.unarmed");
|
||||||
//e->sprite_span_name = LIT("idle.one_handed");
|
//e->sprite_span_name = LIT("idle.one_handed");
|
||||||
e->sprite_span_name = LIT("idle.two_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);
|
struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size);
|
||||||
sim_ent_set_xform(e, xf);
|
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->layer = SIM_LAYER_SHOULDERS;
|
||||||
|
|
||||||
e->sprite_tint = ALPHA_F(COLOR_BLUE, 0.75);
|
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);
|
struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size);
|
||||||
sim_ent_set_xform(e, xf);
|
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->sprite_collider_slice = LIT("shape");
|
||||||
e->layer = SIM_LAYER_SHOULDERS;
|
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);
|
struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size);
|
||||||
sim_ent_set_xform(e, xf);
|
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->layer = SIM_LAYER_SHOULDERS;
|
||||||
|
|
||||||
e->sprite_tint = COLOR_RED;
|
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);
|
struct xform xf = XFORM_TRS(.t = pos, .r = r, .s = size);
|
||||||
sim_ent_set_xform(e, xf);
|
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->layer = SIM_LAYER_SHOULDERS;
|
||||||
|
|
||||||
sim_ent_enable_prop(e, SEPROP_LIGHT_TEST);
|
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);
|
sim_ent_set_xform(e, xf);
|
||||||
|
|
||||||
e->layer = SIM_LAYER_WALLS;
|
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;
|
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 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);
|
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->sprite_tint = RGBA_F(1, 1, 1, 0.25f);
|
||||||
decal->layer = SIM_LAYER_FLOOR_DECALS;
|
decal->layer = SIM_LAYER_FLOOR_DECALS;
|
||||||
sim_ent_set_xform(decal, xf);
|
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.points[0] = V2(0, 0);
|
||||||
bullet->local_collider.count = 1;
|
bullet->local_collider.count = 1;
|
||||||
#else
|
#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");
|
bullet->sprite_collider_slice = LIT("shape");
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
14
src/user.c
14
src/user.c
@ -528,7 +528,7 @@ INTERNAL void draw_debug_console(i32 level, b32 minimized)
|
|||||||
G.console_logs_height = 0;
|
G.console_logs_height = 0;
|
||||||
|
|
||||||
i64 now_ns = sys_time_ns();
|
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) {
|
if (font) {
|
||||||
struct sys_lock lock = sys_mutex_lock_e(&G.console_logs_mutex);
|
struct sys_lock lock = sys_mutex_lock_e(&G.console_logs_mutex);
|
||||||
{
|
{
|
||||||
@ -1289,7 +1289,7 @@ INTERNAL void user_update(void)
|
|||||||
/* TODO: Something better */
|
/* TODO: Something better */
|
||||||
if (sim_ent_has_prop(ent, SEPROP_TILE_CHUNK)) {
|
if (sim_ent_has_prop(ent, SEPROP_TILE_CHUNK)) {
|
||||||
struct v2i32 chunk_index = ent->tile_chunk_index;
|
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;
|
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_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) {
|
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
|
#if 0
|
||||||
/* Draw contact info */
|
/* 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) {
|
if (disp_font) {
|
||||||
f32 offset_px = 10;
|
f32 offset_px = 10;
|
||||||
|
|
||||||
@ -1598,7 +1598,7 @@ INTERNAL void user_update(void)
|
|||||||
#if 0
|
#if 0
|
||||||
/* Test info */
|
/* 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) {
|
if (disp_font) {
|
||||||
f32 offset_px = 10;
|
f32 offset_px = 10;
|
||||||
struct string fmt = LIT(
|
struct string fmt = LIT(
|
||||||
@ -1739,7 +1739,7 @@ INTERNAL void user_update(void)
|
|||||||
__profscope(draw_crosshair);
|
__profscope(draw_crosshair);
|
||||||
struct v2 crosshair_pos = G.user_cursor;
|
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 sprite_texture *t = sprite_texture_from_tag_async(sprite_frame_scope, crosshair_tag);
|
||||||
|
|
||||||
struct v2 size = V2(t->width, t->height);
|
struct v2 size = V2(t->width, t->height);
|
||||||
@ -1935,7 +1935,7 @@ INTERNAL void user_update(void)
|
|||||||
struct sim_ent *ent = hovered_ent;
|
struct sim_ent *ent = hovered_ent;
|
||||||
|
|
||||||
struct v2 pos = v2_add(G.user_cursor, V2(15, 15));
|
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) {
|
if (font) {
|
||||||
struct arena_temp temp = arena_temp_begin(scratch.arena);
|
struct arena_temp temp = arena_temp_begin(scratch.arena);
|
||||||
|
|
||||||
@ -1953,7 +1953,7 @@ INTERNAL void user_update(void)
|
|||||||
* ========================== */
|
* ========================== */
|
||||||
|
|
||||||
if (G.debug_draw) {
|
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) {
|
if (font) {
|
||||||
struct arena_temp temp = arena_temp_begin(scratch.arena);
|
struct arena_temp temp = arena_temp_begin(scratch.arena);
|
||||||
struct string text = ZI;
|
struct string text = ZI;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user