X-Git-Url: https://harrygodden.com/git/?a=blobdiff_plain;f=player_api.h;h=68f5aca348d6ebd5c676b22d3ecde082705bbe42;hb=494c85703c76c4123c49937a32584840b6be1470;hp=a009d6ddd4201e0594e957370109f77ffff3bab1;hpb=b615f03b922d155f9449d2a23d3cc18eed320ed3;p=carveJwlIkooP6JGAAIwe30JlM.git diff --git a/player_api.h b/player_api.h index a009d6d..68f5aca 100644 --- a/player_api.h +++ b/player_api.h @@ -1,25 +1,35 @@ -#ifndef PLAYER_API_H -#define PLAYER_API_H - +#pragma once #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{ - player_pose pose; - v3f root_co; - v4f root_q; +typedef struct player_pose player_pose; - enum player_animation_type { - k_player_animation_type_fk, /* regular FK animation */ - k_player_animation_type_absolute /* decomposition of the final matrices */ +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; + + mdl_keyframe keyframes[32]; + + 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 +};