The start of doxygen style comments.
Using Javadoc style for most of this. The preferred style: document the header files. Document the source files for whatever is not in the header.
This commit is contained in:
@@ -13,8 +13,20 @@
|
|||||||
#include "Steps.h"
|
#include "Steps.h"
|
||||||
#include "PrefsManager.h"
|
#include "PrefsManager.h"
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief A custom .edit file can only be so big before we have to reject it.
|
||||||
|
*/
|
||||||
const int MAX_EDIT_STEPS_SIZE_BYTES = 60*1024; // 60 KB
|
const int MAX_EDIT_STEPS_SIZE_BYTES = 60*1024; // 60 KB
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Attempt to load any background changes in use by this song.
|
||||||
|
*
|
||||||
|
* This code is right now copied from NotesLoaderSM. There may be a time
|
||||||
|
* when we add to this code, or perhaps just refactor it properly.
|
||||||
|
* @param change a reference to the background change.
|
||||||
|
* @param sBGChangeExpression a reference to the list of changes to be made.
|
||||||
|
* @return its success or failure.
|
||||||
|
*/
|
||||||
bool LoadFromBGSSCChangesString( BackgroundChange &change, const RString &sBGChangeExpression )
|
bool LoadFromBGSSCChangesString( BackgroundChange &change, const RString &sBGChangeExpression )
|
||||||
{
|
{
|
||||||
vector<RString> aBGChangeValues;
|
vector<RString> aBGChangeValues;
|
||||||
|
|||||||
+55
-13
@@ -1,5 +1,4 @@
|
|||||||
/* SSCLoader - Reads a Song and its Steps from a .SSC file. */
|
/** @brief SSCLoader - Reads a Song and its Steps from a .SSC file. */
|
||||||
|
|
||||||
#ifndef NotesLoaderSSC_H
|
#ifndef NotesLoaderSSC_H
|
||||||
#define NotesLoaderSSC_H
|
#define NotesLoaderSSC_H
|
||||||
|
|
||||||
@@ -10,31 +9,74 @@ class Song;
|
|||||||
class Steps;
|
class Steps;
|
||||||
class TimingData;
|
class TimingData;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The various states while parsing a .ssc file.
|
||||||
|
*/
|
||||||
enum SSCLoadingStates
|
enum SSCLoadingStates
|
||||||
{
|
{
|
||||||
GETTING_SONG_INFO,
|
GETTING_SONG_INFO, /**< Retrieving song information. */
|
||||||
GETTING_STEP_INFO,
|
GETTING_STEP_INFO, /**< Retrieving step information. */
|
||||||
GETTING_STEP_TIMING_INFO,
|
GETTING_STEP_TIMING_INFO, /**< Retrieving a step's individual timing information. */
|
||||||
GETTING_NOTE_INFO,
|
GETTING_NOTE_INFO, /**< Retrieving the specific notes. This state may be deprecated. */
|
||||||
NUM_SSCLoadingStates
|
NUM_SSCLoadingStates /**< The number of states used. */
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief The SSCLoader handles all of the parsing needed for .ssc files.
|
||||||
|
*/
|
||||||
namespace SSCLoader
|
namespace SSCLoader
|
||||||
{
|
{
|
||||||
|
/**
|
||||||
|
* @brief Attempt to load a song from a specified path.
|
||||||
|
* @param sPath a const reference to the path on the hard drive to check.
|
||||||
|
* @param out a reference to the Song that will retrieve the song information.
|
||||||
|
* @return its success or failure.
|
||||||
|
*/
|
||||||
bool LoadFromDir( const RString &sPath, Song &out );
|
bool LoadFromDir( const RString &sPath, Song &out );
|
||||||
|
/**
|
||||||
|
* @brief Attempt to load the specified ssc file.
|
||||||
|
* @param sPath a const reference to the path on the hard drive to check.
|
||||||
|
* @param out a reference to the Song that will retrieve the song information.
|
||||||
|
* @param bFromCache a check to see if we are getting certain information from the cache file.
|
||||||
|
* @return its success or failure.
|
||||||
|
*/
|
||||||
bool LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCache = false );
|
bool LoadFromSSCFile( const RString &sPath, Song &out, bool bFromCache = false );
|
||||||
|
/**
|
||||||
|
* @brief Retrieve the list of .ssc files.
|
||||||
|
* @param sPath a const reference to the path on the hard drive to check.
|
||||||
|
* @param out a vector of files found in the path.
|
||||||
|
*/
|
||||||
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
void GetApplicableFiles( const RString &sPath, vector<RString> &out );
|
||||||
|
/**
|
||||||
|
* @brief Attempt to load an edit from the hard drive.
|
||||||
|
* @param sEditFilePath a path on the hard drive to check.
|
||||||
|
* @param slot the Profile of the user with the edit.
|
||||||
|
* @param bAddStepsToSong a flag to determine if we add the edit steps to the song file.
|
||||||
|
* @return its success or failure.
|
||||||
|
*/
|
||||||
bool LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
bool LoadEditFromFile( RString sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
||||||
|
/**
|
||||||
|
* @brief Attempt to parse the edit file in question.
|
||||||
|
* @param msd the edit file itself.
|
||||||
|
* @param sEditFilePath a const reference to a path on the hard drive to check.
|
||||||
|
* @param slot the Profile of the user with the edit.
|
||||||
|
* @param bAddStepsToSong a flag to determine if we add the edit steps to the song file.
|
||||||
|
* @return its success or failure.
|
||||||
|
*/
|
||||||
bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
bool LoadEditFromMsd( const MsdFile &msd, const RString &sEditFilePath, ProfileSlot slot, bool bAddStepsToSong );
|
||||||
|
/**
|
||||||
|
* @brief Perform some cleanup on the loaded song.
|
||||||
|
* @param song a reference to the song that may need cleaning up.
|
||||||
|
* @param bFromCache a flag to determine if this song is loaded from a cache file.
|
||||||
|
*/
|
||||||
void TidyUpData( Song &song, bool bFromCache );
|
void TidyUpData( Song &song, bool bFromCache );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
/**
|
||||||
/*
|
* @file
|
||||||
* (c) 2011 Jason Felds
|
* @author Jason Felds (c) 2011
|
||||||
|
*
|
||||||
|
* @section LICENSE
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||||
|
|||||||
Reference in New Issue
Block a user