sandsurf/glide basics
[carveJwlIkooP6JGAAIwe30JlM.git] / player_glide.h
diff --git a/player_glide.h b/player_glide.h
new file mode 100644 (file)
index 0000000..e50fde3
--- /dev/null
@@ -0,0 +1,48 @@
+#ifndef PLAYER_GLIDE_H
+#define PLAYER_GLIDE_H
+
+#include "player.h"
+
+struct player_glide {
+   struct skeleton_anim *anim_temp;
+
+   struct player_glide_animator {
+      v3f root_co;
+      v4f root_q;
+   }
+   animator;
+
+   v3f info_lift,
+       info_slip,
+       info_drag;
+
+   u32 ticker;
+}
+static player_glide;
+
+static void player_glide_pre_update(void);
+static void player_glide_update(void);
+static void player_glide_post_update(void);
+static void player_glide_animate(void);
+static void player_glide_pose( void *animator, player_pose *pose );
+
+static void player_glide_post_animate(void);
+static void player_glide_im_gui(void);
+static void player_glide_bind(void);
+
+struct player_subsystem_interface static player_subsystem_glide = {
+   .pre_update = player_glide_pre_update,
+   .update = player_glide_update,
+   .post_update = player_glide_post_update,
+   .animate = player_glide_animate,
+   .pose = player_glide_pose,
+   .post_animate = player_glide_post_animate,
+   .im_gui = player_glide_im_gui,
+   .bind = player_glide_bind,
+
+   .animator_data = &player_glide.animator,
+   .animator_size = sizeof(player_glide.animator),
+   .name = "Glide"
+};
+
+#endif /* PLAYER_GLIDE_H */