class tPathResource: public tPath { public: tString GetWritePath(const char *filename) const { tArray< tString > paths; Paths( paths ); tString fullname; fullname << paths(0) << "/" << filename; return fullname; } private: void Paths(tArray< tString >& paths) const { paths.SetLen( 0 ); int pos = 0; if ( st_AutoResourceDir.Len() > 1 ) paths[ pos++ ] = st_AutoResourceDir; else if ( st_ResourceDir.Len() > 1 ) paths[ pos++ ] = st_ResourceDir + "/automatic"; else if ( st_UserDataDir.Len() > 1 ) paths[ pos++ ] = st_UserDataDir + "/resource/automatic"; else paths[ pos++ ] = st_DataDir + "/resource/automatic"; paths[ pos++ ] = st_DataDir + "/resource/included"; if ( st_IncludedResourceDir.Len() > 1 ) paths[ pos++ ] = st_IncludedResourceDir; paths[ pos++ ] = st_DataDir + "/resource"; if ( st_UserDataDir.Len() > 1 ) paths[ pos++ ] = st_UserDataDir + "/resource"; if ( st_ResourceDir.Len() > 1 ) paths[ pos++ ] = st_ResourceDir; } };