mirror of
https://git.code.sf.net/p/quake/newtree
synced 2024-11-10 06:42:26 +00:00
source/vid_glx.c:
#if 0 the signal code. wouldn't compile otherwise, but not game to nuke it just yet include/win32/version.h: buggered if I know. fscking configure/cvs :) include/glquake.h: remove size declarations from bubble_sintable and bubble_costable source/gl_part.c source/gl_rlight.c: 32 segments in a circle now instead of 16 and change the pointer math to cope source/gl_warp.c: nothing much. just almost double my fps. (hint: the above tables)
This commit is contained in:
parent
29ef95a9b5
commit
b25d03c602
5 changed files with 20 additions and 19 deletions
|
@ -297,7 +297,7 @@ void R_RotateForEntity (entity_t *e);
|
|||
// gl_rlight.c
|
||||
//
|
||||
|
||||
extern float bubble_sintable[17], bubble_costable[17];
|
||||
extern float bubble_sintable[], bubble_costable[];
|
||||
extern float v_blend[4];
|
||||
|
||||
void R_MarkLights (dlight_t *light, int bit, mnode_t *node);
|
||||
|
|
|
@ -781,8 +781,8 @@ R_DrawFire (fire_t *f)
|
|||
glVertex3fv (vec);
|
||||
glVertex3fv (vec2);
|
||||
|
||||
b_sin++;
|
||||
b_cos++;
|
||||
b_sin+=2;
|
||||
b_cos+=2;
|
||||
}
|
||||
glEnd ();
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ void AddLightBlend (float r, float g, float b, float a2)
|
|||
//Con_Printf("AddLightBlend(): %4.2f %4.2f %4.2f %4.6f\n", v_blend[0], v_blend[1], v_blend[2], v_blend[3]);
|
||||
}
|
||||
|
||||
float bubble_sintable[17], bubble_costable[17];
|
||||
float bubble_sintable[33], bubble_costable[33];
|
||||
|
||||
void R_InitBubble() {
|
||||
float a;
|
||||
|
@ -116,9 +116,9 @@ void R_InitBubble() {
|
|||
bub_sin = bubble_sintable;
|
||||
bub_cos = bubble_costable;
|
||||
|
||||
for (i=16 ; i>=0 ; i--)
|
||||
for (i=32 ; i>=0 ; i--)
|
||||
{
|
||||
a = i/16.0 * M_PI*2;
|
||||
a = i/32.0 * M_PI*2;
|
||||
*bub_sin++ = sin(a);
|
||||
*bub_cos++ = cos(a);
|
||||
}
|
||||
|
@ -157,8 +157,8 @@ void R_RenderDlight (dlight_t *light)
|
|||
for (j=0 ; j<3 ; j++)
|
||||
v[j] = light->origin[j] + (vright[j]*(*bub_cos) +
|
||||
+ vup[j]*(*bub_sin)) * rad;
|
||||
bub_sin++;
|
||||
bub_cos++;
|
||||
bub_sin+=2;
|
||||
bub_cos+=2;
|
||||
glVertex3fv (v);
|
||||
}
|
||||
glEnd ();
|
||||
|
|
|
@ -677,21 +677,22 @@ vec3_t domescale;
|
|||
void
|
||||
R_DrawSkyLayer (float s)
|
||||
{
|
||||
float a, b, x, y, a1x, a1y, a2x, a2y;
|
||||
int a, b;
|
||||
float x, y, a1x, a1y, a2x, a2y;
|
||||
vec3_t v;
|
||||
|
||||
for (a = 0; a < 1; a += (1.0 / 32.0))
|
||||
for (a = 0; a < 32; a++)
|
||||
{
|
||||
a1x = cos(a * M_PI * 2);
|
||||
a1y = -sin(a * M_PI * 2);
|
||||
a2x = cos((a+(1.0/32.0)) * M_PI * 2);
|
||||
a2y = -sin((a+(1.0/32.0)) * M_PI * 2);
|
||||
a1x = bubble_costable[a];
|
||||
a1y = -bubble_sintable[a];
|
||||
a2x = bubble_costable[a+1];
|
||||
a2y = -bubble_sintable[a+1];
|
||||
|
||||
glBegin (GL_TRIANGLE_STRIP);
|
||||
for (b = 0; b <= 1; b += (1.0 / 32.0))
|
||||
for (b = 0; b <= 32; b++)
|
||||
{
|
||||
x = cos(b * M_PI * 2);
|
||||
y = -sin(b * M_PI * 2);
|
||||
x = bubble_costable[b];
|
||||
y = -bubble_sintable[b];
|
||||
|
||||
v[0] = a1x*x * domescale[0];
|
||||
v[1] = a1y*x * domescale[1];
|
||||
|
|
|
@ -183,7 +183,7 @@ VID_Shutdown(void)
|
|||
#endif
|
||||
x11_close_display();
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
signal_handler(int sig)
|
||||
{
|
||||
|
@ -206,7 +206,7 @@ InitSig(void)
|
|||
signal(SIGSEGV, signal_handler);
|
||||
signal(SIGTERM, signal_handler);
|
||||
}
|
||||
|
||||
#endif
|
||||
void VID_ShiftPalette(unsigned char *p)
|
||||
{
|
||||
VID_SetPalette(p);
|
||||
|
|
Loading…
Reference in a new issue