/*---------------------------------------------------------------------------*/
-static int sol_enum_mtrl(const s_file *fp,
- const s_body *bp, int mi)
+static int sol_enum_mtrl(const struct s_file *fp,
+ const struct s_body *bp, int mi)
{
int li, gi, c = 0;
return c;
}
-static int sol_enum_body(const s_file *fp,
- const s_body *bp, int fl)
+static int sol_enum_body(const struct s_file *fp,
+ const struct s_body *bp, int fl)
{
int mi, c = 0;
/*---------------------------------------------------------------------------*/
-int sol_reflective(const s_file *fp)
+int sol_reflective(const struct s_file *fp)
{
int bi;
tobyte((a)[2]) == tobyte((b)[2]) && \
tobyte((a)[3]) == tobyte((b)[3]))
-static s_mtrl default_mtrl =
+static struct s_mtrl default_mtrl =
{
{ 0.8f, 0.8f, 0.8f, 1.0f },
{ 0.2f, 0.2f, 0.2f, 1.0f },
{ 0.0f, }, 0.0f, M_OPAQUE, 0, ""
};
-static const s_mtrl *sol_draw_mtrl(const s_file *fp,
- const s_mtrl *mp,
- const s_mtrl *mq)
+static const struct s_mtrl *sol_draw_mtrl(const struct s_file *fp,
+ const struct s_mtrl *mp,
+ const struct s_mtrl *mq)
{
/* Change material properties only as needed. */
return mp;
}
-static const s_mtrl *sol_back_bill(const s_file *fp,
- const s_bill *rp,
- const s_mtrl *mp, float t)
+static const struct s_mtrl *sol_back_bill(const struct s_file *fp,
+ const struct s_bill *rp,
+ const struct s_mtrl *mp, float t)
{
float T = (rp->t > 0.0f) ? (fmodf(t, rp->t) - rp->t / 2) : 0.0f;
/*---------------------------------------------------------------------------*/
-void sol_back(const s_file *fp, float n, float f, float t)
+void sol_back(const struct s_file *fp, float n, float f, float t)
{
- const s_mtrl *mp = &default_mtrl;
+ const struct s_mtrl *mp = &default_mtrl;
int ri;
* stored in display lists. Thus, it is well worth it.
*/
-static void sol_draw_geom(const s_file *fp,
- const s_geom *gp, int mi)
+static void sol_draw_geom(const struct s_file *fp,
+ const struct s_geom *gp, int mi)
{
if (gp->mi == mi)
{
}
}
-static void sol_draw_lump(const s_file *fp,
- const s_lump *lp, int mi)
+static void sol_draw_lump(const struct s_file *fp,
+ const struct s_lump *lp, int mi)
{
int i;
sol_draw_geom(fp, fp->gv + fp->iv[lp->g0 + i], mi);
}
-static const s_mtrl *sol_draw_body(const s_file *fp,
- const s_body *bp,
- const s_mtrl *mp,
+static const struct s_mtrl *sol_draw_body(const struct s_file *fp,
+ const struct s_body *bp,
+ const struct s_mtrl *mp,
int fl, int decal)
{
int mi, li, gi;
return mp;
}
-static void sol_draw_list(const s_file *fp,
- const s_body *bp, GLuint list)
+static void sol_draw_list(const struct s_file *fp,
+ const struct s_body *bp, GLuint list)
{
float p[3], e[4], u[3], a;
glPopMatrix();
}
-void sol_draw(const s_file *fp, int depthmask, int depthtest)
+void sol_draw(const struct s_file *fp, int depthmask, int depthtest)
{
int bi;
if (depthtest == 0) glEnable(GL_DEPTH_TEST);
}
-void sol_bill(const s_file *fp, const float *M, float t)
+void sol_bill(const struct s_file *fp, const float *M, float t)
{
- const s_mtrl *mp = &default_mtrl;
+ const struct s_mtrl *mp = &default_mtrl;
int ri;
for (ri = 0; ri < fp->rc; ++ri)
{
- const s_bill *rp = fp->rv + ri;
+ const struct s_bill *rp = fp->rv + ri;
float T = rp->t * t;
float S = fsinf(T);
mp = sol_draw_mtrl(fp, &default_mtrl, mp);
}
-void sol_refl(const s_file *fp)
+void sol_refl(const struct s_file *fp)
{
int bi;
/*---------------------------------------------------------------------------*/
-static void sol_shad_geom(const s_file *fp,
- const s_geom *gp, int mi)
+static void sol_shad_geom(const struct s_file *fp,
+ const struct s_geom *gp, int mi)
{
if (gp->mi == mi)
{
}
}
-static void sol_shad_lump(const s_file *fp,
- const s_lump *lp, int mi)
+static void sol_shad_lump(const struct s_file *fp,
+ const struct s_lump *lp, int mi)
{
int i;
sol_shad_geom(fp, fp->gv + fp->iv[lp->g0 + i], mi);
}
-static void sol_shad_body(const s_file *fp,
- const s_body *bp,
+static void sol_shad_body(const struct s_file *fp,
+ const struct s_body *bp,
int fl, int decal)
{
int mi, li, gi;
glDisable(GL_POLYGON_OFFSET_FILL);
}
-static void sol_shad_list(const s_file *fp,
- const s_body *bp, GLuint list)
+static void sol_shad_list(const struct s_file *fp,
+ const struct s_body *bp, GLuint list)
{
float p[3], e[4], u[3], a;
glPopMatrix();
}
-void sol_shad(const s_file *fp)
+void sol_shad(const struct s_file *fp)
{
int bi;
/*---------------------------------------------------------------------------*/
-static void sol_load_objects(s_file *fp, int s)
+static void sol_load_objects(struct s_file *fp, int s)
{
int i;
for (i = 0; i < fp->bc; i++)
{
- s_body *bp = fp->bv + i;
+ struct s_body *bp = fp->bv + i;
int on = sol_enum_body(fp, bp, M_OPAQUE);
int tn = sol_enum_body(fp, bp, M_TRANSPARENT);
glNewList(fp->bv[i].ol, GL_COMPILE);
{
- const s_mtrl *mp = &default_mtrl;
+ const struct s_mtrl *mp = &default_mtrl;
mp = sol_draw_body(fp, fp->bv + i, mp, M_OPAQUE, 0);
mp = sol_draw_body(fp, fp->bv + i, mp, M_OPAQUE, M_DECAL);
glNewList(fp->bv[i].tl, GL_COMPILE);
{
- const s_mtrl *mp = &default_mtrl;
+ const struct s_mtrl *mp = &default_mtrl;
mp = sol_draw_body(fp, fp->bv + i, mp, M_TRANSPARENT, M_DECAL);
mp = sol_draw_body(fp, fp->bv + i, mp, M_TRANSPARENT, 0);
glNewList(fp->bv[i].rl, GL_COMPILE);
{
- const s_mtrl *mp = &default_mtrl;
+ const struct s_mtrl *mp = &default_mtrl;
mp = sol_draw_body(fp, fp->bv + i, mp, M_REFLECTIVE, 0);
mp = sol_draw_mtrl(fp, &default_mtrl, mp);
return 0;
}
-static void sol_load_textures(s_file *fp)
+static void sol_load_textures(struct s_file *fp)
{
int i;
/*---------------------------------------------------------------------------*/
-int sol_load_gl(s_file *fp, const char *filename, int s)
+int sol_load_gl(struct s_file *fp, const char *filename, int s)
{
if (sol_load_only_file(fp, filename))
{
/*---------------------------------------------------------------------------*/
-void sol_free_gl(s_file *fp)
+void sol_free_gl(struct s_file *fp)
{
int i;