fix compile

This commit is contained in:
Chris Danford
2005-12-27 17:39:27 +00:00
parent f99b179a5b
commit fb259c7237
5 changed files with 13 additions and 14 deletions
-1
View File
@@ -179,7 +179,6 @@ CString HourInDayToString( int iHourInDayIndex )
return ssprintf("Hour%02d", iHourInDayIndex); return ssprintf("Hour%02d", iHourInDayIndex);
} }
enum Month {};
static const CString MonthNames[] = static const CString MonthNames[] =
{ {
"January", "January",
+3 -3
View File
@@ -8,7 +8,7 @@ const int NUM_LAST_WEEKS = 52;
const int DAYS_IN_YEAR = 366; // maximum (leap years) const int DAYS_IN_YEAR = 366; // maximum (leap years)
const int HOURS_IN_DAY = 24; const int HOURS_IN_DAY = 24;
const int DAYS_IN_WEEK = 7; const int DAYS_IN_WEEK = 7;
const int MONTHS_IN_YEAR = 12; enum Month { MONTHS_IN_YEAR = 12 };
CString DayInYearToString( int iDayInYearIndex ); CString DayInYearToString( int iDayInYearIndex );
CString LastDayToString( int iLastDayIndex ); CString LastDayToString( int iLastDayIndex );
@@ -17,8 +17,8 @@ CString DayOfWeekToString( int iDayOfWeekIndex );
CString DayOfWeekToThemedString( int iDayOfWeekIndex ); CString DayOfWeekToThemedString( int iDayOfWeekIndex );
CString HourInDayToString( int iHourIndex ); CString HourInDayToString( int iHourIndex );
CString HourInDayToThemedString( int iHourIndex ); CString HourInDayToThemedString( int iHourIndex );
CString MonthToString( int iMonthIndex ); const CString &MonthToString( Month month );
CString MonthToThemedString( int iMonthIndex ); const CString &MonthToThemedString( Month month );
CString LastWeekToString( int iLastWeekIndex ); CString LastWeekToString( int iLastWeekIndex );
CString LastWeekToThemedString( int iLastWeekIndex ); CString LastWeekToThemedString( int iLastWeekIndex );
+2 -2
View File
@@ -3,8 +3,8 @@
#include "LuaFunctions.h" #include "LuaFunctions.h"
#include "RageUtil.h" #include "RageUtil.h"
LuaFunction( MonthToString, MonthToString( IArg(1) ) ); LuaFunction( MonthToString, MonthToString( (Month)IArg(1) ) );
LuaFunction( MonthToThemedString, MonthToThemedString( IArg(1) ) ); LuaFunction( MonthToThemedString, MonthToThemedString( (Month)IArg(1) ) );
LuaFunction( MonthOfYear, GetLocalTime().tm_mon ); LuaFunction( MonthOfYear, GetLocalTime().tm_mon );
LuaFunction( DayOfMonth, GetLocalTime().tm_mday ); LuaFunction( DayOfMonth, GetLocalTime().tm_mday );
LuaFunction( Hour, GetLocalTime().tm_hour ); LuaFunction( Hour, GetLocalTime().tm_hour );
+2 -2
View File
@@ -139,7 +139,7 @@ void ScreenBookkeeping::ChangeView( View newView )
iTotalLast += coins[i]; iTotalLast += coins[i];
} }
sTitle += ALL_TIME.GetString()+"\n"; sTitle += ALL_TIME.GetValue()+"\n";
sData += ssprintf("%i\n", iTotalLast); sData += ssprintf("%i\n", iTotalLast);
m_textData[0].SetText( "" ); m_textData[0].SetText( "" );
@@ -152,7 +152,7 @@ void ScreenBookkeeping::ChangeView( View newView )
break; break;
case VIEW_LAST_WEEKS: case VIEW_LAST_WEEKS:
{ {
m_textTitle.SetText( ssprintf(LAST_WEEKS, NUM_LAST_WEEKS) ); m_textTitle.SetText( ssprintf(LAST_WEEKS.GetValue(), NUM_LAST_WEEKS) );
int coins[NUM_LAST_WEEKS]; int coins[NUM_LAST_WEEKS];
BOOKKEEPER->GetCoinsLastWeeks( coins ); BOOKKEEPER->GetCoinsLastWeeks( coins );
+1 -1
View File
@@ -103,7 +103,7 @@ void ScreenSetTime::Update( float fDelta )
m_textValue[minute] .SetText( ssprintf("%02d",now.tm_min) ); m_textValue[minute] .SetText( ssprintf("%02d",now.tm_min) );
m_textValue[second] .SetText( ssprintf("%02d",now.tm_sec) ); m_textValue[second] .SetText( ssprintf("%02d",now.tm_sec) );
m_textValue[year] .SetText( ssprintf("%02d",now.tm_year+1900) ); m_textValue[year] .SetText( ssprintf("%02d",now.tm_year+1900) );
m_textValue[month].SetText( MonthToString(now.tm_mon) ); m_textValue[month] .SetText( MonthToString((Month)now.tm_mon) );
m_textValue[day] .SetText( ssprintf("%02d",now.tm_mday) ); m_textValue[day] .SetText( ssprintf("%02d",now.tm_mday) );
} }