#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,
- struct gate_hit *hit );
-
-/*
- * Utiltiy
- * ----------------------------------------------------------------------------
- */
-PLAYER_API void player__debugtext( int size, const char *fmt, ... );
+ struct player_board_pose {
+ f32 lean;
+ }
+ board;
+};
#endif /* PLAYER_API_H */