16
0
mirror of https://github.com/MaSzyna-EU07/maszyna.git synced 2026-07-19 08:49:18 +02:00

refactor: create paths namespace instead of global variables

This commit is contained in:
jerrrrycho
2026-03-15 11:55:30 +01:00
parent 383788b30a
commit 9f43dca48b
20 changed files with 112 additions and 100 deletions

View File

@@ -675,9 +675,9 @@ TAnimModel::export_as_text_( std::ostream &Output ) const {
pModel ?
pModel->NameGet() + ".t3d" : // rainsted requires model file names to include an extension
"none" ) };
if( modelfile.find( szModelPath ) == 0 ) {
if( modelfile.find( paths::models ) == 0 ) {
// don't include 'models/' in the path
modelfile.erase( 0, std::string{ szModelPath }.size() );
modelfile.erase( 0, std::string{ paths::models }.size() );
}
Output << modelfile << ' ';
// texture
@@ -685,9 +685,9 @@ TAnimModel::export_as_text_( std::ostream &Output ) const {
m_materialdata.replacable_skins[ 1 ] != null_handle ?
GfxRenderer->Material( m_materialdata.replacable_skins[ 1 ] )->GetName() :
"none" ) };
if( texturefile.find( szTexturePath ) == 0 ) {
if( texturefile.find( paths::textures ) == 0 ) {
// don't include 'textures/' in the path
texturefile.erase( 0, std::string{ szTexturePath }.size() );
texturefile.erase( 0, std::string{ paths::textures }.size() );
}
if( contains( texturefile, ' ' ) ) {
Output << "\"" << texturefile << "\"" << ' ';