X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_api.h;h=a009d6ddd4201e0594e957370109f77ffff3bab1;hb=0399d5a0a2e1818c3d4951f42abc1132f7e26421;hp=75c387379bdb02ee72e1c9a6c4d37dee4cec1b0d;hpb=e3bf80ff27b675f5e7f87dcebd16fab6fe08df7a;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_api.h b/player_api.h index 75c3873..a009d6d 100644 --- a/player_api.h +++ b/player_api.h @@ -1,73 +1,25 @@ #ifndef PLAYER_API_H #define PLAYER_API_H -#define VG_GAME -#include "vg/vg.h" - -#include "player_ragdoll.h" -#include "player_model.h" - -/* - * Defines a set of routines used to interact with the player - */ +#include "model.h" +#include "camera.h" +#include "entity.h" #define PLAYER_API VG_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 - +struct player_animation{ player_pose pose; v3f root_co; v4f root_q; -}; - -/* - * Init - */ -PLAYER_API void player_create ( player_instance *player ); -/* - * 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 ); - - -/* - * 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 ); - -/* - * 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, ... ); + enum player_animation_type { + k_player_animation_type_fk, /* regular FK animation */ + k_player_animation_type_absolute /* decomposition of the final matrices */ + } + type; +}; #endif /* PLAYER_API_H */