#include "player.h"
#include "camera.h"
#include "player_model.h"
+#include "input.h"
VG_STATIC int localplayer_cmd_respawn( int argc, const char *argv[] )
{
PLAYER_API
void player__debugtext( int size, const char *fmt, ... )
{
+#if 0
char buffer[ 1024 ];
va_list args;
ui_text( vg_uictx.cursor, buffer, size, k_text_align_right );
vg_uictx.cursor[1] += 14*size;
+#endif
}
/*
assert( only_once == 0 );
only_once ++;
- inst->input_js1h = vg_create_named_input( "steer-h", k_input_type_axis );
- inst->input_js1v = vg_create_named_input( "steer-v", k_input_type_axis );
- inst->input_grab = vg_create_named_input( "grab", k_input_type_axis_norm);
- inst->input_js2h = vg_create_named_input( "grab-h", k_input_type_axis );
- inst->input_js2v = vg_create_named_input( "grab-v", k_input_type_axis );
- inst->input_jump = vg_create_named_input( "jump", k_input_type_button );
- inst->input_push = vg_create_named_input( "push", k_input_type_button );
- inst->input_walk = vg_create_named_input( "walk", k_input_type_button );
- inst->input_walkh= vg_create_named_input( "walk-h", k_input_type_axis );
- inst->input_walkv= vg_create_named_input( "walk-v", k_input_type_axis );
- inst->input_use = vg_create_named_input( "use", k_input_type_button );
- inst->input_reset= vg_create_named_input( "reset", k_input_type_button );
- inst->input_camera=vg_create_named_input( "camera", k_input_type_button );
- inst->input_trick0=vg_create_named_input( "trick0", k_input_type_button );
- inst->input_trick1=vg_create_named_input( "trick1", k_input_type_button );
- inst->input_trick2=vg_create_named_input( "trick2", 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 trick0 mouse1",
- "bind trick0 gp-a",
- "bind trick1 mouse2",
- "bind trick1 gp-b",
- "bind trick2 gp-x", /* keyboard: m0 + m1 */
-
- "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 use gp-y",
- "bind use e",
- "bind camera c",
- "bind camera gp-rb"
- };
-
- for( int i=0; i<vg_list_size(default_cfg); i++ )
- vg_execute_console_input(default_cfg[i]);
-
v3_zero( inst->rb.co );
v3_zero( inst->rb.w );
v3_zero( inst->rb.v );
return;
}
- if( vg_input_button_down( player->input_reset ) && !player->immobile ){
+ if( button_down( k_srbind_reset ) && !player->immobile ){
double delta = world_global.time - world_global.last_use;
if( (delta <= RESET_MAX_TIME) && (world_global.last_use != 0.0) ){
}
}
- if( vg_input_button_down( player->input_camera ) && !player->immobile ){
+ if( button_down( k_srbind_camera ) && !player->immobile ){
if( player->camera_mode == k_cam_firstperson )
player->camera_mode = k_cam_thirdperson;
else
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;
b[2].co[1] = vg_uictx.cursor[1];
b[3].co[1] = vg_uictx.cursor[1];
+#endif
}
VG_STATIC void global_skateshop_exit(void);