X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_api.h;h=b3b6907c047b165e372baabcb7e9c495a1fd990c;hb=137d40d96fe923600d8378b8e138e3c276f27ff4;hp=75c387379bdb02ee72e1c9a6c4d37dee4cec1b0d;hpb=e3bf80ff27b675f5e7f87dcebd16fab6fe08df7a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_api.h b/player_api.h index 75c3873..b3b6907 100644 --- a/player_api.h +++ b/player_api.h @@ -1,73 +1,30 @@ #ifndef PLAYER_API_H #define PLAYER_API_H -#define VG_GAME -#include "vg/vg.h" +#include "model.h" +#include "camera.h" +#include "entity.h" -#include "player_ragdoll.h" -#include "player_model.h" - -/* - * Defines a set of routines used to interact with the player - */ - -#define PLAYER_API VG_STATIC +#define PLAYER_API static typedef struct player_instance player_instance; -typedef mdl_keyframe player_pose[32]; -typedef struct player_animation player_animation; - -struct player_animation -{ -#if 0 - camera camera_firstperson, - camera_thirdperson; -#endif - - player_pose pose; - v3f root_co; - v4f root_q; -}; - -/* - * Init - */ -PLAYER_API void player_create ( player_instance *player ); +typedef struct player_pose player_pose; -/* - * Appearence - */ -PLAYER_API void player_use_avatar ( player_instance *player, - struct player_avatar *av ); -PLAYER_API void player_use_mesh ( player_instance *player, glmesh *mesh ); -PLAYER_API void player_use_texture ( player_instance *player, vg_tex2d *tex ); +struct player_pose{ + enum player_pose_type { + k_player_pose_type_ik, /* regular IK animation */ + k_player_pose_type_fk_2, + } + type; + v3f root_co; + v4f root_q; -/* - * Gameloop events - * ---------------------------------------------------------------------------- - */ -PLAYER_API void player__bind ( player_instance *player ); -PLAYER_API void player__pre_update ( player_instance *player ); -PLAYER_API void player__update ( player_instance *player ); -PLAYER_API void player__post_update ( player_instance *player ); -PLAYER_API void player__pre_render ( player_instance *player ); -PLAYER_API void player__render ( camera *cam, player_instance *player ); -PLAYER_API void player__im_gui ( player_instance *player ); + mdl_keyframe keyframes[32]; -/* - * Mechanic events - * ---------------------------------------------------------------------------- - */ -PLAYER_API void player__spawn ( player_instance *player, - struct respawn_point *rp ); -PLAYER_API void player__kill ( player_instance *player ); -PLAYER_API void player__pass_gate ( player_instance *player, - teleport_gate *gate ); - -/* - * Utiltiy - * ---------------------------------------------------------------------------- - */ -PLAYER_API void player__debugtext( int size, const char *fmt, ... ); + struct player_board_pose { + f32 lean; + } + board; +}; #endif /* PLAYER_API_H */