addflags("-Wextra")
addflags("-pedantic")
+addflags_c("-Wno-deprecated-declarations") # vfs.c: g_strdown
+
addflags("-Wno-sign-compare")
addflags("-Wno-unused-function")
addflags("-Wno-unused-variable")
addflags("-Wno-unused-parameter")
-addflags("-Wno-deprecated-declarations")
-addflags("-Wno-unused-but-set-variable")
addflags("-Wno-missing-field-initializers")
addflags_c("-Wno-int-conversion")
b = makeCallback0( Test::Test0(), test );
Callback c = Test::Test0ConstCaller( testconst );
c = makeCallback0( Test::Test0Const(), test );
- Callback d = Test0Caller( test );
- Callback e = Test0ConstCaller( testconst );
- Callback f = Test0PCaller( &test );
- Callback g = Test0ConstPCaller( &testconst );
+ Test0Caller{ test };
+ Test0ConstCaller{ testconst };
+ Test0PCaller{ &test };
+ Test0ConstPCaller{ &testconst };
a();
bool u = a != b;
}
b = makeCallback1( Test::Test1(), test );
TestCallback1 c = Test::Test1ConstCaller( testconst );
c = makeCallback1( Test::Test1Const(), test );
- TestCallback1 d = Test1Caller( test );
- TestCallback1 e = Test1ConstCaller( testconst );
- TestCallback1 f = Test1PCaller( &test );
- TestCallback1 g = Test1ConstPCaller( &testconst );
+ Test1Caller{ test };
+ Test1ConstCaller{ testconst };
+ Test1PCaller{ &test };
+ Test1ConstPCaller{ &testconst };
a( A1() );
bool u = a != b;
}
typedef Callback2<A1, A2> TestCallback2;
TestCallback2 a = makeStatelessCallback2( Test2Free() );
TestCallback2 b = makeCallback2( Test2(), test );
- TestCallback2 c = makeCallback2( Test::Test2(), test );
- TestCallback2 d = makeCallback2( Test::Test2Const(), test );
+ makeCallback2( Test::Test2(), test );
+ makeCallback2( Test::Test2Const(), test );
a( A1(), A2() );
bool u = a != b;
}
typedef Callback3<A1, A2, A3> TestCallback3;
TestCallback3 a = makeStatelessCallback3( Test3Free() );
TestCallback3 b = makeCallback3( Test3(), test );
- TestCallback3 c = makeCallback3( Test::Test3(), test );
- TestCallback3 d = makeCallback3( Test::Test3Const(), test );
+ makeCallback3( Test::Test3(), test );
+ makeCallback3( Test::Test3Const(), test );
a( A1(), A2(), A3() );
bool u = a != b;
}
fclose( f );
}
- return true;
+ return ret;
}
int profile_load_int( const char *filename, const char *section, const char *key, int default_value ){
Com_UngetToken();
idStr key = Com_ParseOnLine( text );
- const char *token = Com_Parse( text );
+ Com_Parse( text );
if ( Q_stricmp( key.c_str(), "pos" ) == 0 ) {
Com_UngetToken();
Com_Parse1DMatrix( text, 3, pos );
Com_UngetToken();
idCameraPosition::parseToken( key.c_str(), text );
}
- token = Com_Parse( text );
+ Com_Parse( text );
} while ( 1 );
Com_UngetToken();
idStr key = Com_ParseOnLine( text );
- const char *token = Com_Parse( text );
+ Com_Parse( text );
if ( Q_stricmp( key.c_str(), "startPos" ) == 0 ) {
Com_UngetToken();
Com_Parse1DMatrix( text, 3, startPos );
Com_UngetToken();
idCameraPosition::parseToken( key.c_str(), text );
}
- token = Com_Parse( text );
+ Com_Parse( text );
} while ( 1 );
Com_UngetToken();
idStr key = Com_ParseOnLine( text );
- const char *token = Com_Parse( text );
+ Com_Parse( text );
if ( Q_stricmp( key.c_str(), "target" ) == 0 ) {
target.parse( text );
}
Com_UngetToken();
idCameraPosition::parseToken( key.c_str(), text );
}
- token = Com_Parse( text );
+ Com_Parse( text );
} while ( 1 );
void
){
char ch; // ch == ?
+ (void) ch;
idStr *t; // t == ?
idStr a; // a.len == 0, a.data == "\0"
idStr b; // b.len == 0, b.data == "\0"
idStr e( reinterpret_cast<const char *>( NULL ) );
// e.len == 0, e.data == "\0" ASSERT!
int i; // i == ?
+ (void) i;
i = a.length(); // i == 0
i = c.length(); // i == 4
xmlFreeParserCtxt( ctxt );
}
+ (void) wellFormed;
//return wellFormed;
}
private:
points[5] = vector4_projected( matrix4_transformed_vector4( unproject, Vector4( points[5], 1 ) ) );
points[6] = vector4_projected( matrix4_transformed_vector4( unproject, Vector4( points[6], 1 ) ) );
points[7] = vector4_projected( matrix4_transformed_vector4( unproject, Vector4( points[7], 1 ) ) );
- Vector4 test1 = matrix4_transformed_vector4( unproject, Vector4( 0.5f, 0.5f, 0.5f, 1 ) );
- Vector3 test2 = vector4_projected( test1 );
+// Vector4 test1 = matrix4_transformed_vector4( unproject, Vector4( 0.5f, 0.5f, 0.5f, 1 ) );
+// Vector3 test2 = vector4_projected( test1 );
aabb_draw_wire( points );
}
};
//!\todo fix jpeglib, it leaves alpha channel uninitialised
#if 1
+ (void) iAlp;
*oAlp = 255;
#else
*oAlp = iAlp;
Image* LoadHLWBuff( byte* buffer ){
byte *buf_p;
unsigned long mipdatasize;
- int columns, rows, numPixels;
+ int columns, rows;
byte *pixbuf;
int row, column;
byte *palette;
columns = lpMip->width;
rows = lpMip->height;
- numPixels = columns * rows;
RGBAImage* image = new RGBAImage( columns, rows );
Image* LoadMIPBuff( byte* buffer ){
byte *buf_p;
int palettelength;
- unsigned long mipdatasize;
int columns, rows, numPixels;
byte *pixbuf;
int i;
return 0;
}
- mipdatasize = GET_MIP_DATA_SIZE( columns, rows );
+// unsigned long mipdatasize = GET_MIP_DATA_SIZE( columns, rows );
palettelength = vfsLoadFile( "gfx/palette.lmp", (void **) &loadedpalette );
if ( palettelength == 768 ) {
Image* LoadIDSPBuff( byte *buffer ){
byte *buf_p;
- int columns, rows, numPixels;
+ int columns, rows;
byte *pixbuf;
int row, column;
// palette = buffer+mipdatasize+2;
// buf_p = buffer+lpMip->offsets[0];
- numPixels = columns * rows;
-
RGBAImage* image = new RGBAImage( columns, rows );
#ifdef DEBUG
Matrix4 swap = matrix4_swap_axes( first, second );
- Matrix4 tmp = matrix4_reflection_for_plane( plane );
-
swap.tx() = -static_cast<float>( -2 * plane.a * plane.d );
swap.ty() = -static_cast<float>( -2 * plane.b * plane.d );
swap.tz() = -static_cast<float>( -2 * plane.c * plane.d );
}
void Cam_MouseControl( camera_t& camera, int x, int y ){
- int xl, xh;
- int yl, yh;
- float xf, yf;
-
- xf = (float)( x - camera.width / 2 ) / ( camera.width / 2 );
- yf = (float)( y - camera.height / 2 ) / ( camera.height / 2 );
-
- xl = camera.width / 3;
- xh = xl * 2;
- yl = camera.height / 3;
- yh = yl * 2;
+ float xf = (float)( x - camera.width / 2 ) / ( camera.width / 2 );
+ float yf = (float)( y - camera.height / 2 ) / ( camera.height / 2 );
xf *= 1.0f - fabsf( yf );
if ( xf < 0 ) {
=============
*/
int GetLumpElements( dheader_t *header, int lump, int size ) {
- int length, ofs;
-
- length = header->lumps[lump].filelen;
- ofs = header->lumps[lump].fileofs;
+ int length = header->lumps[lump].filelen;
if ( length % size ) {
Error( "LoadBSPFile: odd lump size" );
int pix;
int bestcolor;
byte *pal;
- int fullbright;
vis = 0;
r = g = b = 0;
- fullbright = 0;
for ( i = 0 ; i < count ; i++ )
{
pix = pixdata[i];
// float s_scale, t_scale;
// float scale;
// vec3_t mins, maxs;
- float *pbasevert;
/*
//
for ( j = 0 ; j < 3 ; j++ )
{
- pbasevert = ptri->verts[j];
-
VectorCopy( ptri->verts[j], bTri->v[j].xyz );
VectorCopy( ptri->normals[j], bTri->v[j].normal );
}
}
- if ( !tagWeapon ) {
- Error( "Missing tag_weapon!" );
+ if ( !tagHead ) {
+ // todo: was never being checked; should we error now that it is?
+ // Error( "Missing tag_head!" );
}
if ( !tagTorso ) {
Error( "Missing tag_torso!" );
if ( DotProduct( plane1, reverse ) > 0.999f && fabs( plane1[ 3 ] - reverse[ 3 ] ) < 0.001f ) {
return FilterWindingIntoTree_r( w, ds, node->children[ 1 ] );
}
- #else
+ #else
+ (void) plane2;
/* div0: this is the cholera (doesn't hit enough) */
/* the drawsurf might have an associated plane, if so, force a filter here */