spacing
This commit is contained in:
@@ -362,7 +362,7 @@ bool Course::GetTrailSorted( StepsType st, CourseDifficulty cd, Trail &trail ) c
|
||||
ASSERT( bOK );
|
||||
}
|
||||
ASSERT_M( trail.m_vEntries.size() == SortTrail.m_vEntries.size(),
|
||||
ssprintf("%i %i", int(trail.m_vEntries.size()), int(SortTrail.m_vEntries.size())) );
|
||||
ssprintf("%i %i", int(trail.m_vEntries.size()), int(SortTrail.m_vEntries.size())) );
|
||||
|
||||
vector<SortTrailEntry> entries;
|
||||
for( unsigned i = 0; i < trail.m_vEntries.size(); ++i )
|
||||
@@ -665,7 +665,7 @@ void Course::GetAllTrails( vector<Trail*> &AddTo ) const
|
||||
|
||||
int Course::GetMeter( StepsType st, CourseDifficulty cd ) const
|
||||
{
|
||||
if( m_iCustomMeter[cd] != -1 )
|
||||
if( m_iCustomMeter[cd] != -1 )
|
||||
return m_iCustomMeter[cd];
|
||||
const Trail* pTrail = GetTrail( st );
|
||||
if( pTrail != NULL )
|
||||
|
||||
@@ -45,7 +45,7 @@ bool DateTime::operator==( const DateTime& other ) const
|
||||
DateTime DateTime::GetNowDateTime()
|
||||
{
|
||||
time_t now = time(NULL);
|
||||
tm tNow;
|
||||
tm tNow;
|
||||
localtime_r( &now, &tNow );
|
||||
DateTime dtNow;
|
||||
#define COPY_M( v ) dtNow.v = tNow.v;
|
||||
@@ -61,7 +61,7 @@ DateTime DateTime::GetNowDateTime()
|
||||
|
||||
DateTime DateTime::GetNowDate()
|
||||
{
|
||||
DateTime tNow = GetNowDateTime();
|
||||
DateTime tNow = GetNowDateTime();
|
||||
tNow.StripTime();
|
||||
return tNow;
|
||||
}
|
||||
|
||||
@@ -87,7 +87,7 @@ static const RString EMPTY_STRING;
|
||||
{ \
|
||||
RString s2 = s; \
|
||||
s2.MakeLower(); \
|
||||
unsigned i; \
|
||||
unsigned i; \
|
||||
for( i = 0; i < ARRAYSIZE(X##Names); ++i ) \
|
||||
if( !s2.CompareNoCase(X##Names[i]) ) \
|
||||
return (X)i; \
|
||||
|
||||
@@ -309,8 +309,8 @@ bool Font::FontCompleteForString( const wstring &str ) const
|
||||
void Font::CapsOnly()
|
||||
{
|
||||
/* For each uppercase character that we have a mapping for, add
|
||||
* a lowercase one. */
|
||||
for(char c = 'A'; c <= 'Z'; ++c)
|
||||
* a lowercase one. */
|
||||
for( char c = 'A'; c <= 'Z'; ++c )
|
||||
{
|
||||
map<longchar,glyph*>::const_iterator it = m_iCharToGlyph.find(c);
|
||||
|
||||
|
||||
@@ -283,14 +283,10 @@ void LifeMeterBar::AfterLifeChanged()
|
||||
|
||||
bool LifeMeterBar::IsPastPassmark() const
|
||||
{
|
||||
if( m_pPlayerState->m_PlayerOptions.m_fPassmark > 0 )
|
||||
{
|
||||
if( m_pPlayerState->m_PlayerOptions.m_fPassmark > 0 )
|
||||
return m_fLifePercentage >= m_pPlayerState->m_PlayerOptions.m_fPassmark;
|
||||
}
|
||||
else
|
||||
{
|
||||
else
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
bool LifeMeterBar::IsHot() const
|
||||
@@ -367,7 +363,8 @@ void LifeMeterBar::UpdateNonstopLifebar(const int cleared,
|
||||
|
||||
if (m_fLifeDifficulty >= 0.4) return;
|
||||
|
||||
/* Approximate deductions for a miss
|
||||
/*
|
||||
* Approximate deductions for a miss
|
||||
* Life 1 : 5 %
|
||||
* Life 2 : 5.7 %
|
||||
* Life 3 : 6.6 %
|
||||
@@ -389,7 +386,7 @@ void LifeMeterBar::UpdateNonstopLifebar(const int cleared,
|
||||
* a miss, and a W5 would suck up half of your lifebar.
|
||||
*
|
||||
* Everything past 7 is intended mainly for nonstop mode.
|
||||
*/
|
||||
*/
|
||||
|
||||
|
||||
// the lifebar is pretty harsh at 0.4 already (you lose
|
||||
|
||||
@@ -19,12 +19,12 @@ void RageException::SetCleanupHandler( void (*pHandler)(const RString &sError) )
|
||||
* the same way to code in practice. */
|
||||
void RageException::Throw(const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString error = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString error = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
|
||||
RString msg = ssprintf(
|
||||
RString msg = ssprintf(
|
||||
"\n"
|
||||
"//////////////////////////////////////////////////////\n"
|
||||
"Exception: %s\n"
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
|
||||
RageFile::RageFile()
|
||||
{
|
||||
m_File = NULL;
|
||||
m_File = NULL;
|
||||
}
|
||||
|
||||
RageFile::RageFile( const RageFile &cpy ):
|
||||
@@ -73,7 +73,7 @@ bool RageFile::Open( const RString& path, int mode )
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
void RageFile::Close()
|
||||
|
||||
@@ -76,7 +76,7 @@ int RageFileObj::Seek( int offset, int whence )
|
||||
|
||||
int RageFileObj::Read( void *pBuffer, size_t iBytes )
|
||||
{
|
||||
int ret = 0;
|
||||
int ret = 0;
|
||||
|
||||
while( !m_bEOF && iBytes > 0 )
|
||||
{
|
||||
|
||||
+18
-18
@@ -169,8 +169,8 @@ void RageLog::SetShowLogOutput( bool show )
|
||||
{
|
||||
// create a new console window and attach standard handles
|
||||
AllocConsole();
|
||||
freopen("CONOUT$","wb",stdout);
|
||||
freopen("CONOUT$","wb",stderr);
|
||||
freopen( "CONOUT$","wb", stdout );
|
||||
freopen( "CONOUT$","wb", stderr );
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -181,32 +181,32 @@ void RageLog::SetShowLogOutput( bool show )
|
||||
|
||||
void RageLog::Trace( const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString sBuff = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
va_list va;
|
||||
va_start( va, fmt );
|
||||
RString sBuff = vssprintf( fmt, va );
|
||||
va_end( va);
|
||||
|
||||
Write(0, sBuff);
|
||||
Write(0, sBuff );
|
||||
}
|
||||
|
||||
/* Use this for more important information; it'll always be included
|
||||
* in crash dumps. */
|
||||
void RageLog::Info( const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString sBuff = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
va_list va;
|
||||
va_start( va, fmt );
|
||||
RString sBuff = vssprintf( fmt, va );
|
||||
va_end( va );
|
||||
|
||||
Write(WRITE_TO_INFO, sBuff);
|
||||
Write( WRITE_TO_INFO, sBuff );
|
||||
}
|
||||
|
||||
void RageLog::Warn( const char *fmt, ...)
|
||||
{
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString sBuff = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
RString sBuff = vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
|
||||
Write( WRITE_TO_INFO | WRITE_LOUD, sBuff );
|
||||
}
|
||||
@@ -362,9 +362,9 @@ void RageLog::MapLog(const RString &key, const char *fmt, ...)
|
||||
RString s;
|
||||
|
||||
va_list va;
|
||||
va_start(va, fmt);
|
||||
va_start(va, fmt);
|
||||
s += vssprintf( fmt, va );
|
||||
va_end(va);
|
||||
va_end(va);
|
||||
|
||||
LogMaps[key] = s;
|
||||
UpdateMappedLog();
|
||||
|
||||
@@ -672,8 +672,8 @@ public:
|
||||
// -------------------------------------------------------------------------
|
||||
// formatting (using wsprintf style formatting)
|
||||
|
||||
// If they want a Format() function that safely handles string objects
|
||||
// without casting
|
||||
// If they want a Format() function that safely handles string objects
|
||||
// without casting
|
||||
|
||||
|
||||
void Format(const CT* szFmt, ...)
|
||||
@@ -804,7 +804,7 @@ public:
|
||||
|
||||
MYTYPE Left(int nCount) const
|
||||
{
|
||||
// Range check the count.
|
||||
// Range check the count.
|
||||
|
||||
nCount = max(0, min(nCount, static_cast<int>(this->size())));
|
||||
return this->substr(0, static_cast<MYSIZE>(nCount));
|
||||
@@ -867,7 +867,7 @@ public:
|
||||
|
||||
MYTYPE Right(int nCount) const
|
||||
{
|
||||
// Range check the count.
|
||||
// Range check the count.
|
||||
|
||||
nCount = max(0, min(nCount, static_cast<int>(this->size())));
|
||||
return this->substr(this->size()-static_cast<MYSIZE>(nCount));
|
||||
|
||||
Reference in New Issue
Block a user