mirror of
https://github.com/ioquake/ioq3.git
synced 2024-11-10 07:11:46 +00:00
Fix assorted warnings
This commit is contained in:
parent
107cae63d6
commit
7d026177ad
7 changed files with 12 additions and 118 deletions
|
@ -2108,7 +2108,7 @@ int AAS_Reachability_Jump(int area1num, int area2num)
|
||||||
int stopevent, areas[10], numareas;
|
int stopevent, areas[10], numareas;
|
||||||
float phys_jumpvel, maxjumpdistance, maxjumpheight, height, bestdist, speed;
|
float phys_jumpvel, maxjumpdistance, maxjumpheight, height, bestdist, speed;
|
||||||
vec_t *v1, *v2, *v3, *v4;
|
vec_t *v1, *v2, *v3, *v4;
|
||||||
vec3_t beststart, beststart2, bestend, bestend2;
|
vec3_t beststart, beststart2 = {0}, bestend, bestend2 = {0};
|
||||||
vec3_t teststart, testend, dir, velocity, cmdmove, up = {0, 0, 1}, sidewards;
|
vec3_t teststart, testend, dir, velocity, cmdmove, up = {0, 0, 1}, sidewards;
|
||||||
aas_area_t *area1, *area2;
|
aas_area_t *area1, *area2;
|
||||||
aas_face_t *face1, *face2;
|
aas_face_t *face1, *face2;
|
||||||
|
@ -3152,7 +3152,7 @@ aas_lreachability_t *AAS_FindFaceReachabilities(vec3_t *facepoints, int numpoint
|
||||||
int facenum, edgenum, bestfacenum;
|
int facenum, edgenum, bestfacenum;
|
||||||
float *v1, *v2, *v3, *v4;
|
float *v1, *v2, *v3, *v4;
|
||||||
float bestdist, speed, hordist, dist;
|
float bestdist, speed, hordist, dist;
|
||||||
vec3_t beststart, beststart2, bestend, bestend2, tmp, hordir, testpoint;
|
vec3_t beststart, beststart2 = {0}, bestend, bestend2 = {0}, tmp, hordir, testpoint;
|
||||||
aas_lreachability_t *lreach, *lreachabilities;
|
aas_lreachability_t *lreach, *lreachabilities;
|
||||||
aas_area_t *area;
|
aas_area_t *area;
|
||||||
aas_face_t *face;
|
aas_face_t *face;
|
||||||
|
|
|
@ -1770,7 +1770,7 @@ int AAS_AreaRouteToGoalArea(int areanum, vec3_t origin, int goalareanum, int tra
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
int AAS_AreaTravelTimeToGoalArea(int areanum, vec3_t origin, int goalareanum, int travelflags)
|
int AAS_AreaTravelTimeToGoalArea(int areanum, vec3_t origin, int goalareanum, int travelflags)
|
||||||
{
|
{
|
||||||
int traveltime, reachnum;
|
int traveltime, reachnum = 0;
|
||||||
|
|
||||||
if (AAS_AreaRouteToGoalArea(areanum, origin, goalareanum, travelflags, &traveltime, &reachnum))
|
if (AAS_AreaRouteToGoalArea(areanum, origin, goalareanum, travelflags, &traveltime, &reachnum))
|
||||||
{
|
{
|
||||||
|
@ -1786,7 +1786,7 @@ int AAS_AreaTravelTimeToGoalArea(int areanum, vec3_t origin, int goalareanum, in
|
||||||
//===========================================================================
|
//===========================================================================
|
||||||
int AAS_AreaReachabilityToGoalArea(int areanum, vec3_t origin, int goalareanum, int travelflags)
|
int AAS_AreaReachabilityToGoalArea(int areanum, vec3_t origin, int goalareanum, int travelflags)
|
||||||
{
|
{
|
||||||
int traveltime, reachnum;
|
int traveltime, reachnum = 0;
|
||||||
|
|
||||||
if (AAS_AreaRouteToGoalArea(areanum, origin, goalareanum, travelflags, &traveltime, &reachnum))
|
if (AAS_AreaRouteToGoalArea(areanum, origin, goalareanum, travelflags, &traveltime, &reachnum))
|
||||||
{
|
{
|
||||||
|
|
|
@ -163,7 +163,7 @@ static OPUS_INLINE void silk_LDL_FLP(
|
||||||
opus_int i, j, k, loop_count, err = 1;
|
opus_int i, j, k, loop_count, err = 1;
|
||||||
silk_float *ptr1, *ptr2;
|
silk_float *ptr1, *ptr2;
|
||||||
double temp, diag_min_value;
|
double temp, diag_min_value;
|
||||||
silk_float v[ MAX_MATRIX_SIZE ], D[ MAX_MATRIX_SIZE ]; /* temp arrays*/
|
silk_float v[ MAX_MATRIX_SIZE ] = { 0 }, D[ MAX_MATRIX_SIZE ]; /* temp arrays*/
|
||||||
|
|
||||||
silk_assert( M <= MAX_MATRIX_SIZE );
|
silk_assert( M <= MAX_MATRIX_SIZE );
|
||||||
|
|
||||||
|
|
|
@ -1715,7 +1715,7 @@ opus_int64 op_raw_total(const OggOpusFile *_of,int _li){
|
||||||
|
|
||||||
ogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li){
|
ogg_int64_t op_pcm_total(const OggOpusFile *_of,int _li){
|
||||||
OggOpusLink *links;
|
OggOpusLink *links;
|
||||||
ogg_int64_t diff;
|
ogg_int64_t diff=0;
|
||||||
int nlinks;
|
int nlinks;
|
||||||
nlinks=_of->nlinks;
|
nlinks=_of->nlinks;
|
||||||
if(OP_UNLIKELY(_of->ready_state<OP_OPENED)
|
if(OP_UNLIKELY(_of->ready_state<OP_OPENED)
|
||||||
|
@ -2166,7 +2166,7 @@ static int op_pcm_seek_page(OggOpusFile *_of,
|
||||||
ogg_int64_t _target_gp,int _li){
|
ogg_int64_t _target_gp,int _li){
|
||||||
const OggOpusLink *link;
|
const OggOpusLink *link;
|
||||||
ogg_page og;
|
ogg_page og;
|
||||||
ogg_int64_t pcm_pre_skip;
|
ogg_int64_t pcm_pre_skip=0;
|
||||||
ogg_int64_t pcm_start;
|
ogg_int64_t pcm_start;
|
||||||
ogg_int64_t pcm_end;
|
ogg_int64_t pcm_end;
|
||||||
ogg_int64_t best_gp;
|
ogg_int64_t best_gp;
|
||||||
|
@ -2239,7 +2239,7 @@ static int op_pcm_seek_page(OggOpusFile *_of,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
ogg_int64_t prev_page_gp;
|
ogg_int64_t prev_page_gp=0;
|
||||||
/*We might get lucky and already have the packet with the target
|
/*We might get lucky and already have the packet with the target
|
||||||
buffered.
|
buffered.
|
||||||
Worth checking.
|
Worth checking.
|
||||||
|
|
|
@ -381,8 +381,8 @@ extern void (APIENTRYP qglUnlockArraysEXT) (void);
|
||||||
extern void (APIENTRY * qglDrawRangeElementsEXT) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
|
extern void (APIENTRY * qglDrawRangeElementsEXT) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
|
||||||
|
|
||||||
// GL_EXT_multi_draw_arrays
|
// GL_EXT_multi_draw_arrays
|
||||||
extern void (APIENTRY * qglMultiDrawArraysEXT) (GLenum, GLint *, GLsizei *, GLsizei);
|
void (APIENTRY * qglMultiDrawArraysEXT) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||||
extern void (APIENTRY * qglMultiDrawElementsEXT) (GLenum, const GLsizei *, GLenum, const GLvoid **, GLsizei);
|
extern void (APIENTRY * qglMultiDrawElementsEXT) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||||
|
|
||||||
// GL_ARB_shading_language_100
|
// GL_ARB_shading_language_100
|
||||||
#ifndef GL_ARB_shading_language_100
|
#ifndef GL_ARB_shading_language_100
|
||||||
|
|
|
@ -33,8 +33,8 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
void (APIENTRY * qglDrawRangeElementsEXT) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
|
void (APIENTRY * qglDrawRangeElementsEXT) (GLenum mode, GLuint start, GLuint end, GLsizei count, GLenum type, const GLvoid *indices);
|
||||||
|
|
||||||
// GL_EXT_multi_draw_arrays
|
// GL_EXT_multi_draw_arrays
|
||||||
void (APIENTRY * qglMultiDrawArraysEXT) (GLenum mode, GLint *first, GLsizei *count, GLsizei primcount);
|
void (APIENTRY * qglMultiDrawArraysEXT) (GLenum mode, const GLint *first, const GLsizei *count, GLsizei primcount);
|
||||||
void (APIENTRY * qglMultiDrawElementsEXT) (GLenum mode, const GLsizei *count, GLenum type, const GLvoid **indices, GLsizei primcount);
|
void (APIENTRY * qglMultiDrawElementsEXT) (GLenum mode, const GLsizei *count, GLenum type, const void *const*indices, GLsizei primcount);
|
||||||
|
|
||||||
// GL_ARB_vertex_shader
|
// GL_ARB_vertex_shader
|
||||||
void (APIENTRY * qglBindAttribLocationARB) (GLhandleARB programObj, GLuint index, const GLcharARB * name);
|
void (APIENTRY * qglBindAttribLocationARB) (GLhandleARB programObj, GLuint index, const GLcharARB * name);
|
||||||
|
|
|
@ -1272,64 +1272,6 @@ void R_LightScaleTexture (byte *in, int inwidth, int inheight, qboolean only_gam
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
|
||||||
================
|
|
||||||
R_MipMap2
|
|
||||||
|
|
||||||
Operates in place, quartering the size of the texture
|
|
||||||
Proper linear filter
|
|
||||||
================
|
|
||||||
*/
|
|
||||||
static void R_MipMap2( byte *in, int inWidth, int inHeight ) {
|
|
||||||
int i, j, k;
|
|
||||||
byte *outpix;
|
|
||||||
int inWidthMask, inHeightMask;
|
|
||||||
int total;
|
|
||||||
int outWidth, outHeight;
|
|
||||||
unsigned *temp;
|
|
||||||
|
|
||||||
outWidth = inWidth >> 1;
|
|
||||||
outHeight = inHeight >> 1;
|
|
||||||
temp = ri.Hunk_AllocateTempMemory( outWidth * outHeight * 4 );
|
|
||||||
|
|
||||||
inWidthMask = inWidth - 1;
|
|
||||||
inHeightMask = inHeight - 1;
|
|
||||||
|
|
||||||
for ( i = 0 ; i < outHeight ; i++ ) {
|
|
||||||
for ( j = 0 ; j < outWidth ; j++ ) {
|
|
||||||
outpix = (byte *) ( temp + i * outWidth + j );
|
|
||||||
for ( k = 0 ; k < 4 ; k++ ) {
|
|
||||||
total =
|
|
||||||
1 * (&in[ 4*(((i*2-1)&inHeightMask)*inWidth + ((j*2-1)&inWidthMask)) ])[k] +
|
|
||||||
2 * (&in[ 4*(((i*2-1)&inHeightMask)*inWidth + ((j*2 )&inWidthMask)) ])[k] +
|
|
||||||
2 * (&in[ 4*(((i*2-1)&inHeightMask)*inWidth + ((j*2+1)&inWidthMask)) ])[k] +
|
|
||||||
1 * (&in[ 4*(((i*2-1)&inHeightMask)*inWidth + ((j*2+2)&inWidthMask)) ])[k] +
|
|
||||||
|
|
||||||
2 * (&in[ 4*(((i*2 )&inHeightMask)*inWidth + ((j*2-1)&inWidthMask)) ])[k] +
|
|
||||||
4 * (&in[ 4*(((i*2 )&inHeightMask)*inWidth + ((j*2 )&inWidthMask)) ])[k] +
|
|
||||||
4 * (&in[ 4*(((i*2 )&inHeightMask)*inWidth + ((j*2+1)&inWidthMask)) ])[k] +
|
|
||||||
2 * (&in[ 4*(((i*2 )&inHeightMask)*inWidth + ((j*2+2)&inWidthMask)) ])[k] +
|
|
||||||
|
|
||||||
2 * (&in[ 4*(((i*2+1)&inHeightMask)*inWidth + ((j*2-1)&inWidthMask)) ])[k] +
|
|
||||||
4 * (&in[ 4*(((i*2+1)&inHeightMask)*inWidth + ((j*2 )&inWidthMask)) ])[k] +
|
|
||||||
4 * (&in[ 4*(((i*2+1)&inHeightMask)*inWidth + ((j*2+1)&inWidthMask)) ])[k] +
|
|
||||||
2 * (&in[ 4*(((i*2+1)&inHeightMask)*inWidth + ((j*2+2)&inWidthMask)) ])[k] +
|
|
||||||
|
|
||||||
1 * (&in[ 4*(((i*2+2)&inHeightMask)*inWidth + ((j*2-1)&inWidthMask)) ])[k] +
|
|
||||||
2 * (&in[ 4*(((i*2+2)&inHeightMask)*inWidth + ((j*2 )&inWidthMask)) ])[k] +
|
|
||||||
2 * (&in[ 4*(((i*2+2)&inHeightMask)*inWidth + ((j*2+1)&inWidthMask)) ])[k] +
|
|
||||||
1 * (&in[ 4*(((i*2+2)&inHeightMask)*inWidth + ((j*2+2)&inWidthMask)) ])[k];
|
|
||||||
outpix[k] = total / 36;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Com_Memcpy( in, temp, outWidth * outHeight * 4 );
|
|
||||||
ri.Hunk_FreeTempMemory( temp );
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void R_MipMapsRGB( byte *in, int inWidth, int inHeight)
|
static void R_MipMapsRGB( byte *in, int inWidth, int inHeight)
|
||||||
{
|
{
|
||||||
int i, j, k;
|
int i, j, k;
|
||||||
|
@ -1371,54 +1313,6 @@ static void R_MipMapsRGB( byte *in, int inWidth, int inHeight)
|
||||||
ri.Hunk_FreeTempMemory( temp );
|
ri.Hunk_FreeTempMemory( temp );
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
|
||||||
================
|
|
||||||
R_MipMap
|
|
||||||
|
|
||||||
Operates in place, quartering the size of the texture
|
|
||||||
================
|
|
||||||
*/
|
|
||||||
static void R_MipMap (byte *in, int width, int height) {
|
|
||||||
int i, j;
|
|
||||||
byte *out;
|
|
||||||
int row;
|
|
||||||
|
|
||||||
if ( !r_simpleMipMaps->integer ) {
|
|
||||||
R_MipMap2( in, width, height );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ( width == 1 && height == 1 ) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
row = width * 4;
|
|
||||||
out = in;
|
|
||||||
width >>= 1;
|
|
||||||
height >>= 1;
|
|
||||||
|
|
||||||
if ( width == 0 || height == 0 ) {
|
|
||||||
width += height; // get largest
|
|
||||||
for (i=0 ; i<width ; i++, out+=4, in+=8 ) {
|
|
||||||
out[0] = ( in[0] + in[4] )>>1;
|
|
||||||
out[1] = ( in[1] + in[5] )>>1;
|
|
||||||
out[2] = ( in[2] + in[6] )>>1;
|
|
||||||
out[3] = ( in[3] + in[7] )>>1;
|
|
||||||
}
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
for (i=0 ; i<height ; i++, in+=row) {
|
|
||||||
for (j=0 ; j<width ; j++, out+=4, in+=8) {
|
|
||||||
out[0] = (in[0] + in[4] + in[row+0] + in[row+4])>>2;
|
|
||||||
out[1] = (in[1] + in[5] + in[row+1] + in[row+5])>>2;
|
|
||||||
out[2] = (in[2] + in[6] + in[row+2] + in[row+6])>>2;
|
|
||||||
out[3] = (in[3] + in[7] + in[row+3] + in[row+7])>>2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
static void R_MipMapLuminanceAlpha (const byte *in, byte *out, int width, int height)
|
static void R_MipMapLuminanceAlpha (const byte *in, byte *out, int width, int height)
|
||||||
{
|
{
|
||||||
int i, j, row;
|
int i, j, row;
|
||||||
|
|
Loading…
Reference in a new issue