Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members

SongManager.cpp File Reference

#include "global.h"
#include "SongManager.h"
#include "IniFile.h"
#include "RageLog.h"
#include "MsdFile.h"
#include "NotesLoaderDWI.h"
#include "BannerCache.h"
#include "arch/arch.h"
#include "GameState.h"
#include "PrefsManager.h"
#include "RageException.h"
#include "arch/LoadingWindow/LoadingWindow.h"
#include "Course.h"
#include "AnnouncerManager.h"
#include "ThemeManager.h"
#include "GameManager.h"
#include "RageFile.h"
#include "RageTextureManager.h"
#include "Sprite.h"
#include "ProfileManager.h"
#include "MemoryCardManager.h"
#include "NotesLoaderSM.h"
#include "SongUtil.h"
#include "StepsUtil.h"
#include "CourseUtil.h"
#include "RageFileManager.h"
#include "UnlockSystem.h"
#include "CatalogXml.h"
#include "Foreach.h"
#include "StageStats.h"
#include "Style.h"
#include "ThemeMetric.h"
#include "LuaFunctions.h"

Defines

#define SONGS_DIR   "Songs/"
#define COURSES_DIR   "Courses/"
#define MAX_EDITS_PER_PROFILE   200
#define MAX_EDIT_SIZE_BYTES   30*1024
#define GROUP_COLOR(i)   THEME->GetMetricC("SongManager",ssprintf("GroupColor%d",i+1))
#define CONVERT_COURSE_POINTER(pCourse)
#define CONVERT_TRAIL_POINTER(pTrail)
#define CONVERT_STEPS_POINTER(pSteps)
#define LuaFunction_Song(func, call)
#define LuaFunction_Steps(func, call)

Functions

const ThemeMetric< intNUM_GROUP_COLORS ("SongManager","NumGroupColors")
const ThemeMetric< RageColorBEGINNER_COLOR ("SongManager","BeginnerColor")
const ThemeMetric< RageColorEASY_COLOR ("SongManager","EasyColor")
const ThemeMetric< RageColorMEDIUM_COLOR ("SongManager","MediumColor")
const ThemeMetric< RageColorHARD_COLOR ("SongManager","HardColor")
const ThemeMetric< RageColorCHALLENGE_COLOR ("SongManager","ChallengeColor")
const ThemeMetric< RageColorEDIT_COLOR ("SongManager","EditColor")
const ThemeMetric< RageColorEXTRA_COLOR ("SongManager","ExtraColor")
const ThemeMetric< intEXTRA_COLOR_METER ("SongManager","ExtraColorMeter")
void UpdateMetrics ()
void GetSongsFromVector (const vector< Song * > &Songs, vector< Song * > &AddTo, CString sGroupName, int iMaxStages)
bool CompareNotesPointersForExtra (const Steps *n1, const Steps *n2)
bool CheckPointer (const Song *p)
 LuaFunction_Str (Song, SONGMAN->FindSong(str))
 LuaFunction_Song (SongFullDisplayTitle, p->GetFullDisplayTitle())
bool CheckPointer (const Steps *p)
 LuaFunction_Steps (StepsMeter, p->GetMeter())
CString GetCurrentSongDisplayTitle ()
CString GetCurrentSongDisplayArtist ()
CString GetCurrentSongCredit ()
CString GetCurrentStepsCredits ()
 LuaFunction_NoArgs (GetCurrentSongDisplayTitle, GetCurrentSongDisplayTitle()) LuaFunction_NoArgs(GetCurrentSongDisplayArtist

Variables

SongManagerSONGMAN = NULL
vector< RageColorg_vGroupColors
RageTimer g_LastMetricUpdate

Define Documentation

#define CONVERT_COURSE_POINTER pCourse   ) 
 

Value:

do { \ CourseID id = mapOldCourseToCourseID[pCourse]; /* this will always succeed */ \ pCourse = id.ToCourse(); \ } while(false)

#define CONVERT_STEPS_POINTER pSteps   ) 
 

Value:

do { \ if( pSteps != NULL ) { \ map<Steps*,StepsID>::iterator it = mapOldStepsToStepsID.find(pSteps); \ if( it != mapOldStepsToStepsID.end() ) \ pSteps = it->second.ToSteps( pSong, bAllowNotesLoss ); \ } \ } while(false)

#define CONVERT_TRAIL_POINTER pTrail   ) 
 

Value:

do { \ if( pTrail != NULL ) { \ map<Trail*,TrailIDAndCourse>::iterator it; \ it = mapOldTrailToTrailIDAndCourse.find(pTrail); \ ASSERT_M( it != mapOldTrailToTrailIDAndCourse.end(), ssprintf("%p", pTrail) ); \ const TrailIDAndCourse &tidc = it->second; \ const TrailID &id = tidc.first; \ const Course *pCourse = tidc.second; \ pTrail = id.ToTrail( pCourse, true ); \ } \ } while(false)

#define COURSES_DIR   "Courses/"
 

#define GROUP_COLOR  )     THEME->GetMetricC("SongManager",ssprintf("GroupColor%d",i+1))
 

#define LuaFunction_Song func,
call   ) 
 

