comment/cleanup

This commit is contained in:
AJ Kelly
2010-07-17 02:33:13 -05:00
parent 7d36a60cff
commit eb504b5963
6 changed files with 53 additions and 63 deletions
+9 -9
View File
@@ -19,7 +19,7 @@ struct TapNoteResult
* only meaningful for graded taps (tns >= TNS_W5). */
float fTapNoteOffset;
/* If the whole row has been judged, all taps on the row will be set to hidden. */
// If the whole row has been judged, all taps on the row will be set to hidden.
bool bHidden;
// XML
@@ -40,15 +40,15 @@ struct HoldNoteResult
* If the life is > 0.0 when the HoldNote ends, then m_HoldScore becomes HNS_Held. */
float fLife;
/* The number of seconds the hold note has overlapped the current beat, or 0 if it
* doesn't overlap. */
/* The number of seconds the hold note has overlapped the current beat, or 0
* if it doesn't overlap. */
float fOverlappedTime;
/* Last index where fLife was greater than 0. If the tap was missed, this will
* be the first index of the hold. */
/* Last index where fLife was greater than 0. If the tap was missed, this
* will be the first index of the hold. */
int iLastHeldRow;
/* If checkpoint holds are enabled, the number of checkpoints hit and missed. */
// If checkpoint holds are enabled, the number of checkpoints hit and missed.
int iCheckpointsHit;
int iCheckpointsMissed;
@@ -180,11 +180,11 @@ extern TapNote TAP_ADDITION_MINE;
// TODO: Don't have a hard-coded track limit.
const int MAX_NOTE_TRACKS = 16;
/* This is a divisor for our "fixed-point" time/beat representation. It must be evenly divisible
* by 2, 3, and 4, to exactly represent 8th, 12th and 16th notes. */
/* This is a divisor for our "fixed-point" time/beat representation. It must be
* evenly divisible by 2, 3, and 4, to exactly represent 8th, 12th and 16th notes. */
const int ROWS_PER_BEAT = 48;
/* In the editor, enforce a reasonable limit on the number of notes. */
// In the editor, enforce a reasonable limit on the number of notes.
const int MAX_NOTES_PER_MEASURE = 50;
+1 -1
View File
@@ -1,4 +1,4 @@
/* ScreenEvaluation - Shows the user their score after gameplay has ended. */
/* ScreenEvaluation - Shows the player their score after gameplay has ended. */
#ifndef SCREEN_EVALUATION_H
#define SCREEN_EVALUATION_H
+1 -1
View File
@@ -33,7 +33,7 @@ void ScreenExit::Update( float fDelta )
if( m_Exited )
return;
/* Grab the list of playing sounds, and see if it's empty. */
// Grab the list of playing sounds, and see if it's empty.
const set<RageSound *> &PlayingSounds = SOUNDMAN->GetPlayingSounds();
bool DoQuit = PlayingSounds.empty();
+7 -9
View File
@@ -743,7 +743,6 @@ void ScreenGameplay::Init()
pi->GetPlayerStageStats()->m_vpPossibleSteps = pi->m_vpStepsQueue;
}
LOG->Trace("[ScreenGameplay::Init] loading scorekeepers");
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
{
ASSERT( !pi->m_vpStepsQueue.empty() );
@@ -944,11 +943,10 @@ bool ScreenGameplay::IsLastSong()
void ScreenGameplay::SetupSong( int iSongIndex )
{
LOG->Trace("[ScreenGameplay::SetupSong] begin");
FOREACH_EnabledPlayerInfo( m_vPlayerInfo, pi )
{
/* This is the first beat that can be changed without it being visible. Until
* we draw for the first time, any beat can be changed. */
/* This is the first beat that can be changed without it being visible.
* Until we draw for the first time, any beat can be changed. */
pi->GetPlayerState()->m_fLastDrawnBeat = -100;
Steps *pSteps = pi->m_vpStepsQueue[iSongIndex];
@@ -956,10 +954,10 @@ void ScreenGameplay::SetupSong( int iSongIndex )
/* Load new NoteData into Player. Do this before
* RebuildPlayerOptionsFromActiveAttacks or else transform mods will get
* propogated to GAMESTATE->m_pPlayerOptions too early and be double-applied
* propagated to GAMESTATE->m_pPlayerOptions too early and be double-applied
* to the NoteData:
* once in Player::Load, then again in Player::ApplyActiveAttacks. This
* is very bad for transforms like AddMines.
* once in Player::Load, then again in Player::ApplyActiveAttacks.
* This is very bad for transforms like AddMines.
*/
NoteData originalNoteData;
pSteps->GetNoteData( originalNoteData );
@@ -1031,10 +1029,10 @@ void ScreenGameplay::SetupSong( int iSongIndex )
GAMESTATE->m_SongOptions.FromString( ModsLevel_Song, a.sModifiers );
}
/* Update attack bOn flags. */
// Update attack bOn flags.
pi->GetPlayerState()->Update( 0 );
/* Hack: Course modifiers that are set to start immediately shouldn't tween on. */
// Hack: Course modifiers that are set to start immediately shouldn't tween on.
pi->GetPlayerState()->m_PlayerOptions.SetCurrentToLevel( ModsLevel_Stage );
}
}
+13 -21
View File
@@ -1,5 +1,4 @@
#include "global.h"
#include "ScreenJukebox.h"
#include "RageLog.h"
#include "ThemeManager.h"
@@ -32,9 +31,8 @@ void ScreenJukebox::SetSong()
vector<Song*> vSongs;
//Check to see if there is a theme-course
//I.E. If there is a course called exactly the theme name,
//then we pick a song from this course.
/* Check to see if there is a theme course. If there is a course that has
* the exact same name as the theme, then we pick a song from this course. */
Course *pCourse = SONGMAN->GetCourseFromName( THEME->GetCurThemeName() );
if( pCourse != NULL )
for ( unsigned i = 0; i < pCourse->m_vEntries.size(); i++ )
@@ -45,13 +43,11 @@ void ScreenJukebox::SetSong()
vSongs = SONGMAN->GetSongs( GAMESTATE->m_sPreferredSongGroup );
//
// Calculate what difficulties to show
//
vector<Difficulty> vDifficultiesToShow;
if( m_bDemonstration )
{
// HACK: This belongs in ScreenDemonstration
// HACK: This belongs in ScreenDemonstration.
ThemeMetricDifficultiesToShow DIFFICULTIES_TO_SHOW_HERE(m_sName,"DifficultiesToShow");
vDifficultiesToShow = DIFFICULTIES_TO_SHOW_HERE.GetValue();
}
@@ -70,9 +66,7 @@ void ScreenJukebox::SetSong()
ASSERT( !vDifficultiesToShow.empty() );
//
// Search for a Song and Steps to play during the demo
//
// Search for a Song and Steps to play during the demo.
for( int i=0; i<1000; i++ )
{
if( vSongs.size() == 0 )
@@ -104,12 +98,11 @@ void ScreenJukebox::SetSong()
FOREACH_PlayerNumber( p )
GAMESTATE->m_pCurSteps[p].Set( pSteps );
bool bShowModifiers = randomf(0,1) <= SHOW_COURSE_MODIFIERS_PROBABILITY;
if( bShowModifiers )
{
/* If we have a modifier course containing this song, apply its modifiers. Only check
* fixed course entries. */
/* If we have a modifier course containing this song, apply its
* modifiers. Only check fixed course entries. */
vector<Course*> apCourses;
SONGMAN->GetAllCourses( apCourses, false );
vector<const CourseEntry *> apOptions;
@@ -121,7 +114,6 @@ void ScreenJukebox::SetSong()
if( pEntry == NULL || pEntry->attacks.size() == 0 )
continue;
if( !ALLOW_ADVANCED_MODIFIERS )
{
// There are some confusing mods that we don't want to show in demonstration.
@@ -133,6 +125,7 @@ void ScreenJukebox::SetSong()
{
RString s = a->sModifiers;
s.MakeLower();
// todo: allow themers to modify this list? -aj
if( s.find("dark") != string::npos ||
s.find("stealth") != string::npos )
{
@@ -144,7 +137,6 @@ void ScreenJukebox::SetSong()
continue; // skip
}
apOptions.push_back( pEntry );
apPossibleCourses.push_back( pCourse );
}
@@ -175,13 +167,12 @@ void ScreenJukebox::SetSong()
ScreenJukebox::ScreenJukebox()
{
m_bDemonstration = false;
m_pCourseEntry = NULL;
}
void ScreenJukebox::Init()
{
// ScreeJukeboxMenu must set this
// ScreenJukeboxMenu must set this
ASSERT( GAMESTATE->GetCurrentStyle() );
GAMESTATE->m_PlayMode.Set( PLAY_MODE_REGULAR );
@@ -196,7 +187,8 @@ void ScreenJukebox::Init()
if( Benchmark )
{
/* Note that you also need to make sure you benchmark with the
* same notes. I use a copy of MaxU with only heavy notes included. */
* same notes. I (who? -aj) use a copy of Maxx Unlimited with only heavy notes
* included.*/
FOREACH_EnabledPlayer( p )
{
/* Lots and lots of arrows. This might even bias to arrows a little
@@ -211,7 +203,7 @@ void ScreenJukebox::Init()
FOREACH_EnabledPlayer( p )
{
/* Reset score between songs. */
// Reset score between songs.
STATSMAN->m_CurStageStats.m_player[p].ResetScoreForLesson();
if( GAMESTATE->m_bJukeboxUsesModifiers )
@@ -232,7 +224,7 @@ void ScreenJukebox::Init()
GAMESTATE->m_bDemonstrationOrJukebox = true;
/* Now that we've set up, init the base class. */
// Now that we've set up, init the base class.
ScreenGameplay::Init();
if( GAMESTATE->m_pCurSong == NULL ) // we didn't find a song.
@@ -253,7 +245,7 @@ void ScreenJukebox::Input( const InputEventPlus &input )
//LOG->Trace( "ScreenJukebox::Input()" );
if( input.type != IET_FIRST_PRESS )
return; /* ignore */
return; // ignore
switch( input.MenuI )
{