mirror of https://github.com/skeeto/pixelcity.git
Fixed bug which was tinting all lights yellow.
This commit is contained in:
parent
c2bd5f14da
commit
e5a507289b
|
@ -106,7 +106,7 @@ CLight::CLight (GLvector pos, GLrgba color, int size)
|
|||
{
|
||||
|
||||
_position = pos;
|
||||
_color = color * 0.5f;
|
||||
_color = color;
|
||||
_size = CLAMP (size, 0, (MAX_SIZE - 1));
|
||||
_vert_size = (float)_size + 0.5f;
|
||||
_flat_size = _vert_size + 0.5f;
|
||||
|
@ -160,7 +160,6 @@ void CLight::Render ()
|
|||
angle = (int)MathAngle (camera.y);
|
||||
offset = angles[_size][angle];
|
||||
pos = _position;
|
||||
//m_color.alpha = 0.25f;
|
||||
glColor4fv (&_color.red);
|
||||
glTexCoord2f (0, 0);
|
||||
glVertex3f (pos.x + offset.x, pos.y - _vert_size, pos.z + offset.y);
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
|
||||
I apologize in advance for the apalling state of this module. It's the victim
|
||||
of iterative and experimental development. It has cruft, poorly named
|
||||
functions, obscure code, poorly named variables, a is poorly organized. Even
|
||||
functions, obscure code, poorly named variables, and is badly organized. Even
|
||||
the formatting sucks in places. Its only saving grace is that it works.
|
||||
|
||||
-----------------------------------------------------------------------------*/
|
||||
|
@ -41,6 +41,7 @@
|
|||
#include "sky.h"
|
||||
#include "texture.h"
|
||||
#include "world.h"
|
||||
#include "win.h"
|
||||
|
||||
static char* prefix[] =
|
||||
{
|
||||
|
@ -122,6 +123,7 @@ static char* suffix[] =
|
|||
" UK",
|
||||
" Unlimited",
|
||||
" One",
|
||||
" LLC"
|
||||
};
|
||||
|
||||
class CTexture
|
||||
|
@ -582,7 +584,7 @@ void CTexture::Rebuild ()
|
|||
radius = ((float)_half / 2);
|
||||
else
|
||||
radius = 8;
|
||||
glColor4f (1, 1, 0, 0);
|
||||
glColor4f (1, 1, 1, 0);
|
||||
for (i = 0; i <= 360; i++) {
|
||||
pos.x = sinf ((float)i * DEGREES_TO_RADIANS) * radius;
|
||||
pos.y = cosf ((float)i * DEGREES_TO_RADIANS) * radius;
|
||||
|
|
Loading…
Reference in New Issue