OS = Win32
endif
-CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wcast-qual -Wno-unused-parameter -fno-strict-aliasing
+CFLAGS_COMMON = -MMD -W -Wall -Wcast-align -Wno-cast-qual -Wno-unused-parameter -Wno-unknown-pragmas -Wno-empty-body -Wno-maybe-uninitialized -Wno-write-strings -fno-strict-aliasing
CPPFLAGS_COMMON =
LDFLAGS_COMMON =
LIBS_COMMON =
-CXXFLAGS_COMMON = -Wno-non-virtual-dtor -Wreorder -fno-exceptions -fno-rtti
+CXXFLAGS_COMMON = -Wno-non-virtual-dtor -Wno-reorder -Wno-unknown-pragmas -Wno-empty-body -Wno-maybe-uninitialized -Wno-write-strings -fno-exceptions -fno-rtti
ifeq ($(BUILD),debug)
ifeq ($(findstring $(CFLAGS),-g),)
endif
endif
+# MSYS2
+UNAME_S := $(shell uname -s)
+UNAME_O := $(shell uname -o)
+
+ifneq "$(filter MINGW32_NT%,$(UNAME_S))" ""
+ OS = Win32
+ ifeq ($(UNAME_O),Msys)
+ DLLINSTALL = install-dlls-msys2-mingw32.sh
+ CFLAGS_COMMON += -O0
+ CPPFLAGS_COMMON += -O0
+ endif
+endif
+
+ifneq "$(filter MINGW64_NT%,$(UNAME_S))" ""
+ OS = Win32
+ ifeq ($(UNAME_O),Msys)
+ DLLINSTALL = install-dlls-msys2-mingw64.sh
+ CFLAGS_COMMON += -O0
+ CPPFLAGS_COMMON += -O0
+ endif
+endif
+
# VERSION!
RADIANT_VERSION_NUMBER = 1.5.0
RADIANT_VERSION = $(RADIANT_VERSION_NUMBER)n
--- /dev/null
+#!/bin/sh
+
+MINGWDIR='/mingw64'
+INSTALLDIR=$(pwd)/install
+
+function dependencies {
+ local EXECUATABLEDIR=$1
+ local EXECUATABLE=$2
+ local MINGWDIRBIN=$3
+
+ local DEPENDENCY="| grep 'DLL Name' | sed -r 's/\s+DLL\s+Name\:\s+//' | xargs -i{} which {} | grep $MINGWDIRBIN"
+
+ local DEPENDENCIES="$DEPENDENCY"
+
+ for I in `seq 1 3`;
+ do
+ local COMMAND="objdump -x $EXECUATABLE $DEPENDENCIES | xargs -i{} cp -v {} $EXECUATABLEDIR"
+ eval "$COMMAND"
+
+ local DEPENDENCIES="$DEPENDENCIES | xargs -i{} objdump -x {} $DEPENDENCY"
+ done
+}
+
+dependencies './install' './install/q2map.exe' "$MINGWDIR/bin"
+dependencies './install' './install/q3data.exe' "$MINGWDIR/bin"
+dependencies './install' './install/q3map2.exe' "$MINGWDIR/bin"
+dependencies './install' './install/qdata3.exe' "$MINGWDIR/bin"
+dependencies './install' './install/radiant.exe' "$MINGWDIR/bin"
+
+cd $MINGWDIR
+
+for EXTRAPATH in \
+ './lib/gtk-2.0/2.10.0/engines/*.dll' \
+ './lib/gtk-2.0/modules/*.dll' \
+ './share/themes' \
+; do
+ cp --parent -v `find $EXTRAPATH -type f` "$INSTALLDIR"
+done
--- /dev/null
+#!/bin/sh
+
+MINGWDIR='/mingw64'
+INSTALLDIR=$(pwd)/install
+
+function dependencies {
+ local EXECUATABLEDIR=$1
+ local EXECUATABLE=$2
+ local MINGWDIRBIN=$3
+
+ local DEPENDENCY="| grep 'DLL Name' | sed -r 's/\s+DLL\s+Name\:\s+//' | xargs -i{} which {} | grep $MINGWDIRBIN"
+
+ local DEPENDENCIES="$DEPENDENCY"
+
+ for I in `seq 1 3`;
+ do
+ local COMMAND="objdump -x $EXECUATABLE $DEPENDENCIES | xargs -i{} cp -v {} $EXECUATABLEDIR"
+ eval "$COMMAND"
+
+ local DEPENDENCIES="$DEPENDENCIES | xargs -i{} objdump -x {} $DEPENDENCY"
+ done
+}
+
+dependencies './install' './install/q2map.exe' "$MINGWDIR/bin"
+dependencies './install' './install/q3data.exe' "$MINGWDIR/bin"
+dependencies './install' './install/q3map2.exe' "$MINGWDIR/bin"
+dependencies './install' './install/qdata3.exe' "$MINGWDIR/bin"
+dependencies './install' './install/radiant.exe' "$MINGWDIR/bin"
+
+cd $MINGWDIR
+
+for EXTRAPATH in \
+ './lib/gtk-2.0/2.10.0/engines/*.dll' \
+ './lib/gtk-2.0/modules/*.dll' \
+ './share/themes' \
+; do
+ cp --parent -v `find $EXTRAPATH -type f` "$INSTALLDIR"
+done
#if defined( WIN32 )
#define S_ISDIR( mode ) ( mode & _S_IFDIR )
#include <io.h> // _access()
+
+#ifndef F_OK
#define F_OK 0x00
+#endif
+
+#ifndef W_OK
#define W_OK 0x02
+#endif
+
+#ifndef R_OK
#define R_OK 0x04
+#endif
+
#define access( path, mode ) _access( path, mode )
#else
#include <unistd.h> // access()
sprintf( buf, "%f %f %f", v[0], v[1], v[2] );
ret = xmlNewNode( NULL, "point" );
- xmlNodeSetContent( ret, buf );
+ xmlNodeAddContent( ret, buf );
return ret;
}
// now build a proper "select" XML node
sprintf( buf, "Entity %i, Brush %i: %s", entitynum, brushnum, msg );
node = xmlNewNode( NULL, "select" );
- xmlNodeSetContent( node, buf );
+ xmlNodeAddContent( node, buf );
level[0] = (int)'0' + ( bError ? SYS_ERR : SYS_WRN ) ;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
// a 'select' information
sprintf( buf, "%i %i", entitynum, brushnum );
select = xmlNewNode( NULL, "brush" );
- xmlNodeSetContent( select, buf );
+ xmlNodeAddContent( select, buf );
xmlAddChild( node, select );
xml_SendNode( node );
char level[2];
node = xmlNewNode( NULL, "pointmsg" );
- xmlNodeSetContent( node, msg );
+ xmlNodeAddContent( node, msg );
level[0] = (int)'0' + SYS_ERR;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
// a 'point' node
sprintf( buf, "%g %g %g", pt[0], pt[1], pt[2] );
point = xmlNewNode( NULL, "point" );
- xmlNodeSetContent( point, buf );
+ xmlNodeAddContent( point, buf );
xmlAddChild( node, point );
xml_SendNode( node );
int i;
node = xmlNewNode( NULL, "windingmsg" );
- xmlNodeSetContent( node, msg );
+ xmlNodeAddContent( node, msg );
level[0] = (int)'0' + SYS_ERR;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
}
winding = xmlNewNode( NULL, "winding" );
- xmlNodeSetContent( winding, buf );
+ xmlNodeAddContent( winding, buf );
xmlAddChild( node, winding );
xml_SendNode( node );
bGotXML = true;
}
node = xmlNewNode( NULL, "message" );
- xmlNodeSetContent( node, buf );
+ xmlNodeAddContent( node, buf );
level[0] = (int)'0' + flag;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
Sys_FPrintf( SYS_NOXML, "**********************\n" );
polyline = LeakFile( tree );
leaknode = xmlNewNode( NULL, "message" );
- xmlNodeSetContent( leaknode, "MAP LEAKED\n" );
+ xmlNodeAddContent( leaknode, "MAP LEAKED\n" );
xmlAddChild( leaknode, polyline );
level[0] = (int) '0' + SYS_ERR;
level[1] = 0;
sprintf( buf, "%f %f %f", v[0], v[1], v[2] );
ret = xmlNewNode( NULL, "point" );
- xmlNodeSetContent( ret, buf );
+ xmlNodeAddContent( ret, buf );
return ret;
}
// now build a proper "select" XML node
sprintf( buf, "Entity %i, Brush %i: %s", entitynum, brushnum, msg );
node = xmlNewNode( NULL, "select" );
- xmlNodeSetContent( node, buf );
+ xmlNodeAddContent( node, buf );
level[0] = (int)'0' + ( bError ? SYS_ERR : SYS_WRN ) ;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
// a 'select' information
sprintf( buf, "%i %i", entitynum, brushnum );
select = xmlNewNode( NULL, "brush" );
- xmlNodeSetContent( select, buf );
+ xmlNodeAddContent( select, buf );
xmlAddChild( node, select );
xml_SendNode( node );
char level[2];
node = xmlNewNode( NULL, "pointmsg" );
- xmlNodeSetContent( node, msg );
+ xmlNodeAddContent( node, msg );
level[0] = (int)'0' + SYS_ERR;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
// a 'point' node
sprintf( buf, "%g %g %g", pt[0], pt[1], pt[2] );
point = xmlNewNode( NULL, "point" );
- xmlNodeSetContent( point, buf );
+ xmlNodeAddContent( point, buf );
xmlAddChild( node, point );
xml_SendNode( node );
int i;
node = xmlNewNode( NULL, "windingmsg" );
- xmlNodeSetContent( node, msg );
+ xmlNodeAddContent( node, msg );
level[0] = (int)'0' + SYS_ERR;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
}
winding = xmlNewNode( NULL, "winding" );
- xmlNodeSetContent( winding, buf );
+ xmlNodeAddContent( winding, buf );
xmlAddChild( node, winding );
xml_SendNode( node );
bGotXML = true;
}
node = xmlNewNode( NULL, "message" );
- xmlNodeSetContent( node, buf );
+ xmlNodeAddContent( node, buf );
level[0] = (int)'0' + flag;
level[1] = 0;
xmlSetProp( node, "level", (char *)&level );
sprintf( buf, "%f %f %f", v[0], v[1], v[2] );
ret = xmlNewNode( NULL, (xmlChar*)"point" );
- xmlNodeSetContent( ret, (xmlChar*)buf );
+ xmlNodeAddContent( ret, (xmlChar*)buf );
return ret;
}
// now build a proper "select" XML node
sprintf( buf, "Entity %i, Brush %i: %s", entitynum, brushnum, msg );
node = xmlNewNode( NULL, (xmlChar*)"select" );
- xmlNodeSetContent( node, (xmlChar*)buf );
+ xmlNodeAddContent( node, (xmlChar*)buf );
level[0] = (int)'0' + ( bError ? SYS_ERR : SYS_WRN ) ;
level[1] = 0;
xmlSetProp( node, (xmlChar*)"level", (xmlChar *)&level );
// a 'select' information
sprintf( buf, "%i %i", entitynum, brushnum );
select = xmlNewNode( NULL, (xmlChar*)"brush" );
- xmlNodeSetContent( select, (xmlChar*)buf );
+ xmlNodeAddContent( select, (xmlChar*)buf );
xmlAddChild( node, select );
xml_SendNode( node );
char level[2];
node = xmlNewNode( NULL, (xmlChar*)"pointmsg" );
- xmlNodeSetContent( node, (xmlChar*)msg );
+ xmlNodeAddContent( node, (xmlChar*)msg );
level[0] = (int)'0' + SYS_ERR;
level[1] = 0;
xmlSetProp( node, (xmlChar*)"level", (xmlChar *)&level );
// a 'point' node
sprintf( buf, "%g %g %g", pt[0], pt[1], pt[2] );
point = xmlNewNode( NULL, (xmlChar*)"point" );
- xmlNodeSetContent( point, (xmlChar*)buf );
+ xmlNodeAddContent( point, (xmlChar*)buf );
xmlAddChild( node, point );
xml_SendNode( node );
int i;
node = xmlNewNode( NULL, (xmlChar*)"windingmsg" );
- xmlNodeSetContent( node, (xmlChar*)msg );
+ xmlNodeAddContent( node, (xmlChar*)msg );
level[0] = (int)'0' + SYS_ERR;
level[1] = 0;
xmlSetProp( node, (xmlChar*)"level", (xmlChar *)&level );
}
winding = xmlNewNode( NULL, (xmlChar*)"winding" );
- xmlNodeSetContent( winding, (xmlChar*)buf );
+ xmlNodeAddContent( winding, (xmlChar*)buf );
xmlAddChild( node, winding );
xml_SendNode( node );
node = xmlNewNode( NULL, (xmlChar*)"message" );
{
gchar* utf8 = g_locale_to_utf8( buf, -1, NULL, NULL, NULL );
- xmlNodeSetContent( node, (xmlChar*)utf8 );
+ xmlNodeAddContent( node, (xmlChar*)utf8 );
g_free( utf8 );
}
level[0] = (int)'0' + flag;
#else
#include <wtypes.h>
#include <io.h>
+#ifndef R_OK
#define R_OK 04
+#endif
#define S_ISDIR( mode ) ( mode & _S_IFDIR )
#define PATH_MAX 260
#endif
Sys_FPrintf( SYS_NOXML, "**********************\n" );
polyline = LeakFile( tree );
leaknode = xmlNewNode( NULL, (xmlChar*)"message" );
- xmlNodeSetContent( leaknode, (xmlChar*)"MAP LEAKED\n" );
+ xmlNodeAddContent( leaknode, (xmlChar*)"MAP LEAKED\n" );
xmlAddChild( leaknode, polyline );
level[0] = (int) '0' + SYS_ERR;
level[1] = 0;
/* multiply by texture color */
if ( !RadSampleImage( si->lightImage->pixels, si->lightImage->width, si->lightImage->height, rw->verts[ samples ].st, textureColor ) ) {
VectorCopy( si->averageColor, textureColor );
- textureColor[ 4 ] = 255.0f;
+ textureColor[ 3 ] = 255.0f;
}
for ( i = 0; i < 3; i++ )
color[ i ] = ( textureColor[ i ] / 255 ) * ( rw->verts[ samples ].color[ lightmapNum ][ i ] / 255.0f );
/* multiply by texture color */
if ( !RadSampleImage( si->lightImage->pixels, si->lightImage->width, si->lightImage->height, st, textureColor ) ) {
VectorCopy( si->averageColor, textureColor );
- textureColor[ 4 ] = 255;
+ textureColor[ 3 ] = 255;
}
for ( i = 0; i < 3; i++ )
color[ i ] = ( textureColor[ i ] / 255 ) * ( radLuxel[ i ] / 255 );
int b, samples, mapped, lighted;
int cluster[ 4 ];
vec4_t luxel[ 4 ];
- vec3_t deluxel[ 3 ];
+ vec3_t deluxel[ 4 ];
vec3_t origin[ 4 ], normal[ 4 ];
float biasDirs[ 4 ][ 2 ] = { { -1.0f, -1.0f }, { 1.0f, -1.0f }, { -1.0f, 1.0f }, { 1.0f, 1.0f } };
vec3_t color, direction = { 0, 0, 0 }, total;
sun_t *sun; /* ydnar */
vec3_t color; /* normalized color */
- vec3_t averageColor;
+ vec4_t averageColor;
byte lightStyle;
/* vortex: per-surface floodlight */
typedef struct edge_s
{
- vec3_t origin, edge;
+ vec3_t origin;
+ vec4_t edge;
vec_t length, kingpinLength;
int kingpin;
vec4_t plane;