break up arch stuff into smaller .cpp files to fix smpackage build and not pull in unnecessary stuff
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include "RageUtil_AutoPtr.h"
|
||||
#include "ActorCommands.h"
|
||||
#include <map>
|
||||
struct XNode;
|
||||
class XNode;
|
||||
struct lua_State;
|
||||
class LuaReference;
|
||||
class LuaClass;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "ActorFrame.h"
|
||||
#include "Quad.h"
|
||||
struct XNode;
|
||||
class XNode;
|
||||
#include "LuaExpressionTransform.h"
|
||||
|
||||
class ActorScroller : public ActorFrame
|
||||
|
||||
@@ -9,6 +9,7 @@
|
||||
#include "RageUtil.h"
|
||||
#include "EnumHelper.h"
|
||||
#include "XmlFile.h"
|
||||
#include "XmlFileUtil.h"
|
||||
#include "LuaManager.h"
|
||||
#include "Foreach.h"
|
||||
|
||||
@@ -368,7 +369,7 @@ Actor* ActorUtil::MakeActor( const CString &sPath_, const XNode *pParent )
|
||||
case FT_Xml:
|
||||
{
|
||||
XNode xml;
|
||||
if( !xml.LoadFromFile(sPath) )
|
||||
if( !XmlFileUtil::LoadFromFileShowErrors(xml, sPath) )
|
||||
{
|
||||
// XNode will warn about the error
|
||||
return new Actor;
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
#include "Actor.h"
|
||||
#include "RageTexture.h"
|
||||
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
typedef Actor* (*CreateActorFn)(const CString& sDir, const XNode* pNode);
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define AutoActor_H
|
||||
|
||||
class Actor;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
// creates the appropriate Actor derivitive on load and
|
||||
// automatically deletes Actor on deconstruction.
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "ActorFrame.h"
|
||||
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
class BGAnimation : public ActorFrameAutoDeleteChildren
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
#include "ActorFrame.h"
|
||||
#include <map>
|
||||
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
class BGAnimationLayer : public ActorFrame
|
||||
{
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
#include <set>
|
||||
#include <float.h>
|
||||
#include "XmlFile.h"
|
||||
#include "XmlFileUtil.h"
|
||||
#include "BackgroundUtil.h"
|
||||
#include "song.h"
|
||||
#include "AutoActor.h"
|
||||
@@ -181,7 +182,7 @@ void BackgroundImpl::Init()
|
||||
const CString &sName = vsNames[i];
|
||||
|
||||
XNode xml;
|
||||
xml.LoadFromFile( sPath );
|
||||
XmlFileUtil::LoadFromFileShowErrors(xml, sPath);
|
||||
ASSERT( xml.m_sName == "BackgroundTransition" );
|
||||
BackgroundTransition &bgt = m_mapNameToTransition[sName];
|
||||
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define BackgroundUtil_H
|
||||
|
||||
class Song;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
extern const CString RANDOM_BACKGROUND_FILE;
|
||||
extern const CString NO_SONG_BG_FILE;
|
||||
|
||||
@@ -8,6 +8,7 @@
|
||||
#include "SongManager.h"
|
||||
#include "RageFile.h"
|
||||
#include "XmlFile.h"
|
||||
#include "XmlFileUtil.h"
|
||||
#include <ctime>
|
||||
|
||||
|
||||
@@ -122,7 +123,7 @@ void Bookkeeper::ReadFromDisk()
|
||||
return;
|
||||
|
||||
XNode xml;
|
||||
if( !xml.LoadFromFile(COINS_DAT) )
|
||||
if( !XmlFileUtil::LoadFromFileShowErrors(xml, COINS_DAT) )
|
||||
return;
|
||||
|
||||
LoadFromNode( &xml );
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
#include "DateTime.h"
|
||||
#include <map>
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
class Bookkeeper
|
||||
{
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
class Course;
|
||||
class Profile;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
class CourseEntry;
|
||||
|
||||
namespace CourseUtil
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#include "global.h"
|
||||
#include "DateTime.h"
|
||||
#include "RageUtil.h"
|
||||
#include "LuaFunctions.h"
|
||||
|
||||
|
||||
DateTime::DateTime()
|
||||
@@ -200,7 +199,6 @@ CString MonthToString( int iMonthIndex )
|
||||
return CString();
|
||||
return MONTH_TO_NAME[iMonthIndex];
|
||||
}
|
||||
LuaFunction( MonthToString, MonthToString( IArg(1) ) );
|
||||
|
||||
CString LastWeekToString( int iLastWeekIndex )
|
||||
{
|
||||
@@ -308,15 +306,6 @@ tm GetDayInYearAndYear( int iDayInYearIndex, int iYear )
|
||||
return when;
|
||||
}
|
||||
|
||||
LuaFunction( MonthOfYear, GetLocalTime().tm_mon );
|
||||
LuaFunction( DayOfMonth, GetLocalTime().tm_mday );
|
||||
LuaFunction( Hour, GetLocalTime().tm_hour );
|
||||
LuaFunction( Minute, GetLocalTime().tm_min );
|
||||
LuaFunction( Second, GetLocalTime().tm_sec );
|
||||
LuaFunction( Year, GetLocalTime().tm_year+1900 );
|
||||
LuaFunction( Weekday, GetLocalTime().tm_wday );
|
||||
LuaFunction( DayOfYear, GetLocalTime().tm_yday );
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -0,0 +1,39 @@
|
||||
#include "global.h"
|
||||
#include "DateTime.h"
|
||||
#include "LuaFunctions.h"
|
||||
#include "RageUtil.h"
|
||||
|
||||
LuaFunction( MonthToString, MonthToString( IArg(1) ) );
|
||||
LuaFunction( MonthOfYear, GetLocalTime().tm_mon );
|
||||
LuaFunction( DayOfMonth, GetLocalTime().tm_mday );
|
||||
LuaFunction( Hour, GetLocalTime().tm_hour );
|
||||
LuaFunction( Minute, GetLocalTime().tm_min );
|
||||
LuaFunction( Second, GetLocalTime().tm_sec );
|
||||
LuaFunction( Year, GetLocalTime().tm_year+1900 );
|
||||
LuaFunction( Weekday, GetLocalTime().tm_wday );
|
||||
LuaFunction( DayOfYear, GetLocalTime().tm_yday );
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -9,7 +9,7 @@
|
||||
#include "DateTime.h"
|
||||
#include "RageUtil_AutoPtr.h"
|
||||
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
struct HighScoreImpl;
|
||||
struct HighScore
|
||||
|
||||
@@ -128,7 +128,8 @@ Trail.cpp Trail.h TrailUtil.cpp TrailUtil.h TitleSubstitution.cpp TitleSubstitut
|
||||
|
||||
FileTypes = IniFile.cpp IniFile.h \
|
||||
MsdFile.cpp MsdFile.h \
|
||||
XmlFile.cpp XmlFile.h
|
||||
XmlFile.cpp XmlFile.h \
|
||||
XmlFileUtil.cpp XmlFileUtil.h
|
||||
|
||||
StepMania = StdString.h \
|
||||
StepMania.cpp StepMania.h \
|
||||
@@ -163,7 +164,8 @@ Sound += arch/Sound/ALSA9Dynamic.cpp arch/Sound/ALSA9Dynamic.h arch/Sound/ALSA9F
|
||||
AM_CXXFLAGS += $(ALSA_CFLAGS)
|
||||
endif
|
||||
|
||||
ArchHooks = arch/ArchHooks/ArchHooks.cpp arch/ArchHooks/ArchHooks.h
|
||||
ArchHooks = arch/ArchHooks/ArchHooks.cpp arch/ArchHooks/ArchHooks.h \
|
||||
arch/ArchHooks/ArchHooksUtil.cpp
|
||||
|
||||
InputHandler = arch/InputHandler/InputHandler.cpp arch/InputHandler/InputHandler.h \
|
||||
arch/InputHandler/InputHandler_MonkeyKeyboard.cpp arch/InputHandler/InputHandler_MonkeyKeyboard.h
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
#define NOTE_TYPES_H
|
||||
|
||||
#include "GameConstantsAndTypes.h"
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
struct TapNoteResult
|
||||
{
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
#include "AutoActor.h"
|
||||
#include "GameConstantsAndTypes.h"
|
||||
#include "ThemeMetric.h"
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
enum PaneTypes
|
||||
{
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "Preference.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
|
||||
const CString DEFAULTS_INI_PATH = "Data/Defaults.ini"; // these can be overridden
|
||||
//PREFERENCES_INI_PATH // overlay on Defaults.ini, contains the user's choices
|
||||
#include "SpecialFiles.h"
|
||||
@@ -615,6 +616,29 @@ CString PrefsManager::GetLightsDriver()
|
||||
return m_sLightsDriver;
|
||||
}
|
||||
|
||||
bool PrefsManager::MessageIsIgnored( const CString &ID )
|
||||
{
|
||||
vector<CString> list;
|
||||
split( PREFSMAN->m_sIgnoredMessageWindows, ",", list );
|
||||
for( unsigned i = 0; i < list.size(); ++i )
|
||||
if( !ID.CompareNoCase(list[i]) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
void PrefsManager::IgnoreMessage( const CString &ID )
|
||||
{
|
||||
if( ID == "" )
|
||||
|
||||
if( MessageIsIgnored(ID) )
|
||||
return;
|
||||
|
||||
vector<CString> list;
|
||||
split( PREFSMAN->m_sIgnoredMessageWindows, ",", list );
|
||||
list.push_back( ID );
|
||||
PREFSMAN->m_sIgnoredMessageWindows.Set( join(",",list) );
|
||||
PREFSMAN->SavePrefsToDisk();
|
||||
}
|
||||
|
||||
// lua start
|
||||
#include "LuaBinding.h"
|
||||
|
||||
@@ -292,6 +292,9 @@ public:
|
||||
|
||||
CString GetPreferencesSection() const;
|
||||
|
||||
bool MessageIsIgnored( const CString &ID );
|
||||
void IgnoreMessage( const CString &ID );
|
||||
|
||||
//
|
||||
// For self-registering prefs
|
||||
//
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "crypto/CryptRand.h"
|
||||
#include "UnlockManager.h"
|
||||
#include "XmlFile.h"
|
||||
#include "XmlFileUtil.h"
|
||||
#include "Foreach.h"
|
||||
#include "CatalogXml.h"
|
||||
#include "Bookkeeper.h"
|
||||
@@ -861,7 +862,7 @@ ProfileLoadResult Profile::LoadAllFromDir( CString sDir, bool bRequireSignature
|
||||
|
||||
LOG->Trace( "Loading %s", fn.c_str() );
|
||||
XNode xml;
|
||||
if( !xml.LoadFromFile(fn) )
|
||||
if( !XmlFileUtil::LoadFromFileShowErrors(xml, fn) )
|
||||
return ProfileLoadResult_FailedTampered;
|
||||
LOG->Trace( "Done." );
|
||||
|
||||
|
||||
@@ -17,7 +17,7 @@
|
||||
#include "StyleUtil.h" // for StyleID
|
||||
#include "LuaReference.h" // for LuaData
|
||||
|
||||
struct XNode;
|
||||
class XNode;
|
||||
struct lua_State;
|
||||
class Character;
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#define RADAR_VAL_UNKNOWN -1
|
||||
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
struct RadarValues
|
||||
{
|
||||
|
||||
@@ -31,7 +31,8 @@
|
||||
#endif
|
||||
|
||||
/* Assume TLS doesn't work until told otherwise. It's ArchHooks's job to set this. */
|
||||
bool RageThread::m_bSystemSupportsTLS = false;
|
||||
bool RageThread::s_bSystemSupportsTLS = false;
|
||||
bool RageThread::s_bIsShowingDialog = false;
|
||||
|
||||
#define MAX_THREADS 128
|
||||
//static vector<RageMutex*> *g_MutexList = NULL; /* watch out for static initialization order problems */
|
||||
@@ -743,7 +744,7 @@ retry:
|
||||
if( m_pSema->Wait() )
|
||||
return;
|
||||
|
||||
if( !bFailOnTimeout || Dialog::IsShowingDialog() )
|
||||
if( !bFailOnTimeout || RageThread::GetIsShowingDialog() )
|
||||
goto retry;
|
||||
|
||||
/* We waited too long. We're probably deadlocked, though unlike mutexes, we can't
|
||||
|
||||
@@ -10,7 +10,8 @@ class RageThread
|
||||
ThreadSlot *m_pSlot;
|
||||
CString name;
|
||||
|
||||
static bool m_bSystemSupportsTLS;
|
||||
static bool s_bSystemSupportsTLS;
|
||||
static bool s_bIsShowingDialog;
|
||||
|
||||
public:
|
||||
RageThread();
|
||||
@@ -39,9 +40,11 @@ public:
|
||||
/* A system can define HAVE_TLS, indicating that it can compile thread_local
|
||||
* code, but an individual environment may not actually have functional TLS.
|
||||
* If this returns false, thread_local variables are considered undefined. */
|
||||
static bool GetSupportsTLS() { return m_bSystemSupportsTLS; }
|
||||
static bool GetSupportsTLS() { return s_bSystemSupportsTLS; }
|
||||
static void SetSupportsTLS( bool b ) { s_bSystemSupportsTLS = b; }
|
||||
|
||||
static void SetSupportsTLS( bool b ) { m_bSystemSupportsTLS = b; }
|
||||
static bool GetIsShowingDialog() { return s_bIsShowingDialog; }
|
||||
static void SetIsShowingDialog( bool b ) { s_bIsShowingDialog = b; }
|
||||
};
|
||||
|
||||
namespace Checkpoints
|
||||
|
||||
@@ -8,7 +8,7 @@
|
||||
|
||||
class Song;
|
||||
class Profile;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
namespace SongUtil
|
||||
{
|
||||
|
||||
@@ -818,6 +818,9 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<File
|
||||
RelativePath="DateTime.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DateTimeLua.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="Difficulty.cpp">
|
||||
</File>
|
||||
@@ -1185,6 +1188,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<File
|
||||
RelativePath="XmlFile.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XmlFileUtil.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\XmlFileUtil.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="StepMania"
|
||||
@@ -1305,6 +1314,12 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<File
|
||||
RelativePath="arch\ArchHooks\ArchHooks_Win32.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\ArchHooks\ArchHooks_Win32Static.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\ArchHooks\ArchHooksUtil.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="InputHandler"
|
||||
@@ -1536,6 +1551,9 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
<File
|
||||
RelativePath="archutils\Win32\arch_setup.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\arch_time.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="archutils\Win32\Crash.cpp">
|
||||
</File>
|
||||
@@ -1543,10 +1561,10 @@ cl /Zl /nologo /c verstub.cpp /Fo"$(IntDir)"\
|
||||
RelativePath="archutils\Win32\Crash.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="archutils\Win32\DebugInfoHunt.cpp">
|
||||
RelativePath=".\archutils\Win32\DebugInfoHunt.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="archutils\Win32\DebugInfoHunt.h">
|
||||
RelativePath=".\archutils\Win32\DebugInfoHunt.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="archutils\Win32\GetFileInformation.cpp">
|
||||
|
||||
@@ -261,7 +261,7 @@ void ShutdownGame()
|
||||
|
||||
/* Cleanly shut down, show a dialog and exit the game. We don't go back
|
||||
* up the call stack, to avoid having to use exceptions. */
|
||||
void StepMania::HandleException( CString error )
|
||||
void NORETURN StepMania::HandleException( RString error )
|
||||
{
|
||||
if( g_bAutoRestart )
|
||||
HOOKS->RestartProgram();
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
# Microsoft Developer Studio Project File - Name="StepMania" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 60000
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 6.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Application" 0x0101
|
||||
@@ -62,7 +62,7 @@ IntDir=.\../Debug6
|
||||
TargetDir=\cvs\stepmania\Program
|
||||
TargetName=StepMania-debug
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=archutils\Win32\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -99,7 +99,7 @@ IntDir=.\../Release6
|
||||
TargetDir=\cvs\stepmania\Program
|
||||
TargetName=StepMania
|
||||
SOURCE="$(InputPath)"
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PreLink_Cmds=archutils\Win32\verinc cl /Zl /nologo /c verstub.cpp /Fo$(IntDir)\
|
||||
PostBuild_Cmds=archutils\Win32\mapconv $(IntDir)\$(TargetName).map $(TargetDir)\StepMania.vdi
|
||||
# End Special Build Tool
|
||||
|
||||
@@ -1266,6 +1266,14 @@ SOURCE=.\XmlFile.cpp
|
||||
|
||||
SOURCE=.\XmlFile.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlFileUtil.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\XmlFileUtil.h
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "StepMania"
|
||||
|
||||
@@ -1372,6 +1380,14 @@ SOURCE=.\arch\ArchHooks\ArchHooks_Win32.cpp
|
||||
|
||||
SOURCE=.\arch\ArchHooks\ArchHooks_Win32.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arch\ArchHooks\ArchHooks_Win32Static.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\arch\ArchHooks\ArchHooksUtil.cpp
|
||||
# End Source File
|
||||
# End Group
|
||||
# Begin Group "InputHandler"
|
||||
|
||||
@@ -1647,6 +1663,10 @@ SOURCE=.\archutils\Win32\arch_setup.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\arch_time.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\archutils\Win32\Crash.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
@@ -1770,6 +1790,14 @@ SOURCE=.\ScreenDimensions.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SpecialFiles.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\SpecialFiles.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\StdString.h
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
class Steps;
|
||||
class Song;
|
||||
class Profile;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
namespace StepsUtil
|
||||
{
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
class Style;
|
||||
class Song;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
class StyleID
|
||||
{
|
||||
|
||||
@@ -7,6 +7,7 @@
|
||||
#include "RageFile.h"
|
||||
#include "Foreach.h"
|
||||
#include "XmlFile.h"
|
||||
#include "XmlFileUtil.h"
|
||||
|
||||
static const CString TRANSLATIONS_PATH = "Data/Translations.xml";
|
||||
static const CString ERASE_MARKER = "-erase-";
|
||||
@@ -137,7 +138,7 @@ TitleSubst::TitleSubst(const CString §ion)
|
||||
void TitleSubst::Load(const CString &filename, const CString §ion)
|
||||
{
|
||||
XNode xml;
|
||||
if( !xml.LoadFromFile(filename) )
|
||||
if( !XmlFileUtil::LoadFromFileShowErrors(xml,filename) )
|
||||
{
|
||||
// LoadFromFile will show its own error
|
||||
//LOG->Trace("Error opening %s: %s", filename.c_str(), f.GetError().c_str() );
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
class Song;
|
||||
class Trail;
|
||||
class Course;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
|
||||
class TrailID
|
||||
{
|
||||
|
||||
@@ -12,7 +12,6 @@
|
||||
#include "RageUtil.h"
|
||||
#include "DateTime.h"
|
||||
#include "Foreach.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
#include "RageFileDriverMemory.h"
|
||||
|
||||
static inline long XStr2Int( const char* str, long default_value = 0 )
|
||||
@@ -654,50 +653,6 @@ void XNode::AppendAttr( const CString &sName, float value ){ AppendAttr(sName,ss
|
||||
void XNode::AppendAttr( const CString &sName, int value ) { AppendAttr(sName,ssprintf("%d",value)); }
|
||||
void XNode::AppendAttr( const CString &sName, unsigned value ) { AppendAttr(sName,ssprintf("%u",value)); }
|
||||
|
||||
bool XNode::LoadFromFile( const CString &sFile )
|
||||
{
|
||||
RageFile f;
|
||||
if( !f.Open(sFile, RageFile::READ) )
|
||||
{
|
||||
LOG->Warn("Couldn't open %s for reading: %s", sFile.c_str(), f.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bSuccess = LoadFromFile( f );
|
||||
if( !bSuccess )
|
||||
{
|
||||
CString sWarning = ssprintf( "XML: LoadFromFile failed for file: %s", sFile.c_str() );
|
||||
LOG->Warn( sWarning );
|
||||
Dialog::OK( sWarning, "XML_PARSE_ERROR" );
|
||||
}
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
bool XNode::LoadFromFile( RageFileBasic &f )
|
||||
{
|
||||
PARSEINFO pi;
|
||||
CString s;
|
||||
if( f.Read( s ) == -1 )
|
||||
{
|
||||
pi.error_occur = true;
|
||||
pi.error_pointer = NULL;
|
||||
pi.error_code = PIE_READ_ERROR;
|
||||
pi.error_string = f.GetError();
|
||||
|
||||
goto error;
|
||||
}
|
||||
this->Load( s, &pi );
|
||||
if( pi.error_occur )
|
||||
goto error;
|
||||
return true;
|
||||
|
||||
error:
|
||||
CString sWarning = ssprintf( "XML: LoadFromFile failed: %s", pi.error_string.c_str() );
|
||||
LOG->Warn( sWarning );
|
||||
Dialog::OK( sWarning, "XML_PARSE_ERROR" );
|
||||
return false;
|
||||
}
|
||||
|
||||
bool XNode::SaveToFile( RageFileBasic &f, DISP_OPT &opt ) const
|
||||
{
|
||||
f.PutLine( "<?xml version=\"1.0\" encoding=\"UTF-8\" ?>" );
|
||||
|
||||
@@ -8,7 +8,7 @@ struct DateTime;
|
||||
class RageFileBasic;
|
||||
|
||||
typedef map<CString,CString> XAttrs;
|
||||
struct XNode;
|
||||
class XNode;
|
||||
typedef multimap<CString,XNode*> XNodes;
|
||||
|
||||
#define FOREACH_Attr( pNode, Var ) \
|
||||
@@ -80,8 +80,9 @@ struct DISP_OPT
|
||||
};
|
||||
|
||||
// XMLNode structure
|
||||
struct XNode
|
||||
class XNode
|
||||
{
|
||||
public:
|
||||
CString m_sName; // a duplicate of the m_sName in the parent's map
|
||||
CString m_sValue;
|
||||
XNodes m_childs; // child node
|
||||
@@ -106,8 +107,6 @@ struct XNode
|
||||
bool GetAttrXML( RageFileBasic &f, DISP_OPT &opt, const CString &sName, const CString &sValue ) const;
|
||||
CString GetXML() const;
|
||||
|
||||
bool LoadFromFile( const CString &sFile );
|
||||
bool LoadFromFile( RageFileBasic &f );
|
||||
bool SaveToFile( const CString &sFile, DISP_OPT &opt ) const;
|
||||
bool SaveToFile( RageFileBasic &f, DISP_OPT &opt ) const;
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
#include "global.h"
|
||||
#include "XmlFileUtil.h"
|
||||
#include "XmlFile.h"
|
||||
#include "RageFile.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "arch/Dialog/Dialog.h"
|
||||
|
||||
bool XmlFileUtil::LoadFromFileShowErrors( XNode &xml, RageFileBasic &f )
|
||||
{
|
||||
PARSEINFO pi;
|
||||
RString s;
|
||||
if( f.Read( s ) == -1 )
|
||||
{
|
||||
pi.error_occur = true;
|
||||
pi.error_pointer = NULL;
|
||||
pi.error_code = PIE_READ_ERROR;
|
||||
pi.error_string = f.GetError();
|
||||
|
||||
goto error;
|
||||
}
|
||||
|
||||
xml.Load( s, &pi );
|
||||
if( pi.error_occur )
|
||||
goto error;
|
||||
return true;
|
||||
|
||||
error:
|
||||
RString sWarning = ssprintf( "XML: LoadFromFile failed: %s", pi.error_string.c_str() );
|
||||
LOG->Warn( sWarning );
|
||||
Dialog::OK( sWarning, "XML_PARSE_ERROR" );
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
bool XmlFileUtil::LoadFromFileShowErrors( XNode &xml, const RString &sFile )
|
||||
{
|
||||
RageFile f;
|
||||
if( !f.Open(sFile, RageFile::READ) )
|
||||
{
|
||||
LOG->Warn("Couldn't open %s for reading: %s", sFile.c_str(), f.GetError().c_str() );
|
||||
return false;
|
||||
}
|
||||
|
||||
bool bSuccess = LoadFromFileShowErrors( xml, f );
|
||||
if( !bSuccess )
|
||||
{
|
||||
RString sWarning = ssprintf( "XML: LoadFromFile failed for file: %s", sFile.c_str() );
|
||||
LOG->Warn( sWarning );
|
||||
Dialog::OK( sWarning, "XML_PARSE_ERROR" );
|
||||
}
|
||||
return bSuccess;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -0,0 +1,40 @@
|
||||
/* XmlFileUtil - A little graphic to the left of the song's text banner in the MusicWheel. */
|
||||
|
||||
#ifndef XmlFileUtil_H
|
||||
#define XmlFileUtil_H
|
||||
|
||||
class RageFileBasic;
|
||||
class XNode;
|
||||
|
||||
namespace XmlFileUtil
|
||||
{
|
||||
bool LoadFromFileShowErrors( XNode &xml, const RString &sFile );
|
||||
bool LoadFromFileShowErrors( XNode &xml, RageFileBasic &f );
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/*
|
||||
* (c) 2001-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -9,63 +9,6 @@ ArchHooks *MakeArchHooks()
|
||||
return new ARCH_HOOKS;
|
||||
}
|
||||
|
||||
/*
|
||||
* This is a helper for GetMicrosecondsSinceStart on systems with a system
|
||||
* timer that may loop or move backwards.
|
||||
*
|
||||
* The time may decrease last for at least two reasons:
|
||||
*
|
||||
* 1. The underlying timer may be 32-bit and use millisecs internally, in which case
|
||||
* the timer will loop every 2^32 ms.
|
||||
*
|
||||
* 2. The underlying clock may have moved backwards (eg. system clock and ntpd).
|
||||
*
|
||||
* If the system clock moves backwards, we can't just clamp the time; if it moved back
|
||||
* an hour, we'd sit around for an hour until it catches up.
|
||||
*
|
||||
* Keep track of an offset: the amount of time to add to the result. If we move back
|
||||
* by 100ms, the offset will be increased by 100ms. If we loop, the offset will be
|
||||
* increased by the duration 2^32 ms.
|
||||
*
|
||||
* This helper only needs to be used if one or both of the above conditions can occur.
|
||||
* If the underlying timer is reliable, this doesn't need to be used (for a small
|
||||
* efficiency bonus). Also, you may omit this for GetMicrosecondsSinceStart() when
|
||||
* bAccurate == false.
|
||||
*/
|
||||
|
||||
int64_t ArchHooks::FixupTimeIfLooped( int64_t usecs )
|
||||
{
|
||||
static int64_t last = 0;
|
||||
static int64_t offset_us = 0;
|
||||
|
||||
/* The time has wrapped if the last time was very high and the current time is very low. */
|
||||
const int64_t i32BitMaxMs = uint64_t(1) << 32;
|
||||
const int64_t i32BitMaxUs = i32BitMaxMs*1000;
|
||||
const int64_t one_day = uint64_t(24*60*60)*1000000;
|
||||
if( last > (i32BitMaxUs-one_day) && usecs < one_day )
|
||||
offset_us += i32BitMaxUs;
|
||||
|
||||
last = usecs;
|
||||
|
||||
return usecs + offset_us;
|
||||
}
|
||||
|
||||
int64_t ArchHooks::FixupTimeIfBackwards( int64_t usecs )
|
||||
{
|
||||
static int64_t last = 0;
|
||||
static int64_t offset_us = 0;
|
||||
|
||||
if( usecs < last )
|
||||
{
|
||||
/* The time has moved backwards. Increase the offset by the amount we moved. */
|
||||
offset_us += last - usecs;
|
||||
}
|
||||
|
||||
last = usecs;
|
||||
|
||||
return usecs + offset_us;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard, Chris Danford
|
||||
* All rights reserved.
|
||||
|
||||
@@ -44,6 +44,11 @@ public:
|
||||
*/
|
||||
virtual void SetupConcurrentRenderingThread() { }
|
||||
|
||||
/*
|
||||
* Returns true if the user wants to quit (eg. ^C, or clicked a "close window" button).
|
||||
*/
|
||||
virtual bool UserQuit() { return false; }
|
||||
|
||||
/*
|
||||
* Return the amount of time since the program started. (This may actually be
|
||||
* since the initialization of HOOKS.
|
||||
@@ -73,12 +78,7 @@ public:
|
||||
/*
|
||||
* Add file search paths, higher priority first.
|
||||
*/
|
||||
virtual void MountInitialFilesystems( const CString &sDirOfExecutable ) = 0;
|
||||
|
||||
/*
|
||||
* Returns true if the user wants to quit (eg. ^C, or clicked a "close window" button).
|
||||
*/
|
||||
virtual bool UserQuit() { return false; }
|
||||
static void MountInitialFilesystems( const CString &sDirOfExecutable );
|
||||
|
||||
private:
|
||||
/* This are helpers for GetMicrosecondsSinceStart on systems with a timer
|
||||
|
||||
@@ -0,0 +1,84 @@
|
||||
#include "global.h"
|
||||
#include "ArchHooks.h"
|
||||
|
||||
/*
|
||||
* This is a helper for GetMicrosecondsSinceStart on systems with a system
|
||||
* timer that may loop or move backwards.
|
||||
*
|
||||
* The time may decrease last for at least two reasons:
|
||||
*
|
||||
* 1. The underlying timer may be 32-bit and use millisecs internally, in which case
|
||||
* the timer will loop every 2^32 ms.
|
||||
*
|
||||
* 2. The underlying clock may have moved backwards (eg. system clock and ntpd).
|
||||
*
|
||||
* If the system clock moves backwards, we can't just clamp the time; if it moved back
|
||||
* an hour, we'd sit around for an hour until it catches up.
|
||||
*
|
||||
* Keep track of an offset: the amount of time to add to the result. If we move back
|
||||
* by 100ms, the offset will be increased by 100ms. If we loop, the offset will be
|
||||
* increased by the duration 2^32 ms.
|
||||
*
|
||||
* This helper only needs to be used if one or both of the above conditions can occur.
|
||||
* If the underlying timer is reliable, this doesn't need to be used (for a small
|
||||
* efficiency bonus). Also, you may omit this for GetMicrosecondsSinceStart() when
|
||||
* bAccurate == false.
|
||||
*/
|
||||
|
||||
int64_t ArchHooks::FixupTimeIfLooped( int64_t usecs )
|
||||
{
|
||||
static int64_t last = 0;
|
||||
static int64_t offset_us = 0;
|
||||
|
||||
/* The time has wrapped if the last time was very high and the current time is very low. */
|
||||
const int64_t i32BitMaxMs = uint64_t(1) << 32;
|
||||
const int64_t i32BitMaxUs = i32BitMaxMs*1000;
|
||||
const int64_t one_day = uint64_t(24*60*60)*1000000;
|
||||
if( last > (i32BitMaxUs-one_day) && usecs < one_day )
|
||||
offset_us += i32BitMaxUs;
|
||||
|
||||
last = usecs;
|
||||
|
||||
return usecs + offset_us;
|
||||
}
|
||||
|
||||
int64_t ArchHooks::FixupTimeIfBackwards( int64_t usecs )
|
||||
{
|
||||
static int64_t last = 0;
|
||||
static int64_t offset_us = 0;
|
||||
|
||||
if( usecs < last )
|
||||
{
|
||||
/* The time has moved backwards. Increase the offset by the amount we moved. */
|
||||
offset_us += last - usecs;
|
||||
}
|
||||
|
||||
last = usecs;
|
||||
|
||||
return usecs + offset_us;
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Glenn Maynard, Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -3,9 +3,8 @@
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
#include "RageThreads.h"
|
||||
#include "PrefsManager.h"
|
||||
#include "ProductInfo.h"
|
||||
|
||||
#include "PrefsManager.h"
|
||||
#include "archutils/win32/AppInstance.h"
|
||||
#include "archutils/win32/crash.h"
|
||||
#include "archutils/win32/DebugInfoHunt.h"
|
||||
@@ -14,11 +13,6 @@
|
||||
#include "archutils/win32/VideoDriverInfo.h"
|
||||
#include "archutils/win32/WindowsResources.h"
|
||||
|
||||
#include <mmsystem.h>
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "winmm.lib") // for timeGetTime
|
||||
#endif
|
||||
|
||||
static HANDLE g_hInstanceMutex;
|
||||
static bool g_bIsMultipleInstance = false;
|
||||
bool g_bQuitting = false;
|
||||
@@ -150,30 +144,6 @@ static BOOL CALLBACK DriverWndProc( HWND hWnd, UINT msg, WPARAM wParam, LPARAM l
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static bool MessageIsIgnored( CString ID )
|
||||
{
|
||||
vector<CString> list;
|
||||
split( PREFSMAN->m_sIgnoredMessageWindows, ",", list );
|
||||
for( unsigned i = 0; i < list.size(); ++i )
|
||||
if( !ID.CompareNoCase(list[i]) )
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
static void IgnoreMessage( CString ID )
|
||||
{
|
||||
if( ID == "" )
|
||||
|
||||
if( MessageIsIgnored(ID) )
|
||||
return;
|
||||
|
||||
vector<CString> list;
|
||||
split( PREFSMAN->m_sIgnoredMessageWindows, ",", list );
|
||||
list.push_back( ID );
|
||||
PREFSMAN->m_sIgnoredMessageWindows.Set( join(",",list) );
|
||||
PREFSMAN->SavePrefsToDisk();
|
||||
}
|
||||
|
||||
/*
|
||||
* This simply does a few manual checks for known bad driver versions. Only nag the
|
||||
* user if it's a driver that we receive many complaints about--we don't want to
|
||||
@@ -181,7 +151,7 @@ static void IgnoreMessage( CString ID )
|
||||
*/
|
||||
void ArchHooks_Win32::CheckVideoDriver()
|
||||
{
|
||||
if( MessageIsIgnored( "OLD_DRIVER_WARNING" ) )
|
||||
if( PREFSMAN->MessageIsIgnored( "OLD_DRIVER_WARNING" ) )
|
||||
return;
|
||||
|
||||
CString sPrimaryDeviceName = GetPrimaryVideoName();
|
||||
@@ -213,7 +183,7 @@ void ArchHooks_Win32::CheckVideoDriver()
|
||||
bool bExit = !!DialogBox( AppInstance(), MAKEINTRESOURCE(IDD_DRIVER), NULL, DriverWndProc );
|
||||
|
||||
if( g_Hush )
|
||||
IgnoreMessage( "OLD_DRIVER_WARNING" );
|
||||
PREFSMAN->IgnoreMessage( "OLD_DRIVER_WARNING" );
|
||||
if( bExit )
|
||||
ExitProcess(0);
|
||||
}
|
||||
@@ -383,71 +353,6 @@ void ArchHooks_Win32::SetupConcurrentRenderingThread()
|
||||
SetThreadPriority( GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL );
|
||||
}
|
||||
|
||||
static bool g_bTimerInitialized;
|
||||
|
||||
static void InitTimer()
|
||||
{
|
||||
if( g_bTimerInitialized )
|
||||
return;
|
||||
g_bTimerInitialized = true;
|
||||
|
||||
timeBeginPeriod( 1 );
|
||||
}
|
||||
|
||||
int64_t ArchHooks::GetMicrosecondsSinceStart( bool bAccurate )
|
||||
{
|
||||
if( !g_bTimerInitialized )
|
||||
InitTimer();
|
||||
|
||||
int64_t ret = timeGetTime() * int64_t(1000);
|
||||
if( bAccurate )
|
||||
{
|
||||
ret = FixupTimeIfLooped( ret );
|
||||
ret = FixupTimeIfBackwards( ret );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
#include "archutils/Win32/RegistryAccess.h"
|
||||
#include "ProductInfo.h"
|
||||
#include "RageFileManager.h"
|
||||
#include <shlobj.h>
|
||||
|
||||
void ArchHooks_Win32::MountInitialFilesystems( const CString &sDirOfExecutable )
|
||||
{
|
||||
/* All Windows data goes in the directory one level above the executable. */
|
||||
CHECKPOINT_M( ssprintf( "DOE \"%s\"", sDirOfExecutable.c_str()) );
|
||||
vector<CString> parts;
|
||||
split( sDirOfExecutable, "/", parts );
|
||||
CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) );
|
||||
ASSERT_M( parts.size() > 1, ssprintf("Strange sDirOfExecutable: %s", sDirOfExecutable.c_str()) );
|
||||
CString Dir = join( "/", parts.begin(), parts.end()-1 );
|
||||
FILEMAN->Mount( "dir", Dir, "/" );
|
||||
|
||||
CString sMyDocumentsDir;
|
||||
{
|
||||
bool bSuccess = RegistryAccess::GetRegValue( "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", sMyDocumentsDir );
|
||||
ASSERT( bSuccess );
|
||||
sMyDocumentsDir.Replace( '\\', '/' );
|
||||
sMyDocumentsDir += "/";
|
||||
}
|
||||
|
||||
CString sApplicationDataDir;
|
||||
{
|
||||
TCHAR szDir[MAX_PATH] = "";
|
||||
BOOL bResult = SHGetSpecialFolderPath( NULL, szDir, CSIDL_APPDATA, FALSE );
|
||||
ASSERT( bResult );
|
||||
sApplicationDataDir = szDir;
|
||||
sApplicationDataDir += "/";
|
||||
}
|
||||
|
||||
// Mount everything game-writable (not counting the editor) to the user's directory.
|
||||
FILEMAN->Mount( "dir", sApplicationDataDir + PRODUCT_ID + "/Cache", "/Cache" );
|
||||
FILEMAN->Mount( "dir", sMyDocumentsDir + PRODUCT_ID + "/Save", "/Save" );
|
||||
FILEMAN->Mount( "dir", sMyDocumentsDir + PRODUCT_ID + "/Screenshots", "/Screenshots" );
|
||||
}
|
||||
|
||||
void ArchHooks_Win32::SetUserQuit()
|
||||
{
|
||||
g_bQuitting = true;
|
||||
|
||||
@@ -23,7 +23,6 @@ public:
|
||||
void BoostPriority();
|
||||
void UnBoostPriority();
|
||||
void SetupConcurrentRenderingThread();
|
||||
void MountInitialFilesystems( const CString &sDirOfExecutable );
|
||||
bool UserQuit();
|
||||
|
||||
// Called by ArchHooks:
|
||||
|
||||
@@ -0,0 +1,99 @@
|
||||
#include "global.h"
|
||||
#include "ArchHooks.h"
|
||||
#include "RageUtil.h"
|
||||
#include "archutils/Win32/RegistryAccess.h"
|
||||
#include "ProductInfo.h"
|
||||
#include "RageFileManager.h"
|
||||
#include <shlobj.h>
|
||||
|
||||
// for timeGetTime
|
||||
#include <mmsystem.h>
|
||||
#if defined(_MSC_VER)
|
||||
#pragma comment(lib, "winmm.lib")
|
||||
#endif
|
||||
|
||||
|
||||
static bool g_bTimerInitialized;
|
||||
|
||||
static void InitTimer()
|
||||
{
|
||||
if( g_bTimerInitialized )
|
||||
return;
|
||||
g_bTimerInitialized = true;
|
||||
|
||||
timeBeginPeriod( 1 );
|
||||
}
|
||||
|
||||
int64_t ArchHooks::GetMicrosecondsSinceStart( bool bAccurate )
|
||||
{
|
||||
if( !g_bTimerInitialized )
|
||||
InitTimer();
|
||||
|
||||
int64_t ret = timeGetTime() * int64_t(1000);
|
||||
if( bAccurate )
|
||||
{
|
||||
ret = FixupTimeIfLooped( ret );
|
||||
ret = FixupTimeIfBackwards( ret );
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
void ArchHooks::MountInitialFilesystems( const CString &sDirOfExecutable )
|
||||
{
|
||||
/* All Windows data goes in the directory one level above the executable. */
|
||||
CHECKPOINT_M( ssprintf( "DOE \"%s\"", sDirOfExecutable.c_str()) );
|
||||
vector<CString> parts;
|
||||
split( sDirOfExecutable, "/", parts );
|
||||
CHECKPOINT_M( ssprintf( "... %i parts", parts.size()) );
|
||||
ASSERT_M( parts.size() > 1, ssprintf("Strange sDirOfExecutable: %s", sDirOfExecutable.c_str()) );
|
||||
CString Dir = join( "/", parts.begin(), parts.end()-1 );
|
||||
FILEMAN->Mount( "dir", Dir, "/" );
|
||||
|
||||
CString sMyDocumentsDir;
|
||||
{
|
||||
bool bSuccess = RegistryAccess::GetRegValue( "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", "Personal", sMyDocumentsDir );
|
||||
ASSERT( bSuccess );
|
||||
sMyDocumentsDir.Replace( '\\', '/' );
|
||||
sMyDocumentsDir += "/";
|
||||
}
|
||||
|
||||
CString sApplicationDataDir;
|
||||
{
|
||||
TCHAR szDir[MAX_PATH] = "";
|
||||
BOOL bResult = SHGetSpecialFolderPath( NULL, szDir, CSIDL_APPDATA, FALSE );
|
||||
ASSERT( bResult );
|
||||
sApplicationDataDir = szDir;
|
||||
sApplicationDataDir += "/";
|
||||
}
|
||||
|
||||
// Mount everything game-writable (not counting the editor) to the user's directory.
|
||||
FILEMAN->Mount( "dir", sApplicationDataDir + PRODUCT_ID + "/Cache", "/Cache" );
|
||||
FILEMAN->Mount( "dir", sMyDocumentsDir + PRODUCT_ID + "/Save", "/Save" );
|
||||
FILEMAN->Mount( "dir", sMyDocumentsDir + PRODUCT_ID + "/Screenshots", "/Screenshots" );
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2003-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -4,8 +4,8 @@
|
||||
#include "PrefsManager.h"
|
||||
#include "RageUtil.h"
|
||||
#include "RageLog.h"
|
||||
|
||||
#include "arch/arch.h"
|
||||
#include "RageThreads.h"
|
||||
|
||||
#include "Selector_Dialog.h"
|
||||
DialogDriver *MakeDialogDriver()
|
||||
@@ -53,7 +53,6 @@ DialogDriver *MakeDialogDriver()
|
||||
static DialogDriver *g_pImpl = NULL;
|
||||
static DialogDriver_Null g_NullDriver;
|
||||
static bool g_bWindowed = true; // Start out true so that we'll show errors before DISPLAY is init'd.
|
||||
static bool g_bIsShowingDialog = false;
|
||||
|
||||
void Dialog::Init()
|
||||
{
|
||||
@@ -72,11 +71,6 @@ void Dialog::Shutdown()
|
||||
g_pImpl = NULL;
|
||||
}
|
||||
|
||||
bool Dialog::IsShowingDialog()
|
||||
{
|
||||
return g_bIsShowingDialog;
|
||||
}
|
||||
|
||||
static bool MessageIsIgnored( CString sID )
|
||||
{
|
||||
vector<CString> asList;
|
||||
@@ -121,11 +115,11 @@ void Dialog::Error( CString sMessage, CString sID )
|
||||
if( sID != "" && MessageIsIgnored(sID) )
|
||||
return;
|
||||
|
||||
g_bIsShowingDialog = true;
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
g_pImpl->Error( sMessage, sID );
|
||||
|
||||
g_bIsShowingDialog = false;
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
}
|
||||
|
||||
void Dialog::SetWindowed( bool bWindowed )
|
||||
@@ -143,7 +137,7 @@ void Dialog::OK( CString sMessage, CString sID )
|
||||
if( sID != "" && MessageIsIgnored(sID) )
|
||||
return;
|
||||
|
||||
g_bIsShowingDialog = true;
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
// only show Dialog if windowed
|
||||
if( !g_bWindowed )
|
||||
@@ -151,7 +145,7 @@ void Dialog::OK( CString sMessage, CString sID )
|
||||
else
|
||||
g_pImpl->OK( sMessage, sID ); // call derived version
|
||||
|
||||
g_bIsShowingDialog = false;
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
}
|
||||
|
||||
Dialog::Result Dialog::AbortRetryIgnore( CString sMessage, CString sID )
|
||||
@@ -164,7 +158,7 @@ Dialog::Result Dialog::AbortRetryIgnore( CString sMessage, CString sID )
|
||||
if( sID != "" && MessageIsIgnored(sID) )
|
||||
return g_NullDriver.AbortRetryIgnore( sMessage, sID );
|
||||
|
||||
g_bIsShowingDialog = true;
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
// only show Dialog if windowed
|
||||
Dialog::Result ret;
|
||||
@@ -173,7 +167,7 @@ Dialog::Result Dialog::AbortRetryIgnore( CString sMessage, CString sID )
|
||||
else
|
||||
ret = g_pImpl->AbortRetryIgnore( sMessage, sID ); // call derived version
|
||||
|
||||
g_bIsShowingDialog = false;
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
|
||||
return ret;
|
||||
}
|
||||
@@ -188,7 +182,7 @@ Dialog::Result Dialog::AbortRetry( CString sMessage, CString sID )
|
||||
if( sID != "" && MessageIsIgnored(sID) )
|
||||
return g_NullDriver.AbortRetry( sMessage, sID );
|
||||
|
||||
g_bIsShowingDialog = true;
|
||||
RageThread::SetIsShowingDialog( true );
|
||||
|
||||
// only show Dialog if windowed
|
||||
Dialog::Result ret;
|
||||
@@ -197,7 +191,7 @@ Dialog::Result Dialog::AbortRetry( CString sMessage, CString sID )
|
||||
else
|
||||
ret = g_pImpl->AbortRetry( sMessage, sID ); // call derived version
|
||||
|
||||
g_bIsShowingDialog = false;
|
||||
RageThread::SetIsShowingDialog( false );
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@ namespace Dialog
|
||||
void Shutdown();
|
||||
|
||||
void SetWindowed( bool bWindowed );
|
||||
bool IsShowingDialog();
|
||||
|
||||
enum Result { abort, retry, ignore };
|
||||
void Error( CString sError, CString sID = "" );
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
|
||||
extern "C" void __assert_fail( const char *assertion, const char *file, unsigned int line, const char *function ) throw()
|
||||
{
|
||||
const CString error = ssprintf( "Assertion failure: %s: %s", function, assertion );
|
||||
const RString error = ssprintf( "Assertion failure: %s: %s", function, assertion );
|
||||
|
||||
#if defined(CRASH_HANDLER)
|
||||
Checkpoints::SetCheckpoint( file, line, error );
|
||||
@@ -30,7 +30,7 @@ extern "C" void __assert_fail( const char *assertion, const char *file, unsigned
|
||||
|
||||
extern "C" void __assert_perror_fail( int errnum, const char *file, unsigned int line, const char *function ) throw()
|
||||
{
|
||||
const CString error = ssprintf( "Assertion failure: %s: %s", function, strerror(errnum) );
|
||||
const RString error = ssprintf( "Assertion failure: %s: %s", function, strerror(errnum) );
|
||||
|
||||
#if defined(CRASH_HANDLER)
|
||||
Checkpoints::SetCheckpoint( file, line, error );
|
||||
|
||||
@@ -1,35 +1,10 @@
|
||||
#include "global.h"
|
||||
#include "arch_setup.h"
|
||||
#include "RageThreads.h"
|
||||
#include <time.h>
|
||||
#ifdef _WINDOWS
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#include "StepMania.h"
|
||||
|
||||
struct tm *my_localtime_r( const time_t *timep, struct tm *result )
|
||||
{
|
||||
static RageMutex mut("my_localtime_r");
|
||||
LockMut(mut);
|
||||
|
||||
*result = *localtime( timep );
|
||||
return result;
|
||||
}
|
||||
|
||||
struct tm *my_gmtime_r( const time_t *timep, struct tm *result )
|
||||
{
|
||||
static RageMutex mut("my_gmtime_r");
|
||||
LockMut(mut);
|
||||
|
||||
*result = *gmtime( timep );
|
||||
return result;
|
||||
}
|
||||
|
||||
void my_usleep( unsigned long usec )
|
||||
{
|
||||
Sleep( usec/1000 );
|
||||
}
|
||||
|
||||
#if defined(WINDOWS)
|
||||
/* Ugh. Windows doesn't give us the argv[] parser; all it gives is CommandLineToArgvW,
|
||||
* which is NT-only, so we have to do this ourself. Don't be fancy; only handle double
|
||||
|
||||
@@ -141,7 +141,7 @@ inline int lrintf( float f )
|
||||
|
||||
/* We implement the crash handler interface (though that interface isn't completely
|
||||
* uniform across platforms yet). */
|
||||
#if !defined(_XBOX)
|
||||
#if !defined(_XBOX) && !defined(SMPACKAGE)
|
||||
#define CRASH_HANDLER
|
||||
#endif
|
||||
|
||||
|
||||
@@ -0,0 +1,56 @@
|
||||
#include "global.h"
|
||||
#include "arch_setup.h"
|
||||
#include "RageThreads.h"
|
||||
#include <time.h>
|
||||
#ifdef _WINDOWS
|
||||
# include <windows.h>
|
||||
#endif
|
||||
#include "StepMania.h"
|
||||
|
||||
struct tm *my_localtime_r( const time_t *timep, struct tm *result )
|
||||
{
|
||||
static RageMutex mut("my_localtime_r");
|
||||
LockMut(mut);
|
||||
|
||||
*result = *localtime( timep );
|
||||
return result;
|
||||
}
|
||||
|
||||
struct tm *my_gmtime_r( const time_t *timep, struct tm *result )
|
||||
{
|
||||
static RageMutex mut("my_gmtime_r");
|
||||
LockMut(mut);
|
||||
|
||||
*result = *gmtime( timep );
|
||||
return result;
|
||||
}
|
||||
|
||||
void my_usleep( unsigned long usec )
|
||||
{
|
||||
Sleep( usec/1000 );
|
||||
}
|
||||
|
||||
/*
|
||||
* (c) 2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
* without limitation the rights to use, copy, modify, merge, publish,
|
||||
* distribute, and/or sell copies of the Software, and to permit persons to
|
||||
* whom the Software is furnished to do so, provided that the above
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
* THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR HOLDERS
|
||||
* INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL INDIRECT
|
||||
* OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
|
||||
* OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR
|
||||
* OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
|
||||
* PERFORMANCE OF THIS SOFTWARE.
|
||||
*/
|
||||
@@ -1,9 +1,11 @@
|
||||
#include "global.h"
|
||||
|
||||
#if defined(_WINDOWS)
|
||||
# define _WIN32_WINDOWS 0x0410 // include Win98 stuff
|
||||
# include "windows.h"
|
||||
# include "archutils/Win32/Crash.h"
|
||||
# if defined(CRASH_HANDLER)
|
||||
# define _WIN32_WINDOWS 0x0410 // include Win98 stuff
|
||||
# include "windows.h"
|
||||
# include "archutils/Win32/Crash.h"
|
||||
# endif
|
||||
#elif defined(_XBOX)
|
||||
#else
|
||||
# include <unistd.h>
|
||||
@@ -15,7 +17,7 @@
|
||||
|
||||
void NORETURN sm_crash( const char *reason )
|
||||
{
|
||||
#if defined(_WINDOWS)
|
||||
#if defined(_WINDOWS) && defined(CRASH_HANDLER)
|
||||
/* If we're being debugged, throw a debug break so it'll suspend the process. */
|
||||
if( IsDebuggerPresent() )
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<Configuration
|
||||
Name="Debug|Win32"
|
||||
OutputDirectory="../Program"
|
||||
IntermediateDirectory=".\Debug"
|
||||
IntermediateDirectory=".\Debug-smpackage"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
@@ -24,7 +24,7 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".;"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS"
|
||||
PreprocessorDefinitions="WIN32;_DEBUG;DEBUG;_WINDOWS;WINDOWS;SMPACKAGE"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
UsePrecompiledHeader="2"
|
||||
@@ -42,8 +42,8 @@
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="smpackage\ZipArchive\Release\ZipArchive.lib"
|
||||
OutputFile="../../Program/tools-debug.exe"
|
||||
LinkIncremental="1"
|
||||
OutputFile="./../Program/tools-debug.exe"
|
||||
LinkIncremental="0"
|
||||
SuppressStartupBanner="TRUE"
|
||||
GenerateDebugInformation="TRUE"
|
||||
ProgramDatabaseFile=".\../../Program/smpackage-debug.pdb"
|
||||
@@ -81,7 +81,7 @@
|
||||
<Configuration
|
||||
Name="Release|Win32"
|
||||
OutputDirectory="../Program"
|
||||
IntermediateDirectory=".\Release"
|
||||
IntermediateDirectory=".\Release-smpackage"
|
||||
ConfigurationType="1"
|
||||
UseOfMFC="2"
|
||||
ATLMinimizesCRunTimeLibraryUsage="FALSE"
|
||||
@@ -90,8 +90,8 @@
|
||||
Name="VCCLCompilerTool"
|
||||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=";"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS"
|
||||
AdditionalIncludeDirectories=".;"
|
||||
PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;WINDOWS;SMPACKAGE"
|
||||
StringPooling="TRUE"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="TRUE"
|
||||
@@ -103,13 +103,14 @@
|
||||
ProgramDataBaseFileName=".\../Release-smpackage/"
|
||||
BrowseInformation="1"
|
||||
WarningLevel="4"
|
||||
SuppressStartupBanner="TRUE"/>
|
||||
SuppressStartupBanner="TRUE"
|
||||
DebugInformationFormat="0"/>
|
||||
<Tool
|
||||
Name="VCCustomBuildTool"/>
|
||||
<Tool
|
||||
Name="VCLinkerTool"
|
||||
AdditionalDependencies="smpackage\ZipArchive\Release\ZipArchive.lib"
|
||||
OutputFile=".\../../Program/tools.exe"
|
||||
OutputFile="./../Program/tools.exe"
|
||||
LinkIncremental="1"
|
||||
SuppressStartupBanner="TRUE"
|
||||
ProgramDatabaseFile=".\../../Program/smpackage.pdb"
|
||||
@@ -214,9 +215,6 @@
|
||||
<File
|
||||
RelativePath=".\smpackage\smpackageUtil.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smpackage\StdAfx.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smpackage\StdAfx.h">
|
||||
</File>
|
||||
@@ -252,10 +250,10 @@
|
||||
RelativePath="menu.bmp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="smpackage.ICO">
|
||||
RelativePath="res\smpackage.ico">
|
||||
</File>
|
||||
<File
|
||||
RelativePath="res\smpackage.ico">
|
||||
RelativePath="smpackage.ICO">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\smpackage\smpackage.rc">
|
||||
@@ -288,10 +286,10 @@
|
||||
<Filter
|
||||
Name="system">
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\Crash.cpp">
|
||||
RelativePath=".\archutils\Win32\arch_setup.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\Crash.h">
|
||||
RelativePath=".\archutils\Win32\arch_time.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\archutils\Win32\RegistryAccess.cpp">
|
||||
@@ -306,10 +304,49 @@
|
||||
RelativePath=".\archutils\Win32\SpecialDirs.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="arch"
|
||||
Filter="">
|
||||
<Filter
|
||||
Name="Threads"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\arch\Threads\Threads.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\Threads\Threads_Win32.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\Threads\Threads_Win32.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="ArchHooks"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\arch\ArchHooks\ArchHooks.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\ArchHooks\ArchHooks_Win32.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\ArchHooks\ArchHooks_Win32Static.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\arch\ArchHooks\ArchHooksUtil.cpp">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Rage"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\RageException.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageException.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\RageFile.cpp">
|
||||
</File>
|
||||
@@ -388,6 +425,32 @@
|
||||
<File
|
||||
RelativePath=".\RageUtil_FileDB.h">
|
||||
</File>
|
||||
<Filter
|
||||
Name="Helpers"
|
||||
Filter="">
|
||||
<Filter
|
||||
Name="pcre"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\pcre\get.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pcre\internal.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pcre\maketables.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pcre\pcre.c">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pcre\pcre.h">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\pcre\study.c">
|
||||
</File>
|
||||
</Filter>
|
||||
</Filter>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="File Types"
|
||||
@@ -405,6 +468,16 @@
|
||||
RelativePath=".\XmlFile.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<Filter
|
||||
Name="Data Structures"
|
||||
Filter="">
|
||||
<File
|
||||
RelativePath=".\DateTime.cpp">
|
||||
</File>
|
||||
<File
|
||||
RelativePath=".\DateTime.h">
|
||||
</File>
|
||||
</Filter>
|
||||
<File
|
||||
RelativePath=".\smpackage\install.bmp">
|
||||
</File>
|
||||
|
||||
@@ -302,7 +302,7 @@ void CSMPackageInstallDlg::OnOK()
|
||||
//Initialize the progress bar and update the window 1 time (it's enough)
|
||||
if(!ProgressInit)
|
||||
{
|
||||
pProgress1->SetRange( 0, vs.size() );
|
||||
pProgress1->SetRange( 0, (short)vs.size() );
|
||||
pProgress1->SetStep(1);
|
||||
pProgress1->SetPos(0);
|
||||
SendMessage( WM_PAINT );
|
||||
|
||||
@@ -4,5 +4,3 @@
|
||||
|
||||
#include "stdafx.h"
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -128,3 +128,12 @@ BOOL CSmpackageApp::InitInstance()
|
||||
// application, rather than start the application's message pump.
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
namespace StepMania
|
||||
{
|
||||
void NORETURN HandleException( RString sErr )
|
||||
{
|
||||
MessageBox( NULL, "exception", sErr, MB_ICONERROR );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ CString argv0;
|
||||
|
||||
namespace StepMania
|
||||
{
|
||||
void HandleException( CString sErr ) { }
|
||||
void HandleException( RString sErr ) { }
|
||||
}
|
||||
|
||||
void test_handle_args( int argc, char *argv[] )
|
||||
|
||||
Reference in New Issue
Block a user