~luke-jr/tr2norigins/tr2norigins-0.4

« back to all changes in this revision

Viewing changes to src/tools/tConfiguration.cpp

  • Committer: Luke Dashjr
  • Date: 2010-04-20 23:29:32 UTC
  • mfrom: (690.1.4 compile)
  • Revision ID: luke+bzr@dashjr.org-20100420232932-2t5c0gbjsvh9k33f
MERGE: Moviepack mostly finished

Show diffs side-by-side

added added

removed removed

Lines of Context:
912
912
 
913
913
static void st_InstallSigHupHandler();
914
914
 
 
915
// Read settigns in from movipack folder
 
916
void loadMoviePackSettings(int index, bool called_from_menu=true)
 
917
{
 
918
 
 
919
        tCurrentAccessLevel level( tAccessLevel_Owner, true );
 
920
        if (called_from_menu) tConfItemBase::printChange=false;
 
921
 
 
922
        const tPath& data = tDirectories::Data();
 
923
 
 
924
        Load( data, tString(sg_moviepackPathName + sg_moviepackSlot[index] + "/settings.cfg") );
 
925
        
 
926
        if (called_from_menu) tConfItemBase::printChange=true;
 
927
 
 
928
}
 
929
 
915
930
void st_LoadConfig( bool printChange )
916
931
{
917
932
    // default include files are executed at owner level
949
964
        {
950
965
                gm_moviepack_name = tString("Unnamed");  //reset to default
951
966
                gm_moviepack_creator = tString("Anonoymous");  //reset to default
952
 
                Load( data, tString(sg_moviepackPathName + sg_moviepackSlot[i] + "/settings.cfg") ); //read in mainly just 2 items
 
967
                loadMoviePackSettings(i); //read in mainly just 2 items
 
968
 
953
969
                sg_moviepackName[i] = gm_moviepack_name;
954
970
                sg_moviepackCreator[i] = gm_moviepack_creator;
955
971
 
961
977
                        }
962
978
                }
963
979
        }
964
 
#endif
 
980
        
965
981
    // Read in our current moviepack settings.
966
 
    Load( data, tString(sg_moviepackPathName + sg_moviepackSlot[sg_moviepackIndex] + "/settings.cfg") );
 
982
    loadMoviePackSettings(sg_moviepackIndex);
 
983
#endif
 
984
 
967
985
 
968
986
    Load( config, "autoexec.cfg" );
969
987
    Load( var, "autoexec.cfg" );