X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player.c;h=145a9285c79c636ece7c70b32c4d947725a213c7;hb=342fcbf6fda017bdd38d56ce0fa7c9e59e589f3b;hp=5b64b8d7f99084f5b2c364e6640d681fbf0738dd;hpb=b3ca3b7a45eec11c46eb19772e10021177665adb;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.c b/player.c index 5b64b8d..145a928 100644 --- a/player.c +++ b/player.c @@ -5,6 +5,8 @@ #include "camera.h" #include "player_model.h" #include "input.h" +#include "world.h" +#include "audio.h" VG_STATIC int localplayer_cmd_respawn( int argc, const char *argv[] ) { @@ -38,6 +40,7 @@ VG_STATIC void player_init(void) PLAYER_API void player__debugtext( int size, const char *fmt, ... ) { +#if 0 char buffer[ 1024 ]; va_list args; @@ -47,6 +50,7 @@ void player__debugtext( int size, const char *fmt, ... ) ui_text( vg_uictx.cursor, buffer, size, k_text_align_right ); vg_uictx.cursor[1] += 14*size; +#endif } /* @@ -128,9 +132,9 @@ void player__pre_update( player_instance *player ) } if( button_down( k_srbind_reset ) && !player->immobile ){ - double delta = world_global.time - world_global.last_use; + f64 delta = world_static.time - world_static.last_use; - if( (delta <= RESET_MAX_TIME) && (world_global.last_use != 0.0) ){ + if( (delta <= RESET_MAX_TIME) && (world_static.last_use != 0.0) ){ player->rewinding = 1; player->rewind_sound_wait = 1; player->rewind_time = (double)player->rewind_length - 0.0001; @@ -217,11 +221,11 @@ void player__post_update( player_instance *player ) PLAYER_API void player__pass_gate( player_instance *player, ent_gate *gate ) { - world_routes_fracture( get_active_world(), gate, + world_routes_fracture( world_current_instance(), gate, player->rb.co, player->rb.v ); player->gate_waiting = gate; - world_routes_activate_entry_gate( get_active_world(), gate ); + world_routes_activate_entry_gate( world_current_instance(), gate ); m4x3_mulv( gate->transport, player->tpv_lpf, player->tpv_lpf ); m3x3_mulv( gate->transport, player->cam_velocity_smooth, @@ -248,9 +252,9 @@ void player__pass_gate( player_instance *player, ent_gate *gate ) player_save_rewind_frame( player ); if( gate->type == k_gate_type_nonlocel ) - world_global.active_world = gate->target; + world_static.active_world = gate->target; - world_global.in_volume = 0; + world_volumes.inside = 0; audio_lock(); audio_oneshot( &audio_gate_pass, 1.0f, 0.0f ); @@ -293,6 +297,7 @@ VG_STATIC void gate_rotate_angles( ent_gate *gate, v3f angles, v3f d ) PLAYER_API void player__im_gui( player_instance *player ) { +#if 0 vg_uictx.cursor[0] = vg.window_x - 200; vg_uictx.cursor[1] = 0; vg_uictx.cursor[2] = 200; @@ -310,6 +315,7 @@ PLAYER_API void player__im_gui( player_instance *player ) b[2].co[1] = vg_uictx.cursor[1]; b[3].co[1] = vg_uictx.cursor[1]; +#endif } VG_STATIC void global_skateshop_exit(void); @@ -342,4 +348,13 @@ PLAYER_API void player__kill( player_instance *player ) } +/* implementation */ +#include "player_common.c" +#include "player_walk.c" +#include "player_skate.c" +#include "player_dead.c" +#include "player_drive.c" +#include "player_render.c" +#include "player_ragdoll.c" + #endif /* PLAYER_C */