Value:

int LuaFunc_##func( lua_State *L ) { \ REQ_ARGS( #func, 1 ); \ REQ_ARG( #func, 1, lightuserdata ); \ const Song *p = (const Song *) (lua_touserdata( L, -1 )); \ LUA_ASSERT( CheckPointer(p), ssprintf("%p is not a valid song", p) ); \ LUA_RETURN( call ); \ } \ LuaFunction( func ); /* register it */

#define LuaFunction_Steps func,
call   ) 
 

Value:

int LuaFunc_##func( lua_State *L ) { \ REQ_ARGS( #func, 1 ); \ REQ_ARG( #func, 1, lightuserdata ); \ const Steps *p = (const Steps *) (lua_touserdata( L, -1 )); \ LUA_ASSERT( CheckPointer(p), ssprintf("%p is not a valid steps", p) ); \ LUA_RETURN( call ); \ } \ LuaFunction( func ); /* register it */

#define MAX_EDIT_SIZE_BYTES   30*1024
 

#define MAX_EDITS_PER_PROFILE   200
 

#define SONGS_DIR   "Songs/"
 


Function Documentation

const ThemeMetric<RageColor> BEGINNER_COLOR "SongManager"  ,
"BeginnerColor" 
[static]
 

const ThemeMetric<RageColor> CHALLENGE_COLOR "SongManager"  ,
"ChallengeColor" 
[static]
 

bool CheckPointer const Steps p  )  [static]
 

bool CheckPointer const Song p  )  [static]
 

bool CompareNotesPointersForExtra const Steps n1,
const Steps n2
 

const ThemeMetric<RageColor> EASY_COLOR "SongManager"  ,
"EasyColor" 
[static]
 

const ThemeMetric<RageColor> EDIT_COLOR "SongManager"  ,
"EditColor" 
[static]
 

const ThemeMetric<RageColor> EXTRA_COLOR "SongManager"  ,
"ExtraColor" 
[static]
 

const ThemeMetric<int> EXTRA_COLOR_METER "SongManager"  ,
"ExtraColorMeter" 
[static]
 

GetCurrentSongCredit  ) 
 

GetCurrentSongDisplayArtist  ) 
 

CString GetCurrentSongDisplayTitle  ) 
 

CString GetCurrentStepsCredits  ) 
 

void GetSongsFromVector const vector< Song * > &  Songs,
vector< Song * > &  AddTo,
CString  sGroupName,
int  iMaxStages
[static]
 

const ThemeMetric<RageColor> HARD_COLOR "SongManager"  ,
"HardColor" 
[static]
 

LuaFunction_NoArgs GetCurrentSongDisplayTitle  ,
GetCurrentSongDisplayTitle() 
 

LuaFunction_Song SongFullDisplayTitle  ,
p->  GetFullDisplayTitle()
 

LuaFunction_Steps StepsMeter  ,
p->  GetMeter()
 

LuaFunction_Str Song  ,
SONGMAN->  FindSong(str)
 

const ThemeMetric<RageColor> MEDIUM_COLOR "SongManager"  ,
"MediumColor" 
[static]
 

const ThemeMetric<int> NUM_GROUP_COLORS "SongManager"  ,
"NumGroupColors" 
[static]
 

void UpdateMetrics  )  [static]
 


Variable Documentation

RageTimer g_LastMetricUpdate
 

vector<RageColor> g_vGroupColors
 

SongManager* SONGMAN = NULL
 


Generated on Thu Jan 27 20:58:21 2005 for StepMania by doxygen 1.3.7