X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player.h;h=1c02a4e55f1742d1fd0894c2ef22e17657bdd6c5;hb=a1056ed8198f0f5be0e0f341da8bd49aa6c47198;hp=50929831ef0c81d93c79f8f94d11342500ec4f5f;hpb=c4c762ce6f3bbdcb770bbc42e349aebbc3390d9d;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player.h b/player.h index 5092983..1c02a4e 100644 --- a/player.h +++ b/player.h @@ -14,6 +14,10 @@ struct player_instance rigidbody rb; v3f angles; + v4f qbasis; + m3x3f basis, invbasis, basis_gate; + world_instance *viewable_world; + /* * Camera management * --------------------------- @@ -47,7 +51,7 @@ struct player_instance cam_land_punch, cam_land_punch_v; - teleport_gate *gate_waiting; + ent_gate *gate_waiting; /* * Input @@ -115,7 +119,7 @@ void (*_player_bind[])( player_instance *player ) = }; VG_STATIC -void (*_player_reset[])( player_instance *player, struct respawn_point *rp ) = +void (*_player_reset[])( player_instance *player, ent_spawn *rp ) = { NULL, player__skate_reset, @@ -397,68 +401,6 @@ VG_STATIC void reset_player_poll( int argc, char const *argv[] ); VG_STATIC void player_init(void) /* 1 */ { -#if 0 - player.input_js1h = vg_create_named_input( "steer-h", k_input_type_axis ); - player.input_js1v = vg_create_named_input( "steer-v", k_input_type_axis ); - player.input_grab = vg_create_named_input( "grab", k_input_type_axis_norm ); - player.input_js2h = vg_create_named_input( "grab-h", k_input_type_axis ); - player.input_js2v = vg_create_named_input( "grab-v", k_input_type_axis ); - player.input_jump = vg_create_named_input( "jump", k_input_type_button ); - player.input_push = vg_create_named_input( "push", k_input_type_button ); - player.input_walk = vg_create_named_input( "walk", k_input_type_button ); - - player.input_walkh = vg_create_named_input( "walk-h", - k_input_type_axis ); - player.input_walkv = vg_create_named_input( "walk-v", - k_input_type_axis ); - - - player.input_switch_mode = vg_create_named_input( "switch-mode", - k_input_type_button ); - player.input_reset = vg_create_named_input( "reset", k_input_type_button ); - - const char *default_cfg[] = - { - "bind steer-h gp-ls-h", - "bind -steer-h a", - "bind +steer-h d", - - "bind steer-v gp-ls-v", - "bind -steer-v w", - "bind +steer-v s", - - "bind grab gp-rt", - "bind +grab shift", - "bind grab-h gp-rs-h", - "bind grab-v gp-rs-v", - - "bind jump space", - "bind jump gp-a", - - "bind push gp-b", - "bind push w", - - "bind walk shift", - "bind walk gp-ls", - - "bind walk-h gp-ls-h", - "bind walk-v -gp-ls-v", - "bind +walk-h d", - "bind -walk-h a", - "bind +walk-v w", - "bind -walk-v s", - - "bind reset gp-lb", - "bind reset r", - - "bind switch-mode gp-y", - "bind switch-mode e", - }; - - for( int i=0; i