changed ase texture parsing to match DoomEdit
authorspog <spog>
Sat, 22 Jul 2006 14:20:53 +0000 (14:20 +0000)
committerspog <spog>
Sat, 22 Jul 2006 14:20:53 +0000 (14:20 +0000)
git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@93 8a3a26a2-13c4-0310-b231-cf6edde360e5

CHANGES
libs/picomodel/pm_ase.c
radiant/mainframe.h
radiant/referencecache.cpp

diff --git a/CHANGES b/CHANGES
index d1ecd022fb2dd32865dfb4a698651fd0ad617c82..2c2ad86795a9a1556db138a6da05298eed70e5ec 100644 (file)
--- 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
index 2450075875a78f419fc0098fbd9ce92bf85b1357..264bd2b90c7fe88e5cacb7980bcfe892fde7f0d5 100644 (file)
@@ -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;
             }
           }
index 840341c3af845cdd41b1e615f165cc8c46be6f44..53f3844b09da81f4a2a841bcc9bddd973d3d25b4 100644 (file)
@@ -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);
   }
index 91663569143f66dd162afae6842e88b7e582fd03..d41b9344036eee4296cd3d1d8828dbcad32afc3a 100644 (file)
@@ -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();
 }