00001 /* SMLoader - reads a Song from an .SM file. */ 00002 00003 #ifndef NOTES_LOADER_SM_H 00004 #define NOTES_LOADER_SM_H 00005 00006 #include "song.h" 00007 #include "Steps.h" 00008 #include "NotesLoader.h" 00009 00010 class MsdFile; 00011 00012 class SMLoader: public NotesLoader 00013 { 00014 static void LoadFromSMTokens( 00015 CString sStepsType, 00016 CString sDescription, 00017 CString sDifficulty, 00018 CString sMeter, 00019 CString sRadarValues, 00020 CString sNoteData, 00021 Steps &out); 00022 00023 bool FromCache; 00024 00025 public: 00026 SMLoader() { FromCache = false; } 00027 bool LoadFromSMFile( CString sPath, Song &out ); 00028 bool LoadFromSMFile( CString sPath, Song &out, bool cache ) 00029 { 00030 FromCache=cache; 00031 return LoadFromSMFile( sPath, out ); 00032 } 00033 00034 void GetApplicableFiles( CString sPath, CStringArray &out ); 00035 bool LoadFromDir( CString sPath, Song &out ); 00036 void TidyUpData( Song &song, bool cache ); 00037 static bool LoadTimingFromFile( const CString &fn, TimingData &out ); 00038 static void LoadTimingFromSMFile( const MsdFile &msd, TimingData &out ); 00039 static bool LoadEdit( CString sEditFilePath, ProfileSlot slot ); 00040 }; 00041 00042 #endif 00043 00044 /* 00045 * (c) 2001-2004 Chris Danford, Glenn Maynard 00046 * All rights reserved. 00047 * 00048 * Permission is hereby granted, free of charge, to any person obtaining a 00049 * copy of this software and associated documentation files (the 00050 * "Software"), to deal in the Software without restriction, including 00051 * without limitation the rights to use, copy, modify, merge, publish, 00052 * distribute, and/or sell copies of the Software, and to permit persons to 00053 * whom the Software is furnished to do so, provided that the above 00054 * copyright notice(s) and this permission notice appear in all copies of 00055 * the Software and that both the above copyright notice(s) and this 00056 * permission notice appear in supporting documentation. 00057 * 00058 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 00059 * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 00060 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF 00061 * THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS 00062 * INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT 00063 * OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS 00064 * OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 00065 * OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 00066 * PERFORMANCE OF THIS SOFTWARE. 00067 */