static rtexturepool_t *drawtexturepool;
-static byte pointerimage[256] =
+static qbyte pointerimage[256] =
{
"333333332......."
"26777761........"
static rtexture_t *draw_generatemousepointer(void)
{
int i;
- byte buffer[256][4];
+ qbyte buffer[256][4];
for (i = 0;i < 256;i++)
{
if (pointerimage[i] == '.')
// must match NUMCROSSHAIRS in r_crosshairs.c
#define NUMCROSSHAIRS 5
-static byte *crosshairtexdata[NUMCROSSHAIRS] =
+static qbyte *crosshairtexdata[NUMCROSSHAIRS] =
{
"................"
"................"
{
int i;
char *in;
- byte data[16*16][4];
+ qbyte data[16*16][4];
in = crosshairtexdata[num];
for (i = 0;i < 16*16;i++)
{
data[i][0] = 255;
data[i][1] = 255;
data[i][2] = 255;
- data[i][3] = (byte) ((int) (in[i] - '0') * 255 / 7);
+ data[i][3] = (qbyte) ((int) (in[i] - '0') * 255 / 7);
}
}
return R_LoadTexture(drawtexturepool, va("crosshair%i", num), 16, 16, &data[0][0], TEXTYPE_RGBA, TEXF_ALPHA | TEXF_PRECACHE);
{
if (!strcmp(path, "conchars"))
{
- byte *pix;
+ qbyte *pix;
// conchars is a raw image and with the wrong transparent color
- pix = (byte *)p;
+ pix = (qbyte *)p;
for (i = 0;i < 128 * 128;i++)
if (pix[i] == 0)
pix[i] = 255;
if (color != dq->color)
{
color = dq->color;
- glColor4ub((byte)((color >> 24) & 0xFF) >> overbright, (byte)((color >> 16) & 0xFF) >> overbright, (byte)((color >> 8) & 0xFF) >> overbright, (byte)(color & 0xFF));
+ glColor4ub((qbyte)(((color >> 24) & 0xFF) >> overbright), (qbyte)(((color >> 16) & 0xFF) >> overbright), (qbyte)(((color >> 8) & 0xFF) >> overbright), (qbyte)(color & 0xFF));
}
x = dq->x;
y = dq->y;
glBegin (GL_TRIANGLES);
while (t >= 1.01f)
{
- if (t >= 2)
- glColor3f (1, 1, 1);
- else
- glColor3f (t-1, t-1, t-1);
+ num = (int) ((t - 1.0f) * 255.0f);
+ if (num > 255)
+ num = 255;
+ glColor4ub ((qbyte) num, (qbyte) num, (qbyte) num, 255);
glVertex2f (-5000, -5000);
glVertex2f (10000, -5000);
glVertex2f (-5000, 10000);
glBlendFunc(GL_ZERO, GL_SRC_COLOR);
CHECKGLERROR
glBegin(GL_TRIANGLES);
- glColor3f(t, t, t);
- glVertex2f(-5000, -5000);
- glVertex2f(10000, -5000);
- glVertex2f(-5000, 10000);
+ num = (int) (t * 255.0f);
+ glColor4ub ((qbyte) num, (qbyte) num, (qbyte) num, 255);
+ glVertex2f (-5000, -5000);
+ glVertex2f (10000, -5000);
+ glVertex2f (-5000, 10000);
glEnd();
CHECKGLERROR
}
{
glBlendFunc (GL_ONE, GL_ONE);
CHECKGLERROR
- glColor3f (v_brightness.value, v_brightness.value, v_brightness.value);
+ num = (int) (v_brightness.value * 255.0f);
+ glColor4ub ((qbyte) num, (qbyte) num, (qbyte) num, 255);
CHECKGLERROR
glBegin (GL_TRIANGLES);
glVertex2f (-5000, -5000);
CHECKGLERROR
glEnable (GL_DEPTH_TEST);
CHECKGLERROR
- glDisable(GL_BLEND);
+ glDisable (GL_BLEND);
CHECKGLERROR
- glColor3f(1,1,1);
+ glColor4ub (255, 255, 255, 255);
CHECKGLERROR
}