Add missing credit for Esperanto translation
[neverball.git] / share / solid_vary.h
blobec190f3a69e81d50c266af992de585be3c7685fe
1 /*
2 * Copyright (C) 2003 Robert Kooima
4 * NEVERBALL is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published
6 * by the Free Software Foundation; either version 2 of the License,
7 * or (at your option) any later version.
9 * This program is distributed in the hope that it will be useful, but
10 * WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * General Public License for more details.
15 #ifndef SOLID_VARY_H
16 #define SOLID_VARY_H
18 #include "base_config.h"
19 #include "solid_base.h"
22 * Varying solid data.
25 /*---------------------------------------------------------------------------*/
27 struct v_path
29 const struct b_path *base;
31 int f; /* enable flag */
34 struct v_body
36 const struct b_body *base;
38 int mi;
39 int mj;
42 struct v_move
44 float t; /* time on current path */
45 int tm; /* milliseconds */
47 int pi;
50 struct v_item
52 float p[3]; /* position */
53 int t; /* type */
54 int n; /* value */
57 struct v_swch
59 const struct b_swch *base;
61 float t; /* current timer */
62 int tm; /* milliseconds */
63 int f; /* current state */
64 int e; /* is a ball inside it? */
67 struct v_ball
69 float e[3][3]; /* basis of orientation */
70 float p[3]; /* position vector */
71 float v[3]; /* velocity vector */
72 float w[3]; /* angular velocity vector */
73 float E[3][3]; /* basis of pendulum */
74 float W[3]; /* angular pendulum velocity */
75 float r; /* radius */
78 struct s_vary
80 struct s_base *base;
82 int pc;
83 int bc;
84 int mc;
85 int hc;
86 int xc;
87 int uc;
89 struct v_path *pv;
90 struct v_body *bv;
91 struct v_move *mv;
92 struct v_item *hv;
93 struct v_swch *xv;
94 struct v_ball *uv;
96 /* Accumulator for tracking time in integer milliseconds. */
98 float ms_accum;
101 /*---------------------------------------------------------------------------*/
103 int sol_load_vary(struct s_vary *, struct s_base *);
104 void sol_free_vary(struct s_vary *);
106 /*---------------------------------------------------------------------------*/
109 * Buffers changes to the varying SOL data for interpolation purposes.
112 struct l_move
114 float t; /* time on current path */
116 int pi;
119 struct l_ball
121 float e[3][3]; /* basis of orientation */
122 float p[3]; /* position vector */
123 float E[3][3]; /* basis of pendulum */
124 float r; /* radius */
127 struct s_lerp
129 struct s_vary *vary;
131 int mc;
132 int uc;
134 struct l_move (*mv)[2];
135 struct l_ball (*uv)[2];
138 /*---------------------------------------------------------------------------*/
140 #include "cmd.h"
142 int sol_load_lerp(struct s_lerp *, struct s_vary *);
143 void sol_free_lerp(struct s_lerp *);
145 void sol_lerp_copy(struct s_lerp *);
146 void sol_lerp_apply(struct s_lerp *, float);
147 int sol_lerp_cmd(struct s_lerp *, struct cmd_state *, const union cmd *);
149 /*---------------------------------------------------------------------------*/
151 #endif