#include "binary.h"
#define MAGIC 0x4F425251 /* Neverball sol file magic number (should not change) */
-#define SOL_VERSION 4 /* Neverball sol file format version (can change) */
+#define SOL_VERSION 5 /* Neverball sol file format version (can change) */
#define LARGE 1.0e+5f
get_array(fin, bp->e[2], 3);
get_array(fin, bp->p, 3);
get_float(fin, &bp->r);
+ get_float(fin, &bp->a);
}
static void sol_load_view(FILE *fin, struct s_view *wp)
put_array(fout, bp->e[2], 3);
put_array(fout, bp->p, 3);
put_float(fout, &bp->r);
+ put_float(fout, &bp->a);
}
static void sol_stor_view(FILE *fout, struct s_view *wp)
const float o[3],
const float w[3])
{
- float U[3], u, t = dt;
+ float U[3] = {0.0f, 0.0f, 0.0f}; /* set some init value only for avoid gcc warnings */
+ float u, t = dt;
int i;
/* Short circuit a non-solid lump. */
return 0;
}
-int sol_goal_test(struct s_file *fp, float *p, int ui)
+struct s_goal *sol_goal_test(struct s_file *fp, float *p, int ui)
{
const float *ball_p = fp->uv[ui].p;
const float ball_r = fp->uv[ui].r;
p[1] = fp->zv[zi].p[1];
p[2] = fp->zv[zi].p[2];
- return 1 + fp->zv[zi].s;
+ return &fp->zv[zi];
}
}
- return 0;
+ return NULL;
}
int sol_jump_test(struct s_file *fp, float *p, int ui)