/// \file
/// \brief OS file-system querying and manipulation.
-#if defined( WIN32 )
+#if GDEF_OS_WINDOWS
#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()
OriginKey m_originKey;
Vector3 m_origin;
- RenderableNamedEntity m_renderName;
mutable Vector3 m_name_origin;
+ RenderableNamedEntity m_renderName;
-Callback m_transformChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_evaluateTransform;
void construct(){
m_keyObservers.insert( "classname", ClassnameFilter::ClassnameChangedCaller( m_filter ) );
LightShader m_shader;
- AABB m_aabb_light;
-
-Callback m_transformChanged;
-Callback m_boundsChanged;
-Callback m_evaluateTransform;
+Callback<void()> m_transformChanged;
+Callback<void()> m_boundsChanged;
+Callback<void()> m_evaluateTransform;
void construct(){
default_rotation( m_rotation );
public:
GtkTextBufferOutputStream( GtkTextBuffer* textBuffer, GtkTextIter* iter, GtkTextTag* tag ) : textBuffer( textBuffer ), iter( iter ), tag( tag ){
}
- std::size_t write( const char* buffer, std::size_t length ){
+ std::size_t __attribute__((optimize("O0"))) write( const char* buffer, std::size_t length ){
- gtk_text_buffer_insert_with_tags( textBuffer, iter, buffer, gint( length ), tag, 0 );
+ gtk_text_buffer_insert_with_tags( textBuffer, iter, buffer, gint( length ), tag, NULL );
return length;
}
};
void TextureBrowser_constructTreeStore(){
TextureGroups groups = TextureGroups_constructTreeView();
- GtkTreeStore* store = gtk_tree_store_new( 1, G_TYPE_STRING );
+ auto store = ui::TreeStore::from(gtk_tree_store_new( 1, G_TYPE_STRING ));
TextureGroups_constructTreeModel( groups, store );
- //std::set<CopiedString>::iterator iter;
-
- GtkTreeModel* model = GTK_TREE_MODEL( store );
++ std::set<CopiedString>::iterator iter;
- gtk_tree_view_set_model( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTree ), model );
+ gtk_tree_view_set_model(g_TextureBrowser.m_treeViewTree, store);
g_object_unref( G_OBJECT( store ) );
}
void TextureBrowser_constructTreeStoreTags(){
- TextureGroups groups;
+ //TextureGroups groups;
- GtkTreeStore* store = gtk_tree_store_new( 1, G_TYPE_STRING );
- GtkTreeModel* model = GTK_TREE_MODEL( g_TextureBrowser.m_all_tags_list );
+ auto store = ui::TreeStore::from(gtk_tree_store_new( 1, G_TYPE_STRING ));
+ auto model = g_TextureBrowser.m_all_tags_list;
- gtk_tree_view_set_model( GTK_TREE_VIEW( g_TextureBrowser.m_treeViewTags ), model );
+ gtk_tree_view_set_model(g_TextureBrowser.m_treeViewTags, model );
g_object_unref( G_OBJECT( store ) );
}
- /*
+ /*
- Copyright (C) 1999-2006 Id Software, Inc. and contributors.
+ Copyright (C) 1999-2007 id Software, Inc. and contributors.
For a list of contributors, see the accompanying CONTRIBUTORS file.
This file is part of GtkRadiant.
// 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 );
+ xmlSetProp( node, (xmlChar*)"level", (xmlChar*)&level );
// a 'select' information
sprintf( buf, "%i %i", entitynum, brushnum );
select = xmlNewNode( NULL, (xmlChar*)"brush" );
Sys_FPrintf( SYS_NOXML, "**********************\n" );
Sys_FPrintf( SYS_NOXML, "******* leaked *******\n" );
Sys_FPrintf( SYS_NOXML, "**********************\n" );
- polyline = LeakFile( tree );
+ polyline = LeakFile( tree, lineFilePath );
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;
determines opaque brushes in the world and find sky shaders for sunlight calculations
*/
-void SetupBrushesFlags( int mask_any, int test_any, int mask_all, int test_all ){
+void SetupBrushesFlags( unsigned int mask_any, unsigned int test_any, unsigned int mask_all, unsigned int test_all ){
int i, j, b;
unsigned int compileFlags, allCompileFlags;
- qboolean inside;
bspBrush_t *brush;
bspBrushSide_t *side;
bspShader_t *shader;