X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_api.h;h=68f5aca348d6ebd5c676b22d3ecde082705bbe42;hb=494c85703c76c4123c49937a32584840b6be1470;hp=8819772a78912f446bb89e8fcf3fb6178dc5d0b4;hpb=34a8df54eb962f3ad2e036355041f5bc5cabe5a0;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_api.h b/player_api.h index 8819772..68f5aca 100644 --- a/player_api.h +++ b/player_api.h @@ -1,73 +1,35 @@ -#ifndef PLAYER_API_H -#define PLAYER_API_H +#pragma once +#include "model.h" +#include "camera.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 - */ - -#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 - - 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 ); +typedef struct player_pose player_pose; +struct player_pose{ + enum player_pose_type { + k_player_pose_type_ik, /* regular IK animation */ + k_player_pose_type_fk_2, + } + type; -/* - * 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 ); + v3f root_co; + v4f root_q; -/* - * 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 ); + mdl_keyframe keyframes[32]; -/* - * Utiltiy - * ---------------------------------------------------------------------------- - */ -PLAYER_API void player__debugtext( int size, const char *fmt, ... ); + struct player_board_pose { + f32 lean; + } + board; +}; -#endif /* PLAYER_API_H */ +enum player_subsystem{ + k_player_subsystem_walk = 0, + k_player_subsystem_skate = 1, + k_player_subsystem_dead = 2, + k_player_subsystem_drive = 3, + k_player_subsystem_basic_info = 4, + k_player_subsystem_glide = 5, + k_player_subsystem_max, + k_player_subsystem_invalid = 255 +};