mirror of
https://github.com/TTimo/GtkRadiant.git
synced 2025-01-25 02:41:22 +00:00
Merge pull request #394 from jdolan/master
Fix compilation with Clang on OS X, and fix a handful of compiler warnings too.
This commit is contained in:
commit
4fdf8af8b6
7 changed files with 19 additions and 15 deletions
|
@ -272,7 +272,7 @@ void _pico_first_token( char *str ) {
|
|||
return;
|
||||
}
|
||||
while (*str && !isspace(*str))
|
||||
*str++;
|
||||
str++;
|
||||
*str = '\0';
|
||||
}
|
||||
|
||||
|
|
|
@ -132,7 +132,7 @@ void _pico_printf( int level, const char *format, ... );
|
|||
char *_pico_stristr( char *str, const char *substr );
|
||||
void _pico_unixify( char *path );
|
||||
int _pico_nofname( const char *path, char *dest, int destSize );
|
||||
char *_pico_nopath( const char *path );
|
||||
const char *_pico_nopath( const char *path );
|
||||
char *_pico_setfext( char *path, const char *ext );
|
||||
int _pico_getline( char *buf, int bufsize, char *dest, int destsize );
|
||||
char *_pico_strlwr( char *str );
|
||||
|
|
|
@ -192,6 +192,10 @@
|
|||
RelativePath=".\pm_obj.c"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pm_terrain.c"
|
||||
>
|
||||
</File>
|
||||
<Filter
|
||||
Name="lwo"
|
||||
Filter="cpp;c;cc;cxx;def;odl;idl;hpj;bat;asm;asmx"
|
||||
|
|
|
@ -303,7 +303,7 @@ static int _terrain_canload( PM_PARAMS_CANLOAD ) {
|
|||
|
||||
|
||||
/* keep the friggin compiler happy */
|
||||
*fileName = *fileName;
|
||||
/**fileName = *fileName*/;
|
||||
|
||||
/* create pico parser */
|
||||
p = _pico_new_parser( (picoByte_t*) buffer, bufSize );
|
||||
|
@ -356,7 +356,7 @@ static picoModel_t *_terrain_load( PM_PARAMS_LOAD ) {
|
|||
|
||||
|
||||
/* keep the friggin compiler happy */
|
||||
*fileName = *fileName;
|
||||
/**fileName = *fileName*/;
|
||||
|
||||
/* create pico parser */
|
||||
p = _pico_new_parser( (picoByte_t*) buffer, bufSize );
|
||||
|
|
|
@ -26,7 +26,6 @@
|
|||
#include "filters.h"
|
||||
|
||||
extern MainFrame* g_pParentWnd;
|
||||
extern void MemFile_fprintf( MemStream* pMemFile, const char* pText, ... );
|
||||
|
||||
// globals
|
||||
|
||||
|
@ -130,7 +129,6 @@ float lightaxis[3] = {0.6f, 0.8f, 1.0f};
|
|||
improve recognition
|
||||
================
|
||||
*/
|
||||
extern float ShadeForNormal( vec3_t normal );
|
||||
|
||||
float SetShadeForPlane( plane_t *p ){
|
||||
//return ShadeForNormal(p->normal);
|
||||
|
@ -2292,7 +2290,7 @@ face_t *Brush_Ray( vec3_t origin, vec3_t dir, brush_t *b, float *dist, int nFlag
|
|||
// see Brush_Draw
|
||||
|
||||
// do some last minute filtering
|
||||
if ( firstface && nFlags & SF_CAMERA ) {
|
||||
if ( firstface && ( nFlags & SF_CAMERA ) ) {
|
||||
if ( g_qeglobals.d_savedinfo.exclude & EXCLUDE_CAULK ) {
|
||||
if ( strstr( firstface->texdef.GetName(), "caulk" ) ) {
|
||||
*dist = 0;
|
||||
|
@ -3060,7 +3058,7 @@ void Brush_FaceDraw( face_t *face, int nGLState ){
|
|||
if ( w == NULL ) {
|
||||
return;
|
||||
}
|
||||
if ( nGLState & DRAW_GL_LIGHTING && g_PrefsDlg.m_bGLLighting ) {
|
||||
if ( ( nGLState & DRAW_GL_LIGHTING ) && g_PrefsDlg.m_bGLLighting ) {
|
||||
qglNormal3fv( face->plane.normal );
|
||||
}
|
||||
/*
|
||||
|
@ -3137,7 +3135,7 @@ void Brush_Draw( brush_t *b ){
|
|||
if ( bTrans && !( nGLState & DRAW_GL_BLEND ) ) {
|
||||
continue;
|
||||
}
|
||||
if ( !bTrans && nGLState & DRAW_GL_BLEND ) {
|
||||
if ( !bTrans && ( nGLState & DRAW_GL_BLEND ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -3163,17 +3161,17 @@ void Brush_Draw( brush_t *b ){
|
|||
}
|
||||
}
|
||||
|
||||
if ( nGLState & DRAW_GL_TEXTURE_2D && face->d_texture->name[0] == '(' ) {
|
||||
if ( ( nGLState & DRAW_GL_TEXTURE_2D ) && face->d_texture->name[0] == '(' ) {
|
||||
prev = NULL;
|
||||
qglDisable( GL_TEXTURE_2D );
|
||||
}
|
||||
else if ( nGLState & DRAW_GL_TEXTURE_2D && ( nDrawMode == cd_texture || nDrawMode == cd_light ) && face->d_texture != prev ) {
|
||||
else if ( ( nGLState & DRAW_GL_TEXTURE_2D ) && ( nDrawMode == cd_texture || nDrawMode == cd_light ) && face->d_texture != prev ) {
|
||||
// set the texture for this face
|
||||
prev = face->d_texture;
|
||||
qglBindTexture( GL_TEXTURE_2D, face->d_texture->texture_number );
|
||||
}
|
||||
|
||||
if ( nGLState & DRAW_GL_LIGHTING && !g_PrefsDlg.m_bGLLighting ) {
|
||||
if ( ( nGLState & DRAW_GL_LIGHTING ) && !g_PrefsDlg.m_bGLLighting ) {
|
||||
if ( !b->owner->eclass->fixedsize ) {
|
||||
material[3] = transVal;
|
||||
}
|
||||
|
|
|
@ -780,7 +780,11 @@ void Texture_ShowDirectory(){
|
|||
g_str_has_suffix( name, "_h" ) ||
|
||||
g_str_has_suffix( name, "_local" ) ||
|
||||
g_str_has_suffix( name, "_nm" ) ||
|
||||
g_str_has_suffix( name, "_s" )) {
|
||||
g_str_has_suffix( name, "_s" ) ||
|
||||
g_str_has_suffix( name, "_bump" ) ||
|
||||
g_str_has_suffix( name, "_gloss" ) ||
|
||||
g_str_has_suffix( name, "_luma" ) ||
|
||||
g_str_has_suffix( name, "_norm" ) ) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,8 +22,6 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|||
|
||||
#include "qbsp.h"
|
||||
|
||||
extern qboolean onlyents;
|
||||
|
||||
int nummapbrushes;
|
||||
mapbrush_t mapbrushes[MAX_MAP_BRUSHES];
|
||||
|
||||
|
|
Loading…
Reference in a new issue