X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=world.c;h=40f3d75423b7fbdf09f4d4cfce6001555500a33d;hb=137d40d96fe923600d8378b8e138e3c276f27ff4;hp=0612644bb305b2a49a9c0f7d93a59210b30fd7e2;hpb=844527ec68c063d78d4993bd8e4053f9ddc47b78;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/world.c b/world.c index 0612644..40f3d75 100644 --- a/world.c +++ b/world.c @@ -26,6 +26,25 @@ static void world_init(void) VG_MEMORY_SYSTEM ); } +static void world_set_active_instance( u32 index ){ + world_static.challenge_target = NULL; + world_static.challenge_timer = 0.0f; + world_static.focused_entity = 0; + world_static.focus_strength = 0.0f; + world_static.active_trigger_volume_count = 0; + world_static.active_instance = index; +} + +static void skaterift_world_get_save_path( enum world_purpose which, + char buf[128] ){ + addon_reg *reg = world_static.instance_addons[ which ]; + assert( reg ); + + char id[76]; + addon_alias_uid( ®->alias, id ); + snprintf( buf, 128, "savedata/%s.bkv", id ); +} + #include "world_entity.c" #include "world_gate.c" #include "world_gen.c" @@ -39,8 +58,7 @@ static void world_init(void) #include "world_routes.c" #include "world_traffic.c" -VG_STATIC void world_update( world_instance *world, v3f pos ) -{ +static void world_update( world_instance *world, v3f pos ){ world_render.sky_time += world_render.sky_rate * vg.time_delta; world_render.sky_rate = vg_lerp( world_render.sky_rate, world_render.sky_target_rate,