mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-10 15:22:04 +00:00
Do some more const correctness.
This commit is contained in:
parent
7e406c20e5
commit
2b6adaa2d4
4 changed files with 14 additions and 13 deletions
|
@ -47,9 +47,9 @@ extern int part_tex_smoke;
|
||||||
extern int part_tex_spark;
|
extern int part_tex_spark;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
void GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean alpha);
|
void GL_Upload8 (const byte *data, int width, int height, qboolean mipmap, qboolean alpha);
|
||||||
void GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap, qboolean alpha);
|
void GL_Upload8_EXT (const byte *data, int width, int height, qboolean mipmap, qboolean alpha);
|
||||||
int GL_LoadTexture (const char *identifier, int width, int height, byte *data, qboolean mipmap, qboolean alpha, int bytesperpixel);
|
int GL_LoadTexture (const char *identifier, int width, int height, const byte *data, qboolean mipmap, qboolean alpha, int bytesperpixel);
|
||||||
int GL_FindTexture (const char *identifier);
|
int GL_FindTexture (const char *identifier);
|
||||||
|
|
||||||
void GL_TextureMode_f (void);
|
void GL_TextureMode_f (void);
|
||||||
|
|
|
@ -38,9 +38,9 @@
|
||||||
|
|
||||||
void CRC_Init(unsigned short *crcvalue);
|
void CRC_Init(unsigned short *crcvalue);
|
||||||
void CRC_ProcessByte(unsigned short *crcvalue, byte data);
|
void CRC_ProcessByte(unsigned short *crcvalue, byte data);
|
||||||
void CRC_ProcessBlock (byte *start, unsigned short *crcvalue, int count);
|
void CRC_ProcessBlock (const byte *start, unsigned short *crcvalue, int count);
|
||||||
unsigned short CRC_Value(unsigned short crcvalue);
|
unsigned short CRC_Value(unsigned short crcvalue);
|
||||||
unsigned short CRC_Block (byte *start, int count);
|
unsigned short CRC_Block (const byte *start, int count);
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ CRC_ProcessByte (unsigned short *crcvalue, byte data)
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE void
|
VISIBLE void
|
||||||
CRC_ProcessBlock (byte *start, unsigned short *crcvalue, int count)
|
CRC_ProcessBlock (const byte *start, unsigned short *crcvalue, int count)
|
||||||
{
|
{
|
||||||
unsigned short crc = *crcvalue;
|
unsigned short crc = *crcvalue;
|
||||||
while (count--)
|
while (count--)
|
||||||
|
@ -104,7 +104,7 @@ CRC_Value (unsigned short crcvalue)
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE unsigned short
|
VISIBLE unsigned short
|
||||||
CRC_Block (byte *start, int count)
|
CRC_Block (const byte *start, int count)
|
||||||
{
|
{
|
||||||
unsigned short crc;
|
unsigned short crc;
|
||||||
|
|
||||||
|
|
|
@ -284,11 +284,11 @@ GL_ResampleTexture (unsigned int *in, int inwidth, int inheight,
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
GL_Resample8BitTexture (unsigned char *in, int inwidth, int inheight,
|
GL_Resample8BitTexture (const unsigned char *in, int inwidth, int inheight,
|
||||||
unsigned char *out, int outwidth, int outheight)
|
unsigned char *out, int outwidth, int outheight)
|
||||||
{
|
{
|
||||||
// Improvements here should be mirrored in build_skin_8 in gl_skin.c
|
// Improvements here should be mirrored in build_skin_8 in gl_skin.c
|
||||||
unsigned char *inrow;
|
const unsigned char *inrow;
|
||||||
int i, j;
|
int i, j;
|
||||||
unsigned int frac, fracstep;
|
unsigned int frac, fracstep;
|
||||||
|
|
||||||
|
@ -445,7 +445,7 @@ GL_Upload32 (unsigned int *data, int width, int height, qboolean mipmap,
|
||||||
If we don't, this function does nothing.
|
If we don't, this function does nothing.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap,
|
GL_Upload8_EXT (const byte *data, int width, int height, qboolean mipmap,
|
||||||
qboolean alpha)
|
qboolean alpha)
|
||||||
{
|
{
|
||||||
byte *scaled;
|
byte *scaled;
|
||||||
|
@ -516,7 +516,8 @@ GL_Upload8_EXT (byte *data, int width, int height, qboolean mipmap,
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean alpha)
|
GL_Upload8 (const byte *data, int width, int height, qboolean mipmap,
|
||||||
|
qboolean alpha)
|
||||||
{
|
{
|
||||||
int i, s, p;
|
int i, s, p;
|
||||||
unsigned int *trans;
|
unsigned int *trans;
|
||||||
|
@ -537,7 +538,7 @@ GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean alpha)
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
unsigned int *out = trans;
|
unsigned int *out = trans;
|
||||||
byte *in = data;
|
const byte *in = data;
|
||||||
for (i = 0; i < s; i++) {
|
for (i = 0; i < s; i++) {
|
||||||
*out++ = d_8to24table[*in++];
|
*out++ = d_8to24table[*in++];
|
||||||
}
|
}
|
||||||
|
@ -553,7 +554,7 @@ GL_Upload8 (byte *data, int width, int height, qboolean mipmap, qboolean alpha)
|
||||||
}
|
}
|
||||||
|
|
||||||
VISIBLE int
|
VISIBLE int
|
||||||
GL_LoadTexture (const char *identifier, int width, int height, byte *data,
|
GL_LoadTexture (const char *identifier, int width, int height, const byte *data,
|
||||||
qboolean mipmap, qboolean alpha, int bytesperpixel)
|
qboolean mipmap, qboolean alpha, int bytesperpixel)
|
||||||
{
|
{
|
||||||
int crc, i;
|
int crc, i;
|
||||||
|
|
Loading…
Reference in a new issue