projects
/
neverball
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Remove SOL body flags
[neverball]
/
share
/
solid_gl.c
diff --git
a/share/solid_gl.c
b/share/solid_gl.c
index
cd0282c
..
59ba367
100644
(file)
--- a/
share/solid_gl.c
+++ b/
share/solid_gl.c
@@
-25,7
+25,7
@@
#include "image.h"
#include "base_image.h"
#include "solid_gl.h"
#include "image.h"
#include "base_image.h"
#include "solid_gl.h"
-#include "solid_phys.h"
+#include "solid_all.h"
#include "base_config.h"
#include "lang.h"
#include "base_config.h"
#include "lang.h"
@@
-348,15
+348,20
@@
static const struct s_mtrl *sol_draw_body(const struct s_file *fp,
static void sol_draw_list(const struct s_file *fp,
const struct 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];
+ float p[3], e[4], u[3], a;
sol_body_p(p, fp, bp->pi, bp->t);
sol_body_p(p, fp, bp->pi, bp->t);
+ sol_body_e(e, fp, bp);
+
+ q_as_axisangle(e, u, &a);
+ a = V_DEG(a);
glPushMatrix();
{
glPushMatrix();
{
- /* Translate a moving body. */
+ /* Translate and rotate a moving body. */
glTranslatef(p[0], p[1], p[2]);
glTranslatef(p[0], p[1], p[2]);
+ glRotatef(a, u[0], u[1], u[2]);
/* Draw the body. */
/* Draw the body. */
@@
-508,15
+513,20
@@
static void sol_shad_body(const struct s_file *fp,
static void sol_shad_list(const struct s_file *fp,
const struct 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];
+ float p[3], e[4], u[3], a;
sol_body_p(p, fp, bp->pi, bp->t);
sol_body_p(p, fp, bp->pi, bp->t);
+ sol_body_e(e, fp, bp);
+
+ q_as_axisangle(e, u, &a);
+ a = V_DEG(a);
glPushMatrix();
{
glPushMatrix();
{
- /* Translate a moving body. */
+ /* Translate and rotate a moving body. */
glTranslatef(p[0], p[1], p[2]);
glTranslatef(p[0], p[1], p[2]);
+ glRotatef(a, u[0], u[1], u[2]);
/* Translate the shadow on a moving body. */
/* Translate the shadow on a moving body. */
@@
-524,6
+534,7
@@
static void sol_shad_list(const struct s_file *fp,
{
glPushMatrix();
glTranslatef(p[0], p[2], 0.0f);
{
glPushMatrix();
glTranslatef(p[0], p[2], 0.0f);
+ glRotatef(-a, u[0], u[2], u[1]);
}
glMatrixMode(GL_MODELVIEW);
}
glMatrixMode(GL_MODELVIEW);