From 3d155c997080c1cb722d9c425016bab41bee750f Mon Sep 17 00:00:00 2001 From: Jason Felds Date: Sun, 12 Jun 2011 19:35:24 -0400 Subject: [PATCH] NOW I start moving prototypes to headers? I need to be more consistent...gah, hungry. --- src/AttackDisplay.h | 2 ++ src/CourseUtil.h | 4 ++++ src/DateTime.h | 2 ++ src/GameSoundManager.h | 3 +++ src/GameState.h | 2 ++ src/MenuTimer.h | 2 ++ src/NoteDataUtil.cpp | 7 ------- src/NoteDataUtil.h | 18 ++++++++++++++++++ src/PrefsManager.h | 3 +++ src/RageFileManager.h | 4 ++++ src/RageSoundReader_MP3.cpp | 1 - src/RageSoundReader_MP3.h | 5 +++++ src/RageSoundReader_WAV.h | 3 +++ src/Song.h | 3 +++ src/SongManager.h | 4 ++++ src/SongUtil.h | 2 ++ src/Sprite.h | 2 ++ src/arch/MovieTexture/MovieTexture.h | 2 ++ src/arch/MovieTexture/MovieTexture_FFMpeg.cpp | 4 ++++ src/archutils/Unix/CrashHandlerChild.cpp | 2 ++ 20 files changed, 67 insertions(+), 8 deletions(-) diff --git a/src/AttackDisplay.h b/src/AttackDisplay.h index 1a411ea55a..5e4dccf3d3 100644 --- a/src/AttackDisplay.h +++ b/src/AttackDisplay.h @@ -6,6 +6,8 @@ #include "GameConstantsAndTypes.h" // for TapNoteScore #include "RageTexturePreloader.h" +RString GetAttackPieceName( const RString &sAttack ); + class PlayerState; /** @brief A graphical display for attacks. */ class AttackDisplay : public ActorFrame diff --git a/src/CourseUtil.h b/src/CourseUtil.h index e338c9c3e7..6be86abe77 100644 --- a/src/CourseUtil.h +++ b/src/CourseUtil.h @@ -11,6 +11,10 @@ class XNode; class CourseEntry; class Song; +bool CompareCoursePointersBySortValueAscending( const Course *pSong1, const Course *pSong2 ); +bool CompareCoursePointersBySortValueDescending( const Course *pSong1, const Course *pSong2 ); +bool CompareCoursePointersByTitle( const Course *pCourse1, const Course *pCourse2 ); + /** @brief Utility functions that deal with Courses. */ namespace CourseUtil { diff --git a/src/DateTime.h b/src/DateTime.h index 58f2cbe6ff..2d77da95bd 100644 --- a/src/DateTime.h +++ b/src/DateTime.h @@ -4,6 +4,8 @@ #include "EnumHelper.h" #include +int StringToDayInYear( RString sDayInYear ); + /** @brief The number of days we check for previously. */ const int NUM_LAST_DAYS = 7; /** @brief The number of weeks we check for previously. */ diff --git a/src/GameSoundManager.h b/src/GameSoundManager.h index 6ce38ca39e..1187924a37 100644 --- a/src/GameSoundManager.h +++ b/src/GameSoundManager.h @@ -6,6 +6,9 @@ class TimingData; class RageSound; struct lua_State; + +int MusicThread_start( void *p ); + /** @brief High-level sound utilities. */ class GameSoundManager { diff --git a/src/GameState.h b/src/GameState.h index 0b2463f3c7..51abbac141 100644 --- a/src/GameState.h +++ b/src/GameState.h @@ -32,6 +32,8 @@ class Style; class TimingData; class Trail; +SortOrder GetDefaultSort(); + /** @brief Holds game data that is not saved between sessions. */ class GameState { diff --git a/src/MenuTimer.h b/src/MenuTimer.h index 1756bf715d..cd3a211c54 100644 --- a/src/MenuTimer.h +++ b/src/MenuTimer.h @@ -9,6 +9,8 @@ #include "ThemeMetric.h" #include "AutoActor.h" +RString WARNING_COMMAND_NAME( size_t i ); + class MenuTimer : public ActorFrame { public: diff --git a/src/NoteDataUtil.cpp b/src/NoteDataUtil.cpp index 7ecbbe46ac..68151e4cae 100644 --- a/src/NoteDataUtil.cpp +++ b/src/NoteDataUtil.cpp @@ -778,13 +778,6 @@ void NoteDataUtil::LoadTransformedLightsFromTwo( const NoteData &marquee, const NoteDataUtil::RemoveMines( out ); } -struct RadarStats { - int taps; - int jumps; - int hands; - int quads; -}; - RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out ) { out.taps = 0; diff --git a/src/NoteDataUtil.h b/src/NoteDataUtil.h index f92043c9ff..167d2955f7 100644 --- a/src/NoteDataUtil.h +++ b/src/NoteDataUtil.h @@ -10,6 +10,24 @@ class NoteData; class Song; struct AttackArray; +/** @brief A limited selection of the RadarValues. */ +struct RadarStats +{ + /** @brief The number of tap notes in the song. */ + int taps; + /** @brief The number of jumps in the song. */ + int jumps; + /** @brief The number of 3 panel hits in the song. */ + int hands; + /** @brief The number of 4 panel hits in the song. */ + int quads; +}; + +void PlaceAutoKeysound( NoteData &out, int row, TapNote akTap ); +int FindLongestOverlappingHoldNoteForAnyTrack( const NoteData &in, int iRow ); +void LightTransformHelper( const NoteData &in, NoteData &out, const vector &aiTracks ); +RadarStats CalculateRadarStatsFast( const NoteData &in, RadarStats &out ); + /** * @brief Utility functions that deal with NoteData. * diff --git a/src/PrefsManager.h b/src/PrefsManager.h index 2d1f564bb3..589da26533 100644 --- a/src/PrefsManager.h +++ b/src/PrefsManager.h @@ -5,6 +5,9 @@ class IniFile; +void ValidateDisplayAspectRatio( float &val ); +void ValidateSongsPerPlay( int &val ); + /** @brief How many songs can be played during a normal game max? * * This assumes no extra stages, no event mode, no course modes. */ diff --git a/src/RageFileManager.h b/src/RageFileManager.h index 59767b7aa4..12c6ca1fe0 100644 --- a/src/RageFileManager.h +++ b/src/RageFileManager.h @@ -10,6 +10,10 @@ namespace RageFileManagerUtil class RageFileDriver; class RageFileBasic; struct lua_State; + +bool ilt( const RString &a, const RString &b ); +bool ieq( const RString &a, const RString &b ); + /** @brief File utilities and high-level manager for RageFile objects. */ class RageFileManager { diff --git a/src/RageSoundReader_MP3.cpp b/src/RageSoundReader_MP3.cpp index 048b20e508..cb7829c09f 100644 --- a/src/RageSoundReader_MP3.cpp +++ b/src/RageSoundReader_MP3.cpp @@ -26,7 +26,6 @@ enum tagtype { TAGTYPE_ID3V2_FOOTER }; -typedef unsigned long id3_length_t; static const int ID3_TAG_FLAG_FOOTERPRESENT = 0x10; static tagtype tagtype( const unsigned char *data, id3_length_t length ) diff --git a/src/RageSoundReader_MP3.h b/src/RageSoundReader_MP3.h index cc8862808a..815e8e7c27 100644 --- a/src/RageSoundReader_MP3.h +++ b/src/RageSoundReader_MP3.h @@ -8,6 +8,11 @@ struct madlib_t; +typedef unsigned long id3_length_t; + +signed long id3_tag_query( const unsigned char *data, id3_length_t length ); +void fill_frame_index_cache( madlib_t *mad ); + class RageSoundReader_MP3: public RageSoundReader_FileReader { public: diff --git a/src/RageSoundReader_WAV.h b/src/RageSoundReader_WAV.h index 20dcdeeaa2..53cf48d18d 100644 --- a/src/RageSoundReader_WAV.h +++ b/src/RageSoundReader_WAV.h @@ -7,6 +7,9 @@ #include "RageFile.h" struct WavReader; + +RString ReadString( RageFileBasic &f, int iSize, RString &sError ); + class RageSoundReader_WAV: public RageSoundReader_FileReader { public: diff --git a/src/Song.h b/src/Song.h index 600694a640..98ff89ece2 100644 --- a/src/Song.h +++ b/src/Song.h @@ -16,6 +16,9 @@ class StepsID; struct lua_State; struct BackgroundChange; +void FixupPath( RString &path, const RString &sSongPath ); +RString GetSongAssetPath( RString sPath, const RString &sSongPath ); + /** @brief The version of the .ssc file format. */ const static float STEPFILE_VERSION_NUMBER = 0.7f; diff --git a/src/SongManager.h b/src/SongManager.h index 4df49feae7..54eaaa0cec 100644 --- a/src/SongManager.h +++ b/src/SongManager.h @@ -18,6 +18,10 @@ struct lua_State; #include "RageTexturePreloader.h" #include "RageUtil.h" +RString SONG_GROUP_COLOR_NAME( size_t i ); +RString COURSE_GROUP_COLOR_NAME( size_t i ); +bool CompareNotesPointersForExtra(const Steps *n1, const Steps *n2); + /** @brief The max number of edit steps a profile can have. */ const int MAX_EDIT_STEPS_PER_PROFILE = 200; /** @brief The max number of edit courses a profile can have. */ diff --git a/src/SongUtil.h b/src/SongUtil.h index 5432d455e3..4ecbcb8687 100644 --- a/src/SongUtil.h +++ b/src/SongUtil.h @@ -13,6 +13,8 @@ class Steps; class Profile; class XNode; +void AppendOctal( int n, int digits, RString &out ); + /** @brief The criteria for dealing with songs. */ class SongCriteria { diff --git a/src/Sprite.h b/src/Sprite.h index 7247171f70..3a941ec28c 100644 --- a/src/Sprite.h +++ b/src/Sprite.h @@ -4,6 +4,8 @@ #include "Actor.h" #include "RageTextureID.h" +void TexCoordArrayFromRect( float fImageCoords[8], const RectF &rect ); + class RageTexture; /** @brief A bitmap Actor that animates and moves around. */ class Sprite: public Actor diff --git a/src/arch/MovieTexture/MovieTexture.h b/src/arch/MovieTexture/MovieTexture.h index a97ea7e89f..b36b15fcae 100644 --- a/src/arch/MovieTexture/MovieTexture.h +++ b/src/arch/MovieTexture/MovieTexture.h @@ -5,6 +5,8 @@ #include "arch/RageDriver.h" #include +void ForceToAscii( RString &str ); + class RageMovieTexture : public RageTexture { public: diff --git a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp index ed70a0acbf..ba00dbacb0 100644 --- a/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp +++ b/src/arch/MovieTexture/MovieTexture_FFMpeg.cpp @@ -28,6 +28,10 @@ namespace avcodec #endif }; +int URLRageFile_open( avcodec::URLContext *h, const char *filename, int flags ); +int URLRageFile_read( avcodec::URLContext *h, unsigned char *buf, int size ); +int URLRageFile_close( avcodec::URLContext *h ); + /* #if defined(_MSC_VER) #pragma comment(lib, "ffmpeg/lib/avcodec.lib") diff --git a/src/archutils/Unix/CrashHandlerChild.cpp b/src/archutils/Unix/CrashHandlerChild.cpp index 4255470779..518ad0c7f6 100644 --- a/src/archutils/Unix/CrashHandlerChild.cpp +++ b/src/archutils/Unix/CrashHandlerChild.cpp @@ -28,6 +28,8 @@ extern const char *const version_date; extern const char *const version_time; #endif +bool child_read( int fd, void *p, int size ); + const char *g_pCrashHandlerArgv0 = NULL;