diff options
author | neoraider <devnull@localhost> | 2006-10-24 17:04:02 +0200 |
---|---|---|
committer | neoraider <devnull@localhost> | 2006-10-24 17:04:02 +0200 |
commit | e43bceafaba72d34dfbea1deecd56c2f694d704a (patch) | |
tree | f403b0e076df599084d55bf04e546b565731e3c6 /player.c | |
parent | 79801b6b794a5fb50a3a013354323a48de37c050 (diff) | |
download | libzoom-e43bceafaba72d34dfbea1deecd56c2f694d704a.tar libzoom-e43bceafaba72d34dfbea1deecd56c2f694d704a.zip |
Beleuchtung und Rendering ge?ndert, um Schatten zu erm?glichen.
Diffstat (limited to 'player.c')
-rw-r--r-- | player.c | 34 |
1 files changed, 18 insertions, 16 deletions
@@ -2,6 +2,7 @@ #include <math.h> #include <zoom/player.h> #include <zoom/level.h> +#include <zoom/light.h> #include <neofx/collision.h> #include <neofx/math.h> @@ -20,7 +21,8 @@ float rotxspeed = 0, rotyspeed = 0; float objrot = 0; extern LEVEL level; -extern LIGHT light; +extern int nLights; +extern LIGHT *lights; void MouseInput(int x, int y) { roty += x * 0.3; @@ -223,28 +225,28 @@ void DoInput(int delta) { else i = 24000 - lightpos; if(i == 0) { - light.pos.x = 0.0; - light.pos.y = 0.0; - light.pos.z = 0.0; + lights[0].pos.x = 0.0; + lights[0].pos.y = 0.0; + lights[0].pos.z = 0.0; } else if(i < 4000) { - light.pos.x = 0.0; - light.pos.y = 0.0; - light.pos.z = -i * 0.001; + lights[0].pos.x = 0.0; + lights[0].pos.y = 0.0; + lights[0].pos.z = -i * 0.001; } else if(i < 8000) { - light.pos.x = (i-4000) * 0.001; - light.pos.y = 0.0; - light.pos.z = -4.0; + lights[0].pos.x = (i-4000) * 0.001; + lights[0].pos.y = 0.0; + lights[0].pos.z = -4.0; } else if(i < 12000) { - light.pos.x = 4.0; - light.pos.y = 0.0; - light.pos.z = -4.0 - (i-8000) * 0.001; + lights[0].pos.x = 4.0; + lights[0].pos.y = 0.0; + lights[0].pos.z = -4.0 - (i-8000) * 0.001; } else { - light.pos.x = 4.0; - light.pos.y = 0.0; - light.pos.z = -8.0; + lights[0].pos.x = 4.0; + lights[0].pos.y = 0.0; + lights[0].pos.z = -8.0; } } |