From: spog Date: Sat, 22 Jul 2006 14:20:53 +0000 (+0000) Subject: changed ase texture parsing to match DoomEdit X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=d31a26c4ecf3a1dd8bab178458894424f6dba59d;p=xonotic%2Fnetradiant.git changed ase texture parsing to match DoomEdit git-svn-id: https://zerowing.idsoftware.com/svn/radiant/GtkRadiant/trunk@93 8a3a26a2-13c4-0310-b231-cf6edde360e5 --- diff --git a/CHANGES b/CHANGES index d1ecd022..2c2ad867 100644 --- a/CHANGES +++ b/CHANGES @@ -4,6 +4,8 @@ that we distribute with the binaries. (see changelog) 22/07/2006 SPoG - Fixed doom3 func_static with model not appearing to move when dragged. +- Changed ASE model loader to parse material names the same way as DoomEdit. +- Fixed title of wait-dialog when loading a model. 09/07/2006 Shaderman diff --git a/libs/picomodel/pm_ase.c b/libs/picomodel/pm_ase.c index 24500758..264bd2b9 100644 --- a/libs/picomodel/pm_ase.c +++ b/libs/picomodel/pm_ase.c @@ -1130,24 +1130,28 @@ static picoModel_t *_ase_load( PM_PARAMS_LOAD ) { if(_pico_strnicmp(p, "quake", 5) == 0 || _pico_strnicmp(p, "doom", 4) == 0) { - break; - } - } - /* root-relative */ - for(; *p != '\0'; ++p) - { - if(*p == '/') - { - ++p; - break; + /* root-relative */ + for(; *p != '\0'; ++p) + { + if(*p == '/') + { + ++p; + /* game-relative */ + for(; *p != '\0'; ++p) + { + if(*p == '/') + { + ++p; + break; + } + } + } + } } - } - /* game-relative */ - for(; *p != '\0'; ++p) - { - if(*p == '/') + /* DoomEdit's ASE loader searches for /base/ */ + else if(_pico_strnicmp(p, "/base/", 6) == 0) { - ++p; + p += 6; break; } } diff --git a/radiant/mainframe.h b/radiant/mainframe.h index 840341c3..53f3844b 100644 --- a/radiant/mainframe.h +++ b/radiant/mainframe.h @@ -184,7 +184,7 @@ void deleteSelection(); void Sys_Status(const char* status); -void ScreenUpdates_Disable(const char* message, const char* title = ""); +void ScreenUpdates_Disable(const char* message, const char* title); void ScreenUpdates_Enable(); bool ScreenUpdates_Enabled(); void ScreenUpdates_process(); @@ -192,7 +192,7 @@ void ScreenUpdates_process(); class ScopeDisableScreenUpdates { public: - ScopeDisableScreenUpdates(const char* message, const char* title = "") + ScopeDisableScreenUpdates(const char* message, const char* title) { ScreenUpdates_Disable(message, title); } diff --git a/radiant/referencecache.cpp b/radiant/referencecache.cpp index 91663569..d41b9344 100644 --- a/radiant/referencecache.cpp +++ b/radiant/referencecache.cpp @@ -72,7 +72,7 @@ bool MapResource_loadFile(const MapFormat& format, scene::Node& root, const char if(!file.failed()) { globalOutputStream() << "success\n"; - ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename)); + ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename), "Loading Map"); ASSERT_NOTNULL(g_entityCreator); format.readGraph(root, file, *g_entityCreator); return true; @@ -111,7 +111,7 @@ bool MapResource_saveFile(const MapFormat& format, scene::Node& root, GraphTrave if(!file.failed()) { globalOutputStream() << "success\n"; - ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename)); + ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename), "Saving Map"); format.writeGraph(root, traverse, file); return true; } @@ -198,7 +198,7 @@ ModelLoader* ModelLoader_forType(const char* type) NodeSmartReference ModelResource_load(ModelLoader* loader, const char* name) { - ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(name)); + ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(name), "Loading Model"); NodeSmartReference model(g_nullModel); @@ -760,7 +760,7 @@ bool References_Saved() void RefreshReferences() { - ScopeDisableScreenUpdates disableScreenUpdates("Refreshing models"); + ScopeDisableScreenUpdates disableScreenUpdates("Processing...", "Refreshing Models"); g_referenceCache.refresh(); }