From d909e5b8c7b4ccf8a7a0fea6e77e49d021398bb3 Mon Sep 17 00:00:00 2001 From: divverent Date: Thu, 23 Apr 2009 16:32:45 +0000 Subject: [PATCH] patches by jal: fix some warnings, and spawnflags 64 on misc_model to not smooth the normals git-svn-id: svn://svn.icculus.org/netradiant/trunk@324 61c419a2-8eb2-4b30-bcec-8cead039b335 --- libs/mathlib.h | 2 ++ tools/quake3/q3map2/bspfile_abstract.c | 2 -- tools/quake3/q3map2/light_ydnar.c | 2 -- tools/quake3/q3map2/map.c | 1 - tools/quake3/q3map2/model.c | 3 ++- tools/quake3/q3map2/prtfile.c | 9 ++++----- tools/quake3/q3map2/q3map2.h | 2 +- 7 files changed, 9 insertions(+), 12 deletions(-) diff --git a/libs/mathlib.h b/libs/mathlib.h index 04fbc0f..bbf026d 100644 --- a/libs/mathlib.h +++ b/libs/mathlib.h @@ -273,6 +273,8 @@ void m4x4_transform_normal(const m4x4_t matrix, vec3_t normal); void m4x4_transpose(m4x4_t matrix); /*! invert an orthogonal 4x3 subset of a 4x4 matrix */ int m4x4_orthogonal_invert(m4x4_t matrix); +/*! m4_det */ +float m4_det( m4x4_t mr ); /*! invert any m4x4 using Kramer's rule.. return 1 if matrix is singular, else return 0 */ int m4x4_invert(m4x4_t matrix); diff --git a/tools/quake3/q3map2/bspfile_abstract.c b/tools/quake3/q3map2/bspfile_abstract.c index cf059ca..0e77526 100644 --- a/tools/quake3/q3map2/bspfile_abstract.c +++ b/tools/quake3/q3map2/bspfile_abstract.c @@ -331,8 +331,6 @@ int CopyLump( bspHeader_t *header, int lump, void *dest, int size ) int CopyLump_Allocate( bspHeader_t *header, int lump, void **dest, int size, int *allocationVariable ) { - int length, offset; - /* get lump length and offset */ *allocationVariable = header->lumps[ lump ].length / size; *dest = realloc(*dest, size * *allocationVariable); diff --git a/tools/quake3/q3map2/light_ydnar.c b/tools/quake3/q3map2/light_ydnar.c index 254a8c9..4b02805 100644 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@ -1867,8 +1867,6 @@ void IlluminateRawLightmap( int rawLightmapNum ) float tests[ 4 ][ 2 ] = { { 0.0f, 0 }, { 1, 0 }, { 0, 1 }, { 1, 1 } }; trace_t trace; float stackLightLuxels[ STACK_LL_SIZE ]; - vec3_t flood; - float *floodlight; /* bail if this number exceeds the number of raw lightmaps */ diff --git a/tools/quake3/q3map2/map.c b/tools/quake3/q3map2/map.c index 9b7ba71..1906819 100644 --- a/tools/quake3/q3map2/map.c +++ b/tools/quake3/q3map2/map.c @@ -626,7 +626,6 @@ brush_t *FinishBrush( void ) after the entire entity is parsed, the planenums and texinfos will be adjusted for the origin brush */ if( buildBrush->compileFlags & C_ORIGIN ) { - char string[ 32 ]; vec3_t origin; Sys_Printf( "Entity %i, Brush %i: origin brush detected\n", diff --git a/tools/quake3/q3map2/model.c b/tools/quake3/q3map2/model.c index f655370..c4df7ba 100644 --- a/tools/quake3/q3map2/model.c +++ b/tools/quake3/q3map2/model.c @@ -268,7 +268,8 @@ void InsertModel( char *name, int frame, m4x4_t transform, remap_t *remap, shade continue; /* fix the surface's normals */ - PicoFixSurfaceNormals( surface ); /* why did vortex comment this out? FIXME */ + if( !(spawnFlags & 64) ) + PicoFixSurfaceNormals( surface ); /* allocate a surface (ydnar: gs mods) */ ds = AllocDrawSurface( SURFACE_TRIANGLES ); diff --git a/tools/quake3/q3map2/prtfile.c b/tools/quake3/q3map2/prtfile.c index 7108c58..2f10c7c 100644 --- a/tools/quake3/q3map2/prtfile.c +++ b/tools/quake3/q3map2/prtfile.c @@ -65,11 +65,9 @@ void WriteFloat (FILE *f, vec_t v) void CountVisportals_r(node_t *node) { - int i, s; + int s; portal_t *p; winding_t *w; - vec3_t normal; - vec_t dist; // decision node if (node->planenum != PLANENUM_LEAF) { @@ -170,7 +168,7 @@ void WritePortalFile_r (node_t *node) void CountSolidFaces_r (node_t *node) { - int i, s; + int s; portal_t *p; winding_t *w; @@ -273,8 +271,9 @@ NumberLeafs_r */ void NumberLeafs_r (node_t *node, int c) { +#if 0 portal_t *p; - +#endif if ( node->planenum != PLANENUM_LEAF ) { // decision node node->cluster = -99; diff --git a/tools/quake3/q3map2/q3map2.h b/tools/quake3/q3map2/q3map2.h index fe25f58..689fe64 100644 --- a/tools/quake3/q3map2/q3map2.h +++ b/tools/quake3/q3map2/q3map2.h @@ -83,7 +83,7 @@ dependencies #include "vfs.h" #include "png.h" #include "md4.h" - +#include "radiant_jpeglib.h" #include -- 2.39.2