changed ase texture parsing to match DoomEdit

git-svn-id: svn://svn.icculus.org/gtkradiant/GtkRadiant/trunk@93 8a3a26a2-13c4-0310-b231-cf6edde360e5
This commit is contained in:
spog 2006-07-22 14:20:53 +00:00
parent e986a9d479
commit e87a0b240c
4 changed files with 28 additions and 22 deletions

View file

@ -4,6 +4,8 @@ that we distribute with the binaries. (see changelog)
22/07/2006 22/07/2006
SPoG SPoG
- Fixed doom3 func_static with model not appearing to move when dragged. - 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 09/07/2006
Shaderman Shaderman

View file

@ -1130,18 +1130,12 @@ static picoModel_t *_ase_load( PM_PARAMS_LOAD )
{ {
if(_pico_strnicmp(p, "quake", 5) == 0 || _pico_strnicmp(p, "doom", 4) == 0) if(_pico_strnicmp(p, "quake", 5) == 0 || _pico_strnicmp(p, "doom", 4) == 0)
{ {
break;
}
}
/* root-relative */ /* root-relative */
for(; *p != '\0'; ++p) for(; *p != '\0'; ++p)
{ {
if(*p == '/') if(*p == '/')
{ {
++p; ++p;
break;
}
}
/* game-relative */ /* game-relative */
for(; *p != '\0'; ++p) for(; *p != '\0'; ++p)
{ {
@ -1151,6 +1145,16 @@ static picoModel_t *_ase_load( PM_PARAMS_LOAD )
break; break;
} }
} }
}
}
}
/* DoomEdit's ASE loader searches for /base/ */
else if(_pico_strnicmp(p, "/base/", 6) == 0)
{
p += 6;
break;
}
}
if(*p != '\0') if(*p != '\0')
{ {

View file

@ -184,7 +184,7 @@ void deleteSelection();
void Sys_Status(const char* status); 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(); void ScreenUpdates_Enable();
bool ScreenUpdates_Enabled(); bool ScreenUpdates_Enabled();
void ScreenUpdates_process(); void ScreenUpdates_process();
@ -192,7 +192,7 @@ void ScreenUpdates_process();
class ScopeDisableScreenUpdates class ScopeDisableScreenUpdates
{ {
public: public:
ScopeDisableScreenUpdates(const char* message, const char* title = "") ScopeDisableScreenUpdates(const char* message, const char* title)
{ {
ScreenUpdates_Disable(message, title); ScreenUpdates_Disable(message, title);
} }

View file

@ -72,7 +72,7 @@ bool MapResource_loadFile(const MapFormat& format, scene::Node& root, const char
if(!file.failed()) if(!file.failed())
{ {
globalOutputStream() << "success\n"; globalOutputStream() << "success\n";
ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename)); ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename), "Loading Map");
ASSERT_NOTNULL(g_entityCreator); ASSERT_NOTNULL(g_entityCreator);
format.readGraph(root, file, *g_entityCreator); format.readGraph(root, file, *g_entityCreator);
return true; return true;
@ -111,7 +111,7 @@ bool MapResource_saveFile(const MapFormat& format, scene::Node& root, GraphTrave
if(!file.failed()) if(!file.failed())
{ {
globalOutputStream() << "success\n"; globalOutputStream() << "success\n";
ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename)); ScopeDisableScreenUpdates disableScreenUpdates(path_get_filename_start(filename), "Saving Map");
format.writeGraph(root, traverse, file); format.writeGraph(root, traverse, file);
return true; return true;
} }
@ -198,7 +198,7 @@ ModelLoader* ModelLoader_forType(const char* type)
NodeSmartReference ModelResource_load(ModelLoader* loader, const char* name) 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); NodeSmartReference model(g_nullModel);
@ -760,7 +760,7 @@ bool References_Saved()
void RefreshReferences() void RefreshReferences()
{ {
ScopeDisableScreenUpdates disableScreenUpdates("Refreshing models"); ScopeDisableScreenUpdates disableScreenUpdates("Processing...", "Refreshing Models");
g_referenceCache.refresh(); g_referenceCache.refresh();
} }