From: Thomas Debesse Date: Mon, 25 May 2020 18:19:04 +0000 (+0200) Subject: Merge commit '173f350be76237a7dee9c00c389dff4e56b3da4c' into garux-merge X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=37bef590b1d2161b16b2bd33349fc8b56af60920;p=xonotic%2Fnetradiant.git Merge commit '173f350be76237a7dee9c00c389dff4e56b3da4c' into garux-merge --- 37bef590b1d2161b16b2bd33349fc8b56af60920 diff --cc libs/os/file.h index 144627e6,41c20c15..252085c2 --- a/libs/os/file.h +++ b/libs/os/file.h @@@ -27,9 -25,22 +27,22 @@@ /// \file /// \brief OS file-system querying and manipulation. -#if defined( WIN32 ) +#if GDEF_OS_WINDOWS #define S_ISDIR( mode ) ( mode & _S_IFDIR ) #include // _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 // access() diff --cc plugins/entity/group.cpp index bad7fc54,65d8cca6..b2c01e9f --- a/plugins/entity/group.cpp +++ b/plugins/entity/group.cpp @@@ -63,11 -63,11 +63,11 @@@ NameKeys m_nameKeys OriginKey m_originKey; Vector3 m_origin; - RenderableNamedEntity m_renderName; mutable Vector3 m_name_origin; + RenderableNamedEntity m_renderName; -Callback m_transformChanged; -Callback m_evaluateTransform; +Callback m_transformChanged; +Callback m_evaluateTransform; void construct(){ m_keyObservers.insert( "classname", ClassnameFilter::ClassnameChangedCaller( m_filter ) ); diff --cc plugins/entity/light.cpp index 65ac614e,f0261cc5..890d2e8c --- a/plugins/entity/light.cpp +++ b/plugins/entity/light.cpp @@@ -805,11 -807,9 +807,9 @@@ RenderLightProjection m_renderProjectio LightShader m_shader; - AABB m_aabb_light; - -Callback m_transformChanged; -Callback m_boundsChanged; -Callback m_evaluateTransform; +Callback m_transformChanged; +Callback m_boundsChanged; +Callback m_evaluateTransform; void construct(){ default_rotation( m_rotation ); diff --cc radiant/console.cpp index 82b08e3c,94060a45..ea837329 --- a/radiant/console.cpp +++ b/radiant/console.cpp @@@ -141,8 -147,8 +144,8 @@@ GtkTextTag* tag 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; } }; diff --cc radiant/texwindow.cpp index 772f80b1,3ea764bb..416d3178 --- a/radiant/texwindow.cpp +++ b/radiant/texwindow.cpp @@@ -1679,20 -1575,23 +1679,21 @@@ TextureGroups TextureGroups_constructTr 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::iterator iter; - - GtkTreeModel* model = GTK_TREE_MODEL( store ); ++ std::set::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 ) ); } diff --cc tools/quake2/qdata/images.c index 00f30e05,ce3ff136..6a50cdb7 --- a/tools/quake2/qdata/images.c +++ b/tools/quake2/qdata/images.c @@@ -1,5 -1,5 +1,5 @@@ - /* + /* - 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. diff --cc tools/quake3/common/inout.c index 5ade8802,827bdceb..1a7c6b8a --- a/tools/quake3/common/inout.c +++ b/tools/quake3/common/inout.c @@@ -150,10 -148,10 +150,10 @@@ void xml_Select( char *msg, int entityn // 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" ); diff --cc tools/quake3/q3map2/bsp.c index 96da9ba8,b9344a3a..dff44850 --- a/tools/quake3/q3map2/bsp.c +++ b/tools/quake3/q3map2/bsp.c @@@ -347,9 -347,9 +347,9 @@@ void ProcessWorldModel( const char *por 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; diff --cc tools/quake3/q3map2/light_ydnar.c index 5f46268f,83595337..bc10b2f6 --- a/tools/quake3/q3map2/light_ydnar.c +++ b/tools/quake3/q3map2/light_ydnar.c @@@ -3159,10 -3219,9 +3159,9 @@@ void IlluminateVertexes( int num ) 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;