Fix OS X segmentation fault (ericwa). Fix Quetoo game detection.
See merge request !16
- OS X 10.5 or 10.6
- Xcode developer tools installed (OSX DVD)
- X11 (from the OS X DVD)
-- MacPorts or fink installed
+- MacPorts or fink or homebrew installed
- the following packages installed:
Macports:
gtkglext pkgconfig glib2-devel libxml2 gtk2 pango atk gettext wget
Fink:
gtkglext1 pkgconfig glib2-dev libxml2 gtk+2 gtk+2-dev pango1-xft2-ft219-dev atk1 gettext-dev wget
+ homebrew:
+ gtk+ gtkglext
build:
run 'make'
+homebrew build:
+run 'export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig:/opt/X11/lib/pkgconfig
+make'
+
run:
Switch into the install folder, and run NetRadiant.app
pack OsirionPack GPL zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/OsirionPack.zip
pack Q3Pack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/Q3Pack/trunk/ -r29
pack Quake2Pack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake2Pack.zip
-pack Quake2WorldPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/Q2WPack/branches/1.5/
pack QuakePack GPL zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/Quake1Pack.zip
+pack QuetooPack GPL svn svn://svn.icculus.org/gtkradiant-gamepacks/QuetooPack/branches/1.5/
pack TremulousPack proprietary zip1 http://ingar.satgnu.net/files/gtkradiant/gamepacks/TremulousPack.zip
pack UFOAIPack proprietary svn svn://svn.icculus.org/gtkradiant-gamepacks/UFOAIPack/branches/1.5/
#pack WarsowPack GPL svn https://svn.bountysource.com/wswpack/trunk/netradiant/games/WarsowPack/
static inline bool shader_is_diffuse( const char *shader ){
return
- /* Quake2World */
- !string_equal_suffix( shader, "_bump" )
- && !string_equal_suffix( shader, "_glow" )
- && !string_equal_suffix( shader, "_h" )
+ /* Quetoo */
+ !string_equal_suffix( shader, "_h" )
&& !string_equal_suffix( shader, "_local" )
- && !string_equal_suffix( shader, "_luma" )
&& !string_equal_suffix( shader, "_nm" )
&& !string_equal_suffix( shader, "_s" )
/* DarkPlaces */
- && !string_equal_suffix( shader, "_norm" )
- // (already in Quake2World) && !string_equal_suffix( shader, "_bump" )
- // (already in Quake2World) && !string_equal_suffix( shader, "_glow" )
+ && !string_equal_suffix( shader, "_bump" )
+ && !string_equal_suffix( shader, "_glow" )
&& !string_equal_suffix( shader, "_gloss" )
+ && !string_equal_suffix( shader, "_luma" )
+ && !string_equal_suffix( shader, "_norm" )
&& !string_equal_suffix( shader, "_pants" )
&& !string_equal_suffix( shader, "_shirt" )
&& !string_equal_suffix( shader, "_reflect" )
#endif
{ return; }
- // try to detect Q2World installs
- if ( gamedetect_check_game( "q2w.game", "default/quake2world.version", NULL, buf, p - buf ) ) {
+ // try to detect Quetoo installs
+ if ( gamedetect_check_game( "quetoo.game", "default/icons/quetoo.png", NULL, buf, p - buf ) ) {
return;
}
};
void node_attach_name_changed_callback( scene::Node& node, const NameCallback& callback ){
- if ( &node != 0 ) {
+ // Reference cannot be bound to dereferenced null pointer in well-defined
+ // C++ code, and Clang will assume that comparison below always evaluates
+ // to true, resulting in a segmentation fault. Use a dirty hack to force
+ // Clang to check those "bad" references for null nonetheless.
+ volatile intptr_t n = (intptr_t)&node;
+
+ if ( n != 0 ) {
Nameable* nameable = Node_getNameable( node );
if ( nameable != 0 ) {
nameable->attach( callback );
}
}
void node_detach_name_changed_callback( scene::Node& node, const NameCallback& callback ){
- if ( &node != 0 ) {
+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 650
+
+ if ( n != 0 ) {
Nameable* nameable = Node_getNameable( node );
if ( nameable != 0 ) {
nameable->detach( callback );
const char* node_get_name( scene::Node& node );
const char* node_get_name_safe( scene::Node& node ){
- if ( &node == 0 ) {
+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 650
+ if ( n == 0 ) {
return "";
}
return node_get_name( node );
}
void node_attach_name_changed_callback( scene::Node& node, const NameCallback& callback ){
- if ( &node != 0 ) {
+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 650
+ if ( n != 0 ) {
Nameable* nameable = Node_getNameable( node );
if ( nameable != 0 ) {
nameable->attach( callback );
}
}
void node_detach_name_changed_callback( scene::Node& node, const NameCallback& callback ){
- if ( &node != 0 ) {
+ volatile intptr_t n = (intptr_t)&node; // see the comment on line 650
+ if ( n != 0 ) {
Nameable* nameable = Node_getNameable( node );
if ( nameable != 0 ) {
nameable->detach( callback );