From 6ba4884059e8c5b58138f7fe45b8a403f9c15c73 Mon Sep 17 00:00:00 2001 From: Mark Cannon Date: Sun, 19 Sep 2010 09:52:38 +0000 Subject: [PATCH] remove obsolete arch.h git-svn-id: https://openitg.svn.sourceforge.net/svnroot/openitg/branches/dev@823 83fadc84-e282-4d84-a09a-c4228d6ae7e5 --- src/RageDisplay_OGL.cpp | 2 -- src/RageSoundManager.cpp | 2 -- src/RageTextureManager.cpp | 2 -- src/StepMania.cpp | 30 +++++++++++++++--------------- src/arch/ArchHooks/ArchHooks.h | 2 ++ 5 files changed, 17 insertions(+), 21 deletions(-) diff --git a/src/RageDisplay_OGL.cpp b/src/RageDisplay_OGL.cpp index fa9e99ad..f536972d 100755 --- a/src/RageDisplay_OGL.cpp +++ b/src/RageDisplay_OGL.cpp @@ -53,8 +53,6 @@ #include "arch/LowLevelWindow/LowLevelWindow.h" -#include "arch/arch.h" - #if defined(_MSC_VER) #pragma comment(lib, "opengl32.lib") #pragma comment(lib, "glu32.lib") diff --git a/src/RageSoundManager.cpp b/src/RageSoundManager.cpp index 92e05d8e..d133c969 100755 --- a/src/RageSoundManager.cpp +++ b/src/RageSoundManager.cpp @@ -12,8 +12,6 @@ #include "arch/Sound/RageSoundDriver.h" -#include "arch/arch.h" - /* * The lock ordering requirements are: * RageSound::Lock before g_SoundManMutex diff --git a/src/RageTextureManager.cpp b/src/RageTextureManager.cpp index f2430f18..bf56c602 100755 --- a/src/RageTextureManager.cpp +++ b/src/RageTextureManager.cpp @@ -40,8 +40,6 @@ #include "RageDisplay.h" #include "Foreach.h" -#include "arch/arch.h" - RageTextureManager* TEXTUREMAN = NULL; RageTextureManager::RageTextureManager() diff --git a/src/StepMania.cpp b/src/StepMania.cpp index 823dbb57..f842138a 100755 --- a/src/StepMania.cpp +++ b/src/StepMania.cpp @@ -34,7 +34,6 @@ #include "Game.h" #include "RageSurface.h" #include "RageSurface_Load.h" -#include "arch/arch.h" #include "CatalogXml.h" #include "DiagnosticsUtil.h" @@ -95,6 +94,9 @@ #else #define PATCH_DIR "Data/patch" #define PATCH_FILE "Data/patch/patch.zip" + +/* If it exists, this dir is mounted as a patch in lieu of patch.zip */ +#define PATCH_DATA_DIR "Data/patch/patch" #endif #define ZIPS_DIR "Packages/" @@ -895,18 +897,15 @@ static void WriteLogHeader() LOG->Info( PRODUCT_NAME_VER ); LOG->Info( "Compiled %s (%s %lu)", VersionTime, VersionSVN ? "revision" : "build", VersionNumber ); - LOG->Info( "Serial number: %s", DiagnosticsUtil::GetSerialNumber().c_str() ); time_t cur_time; time(&cur_time); struct tm now; localtime_r( &cur_time, &now ); - CHECKPOINT; LOG->Info( "Log starting %.4d-%.2d-%.2d %.2d:%.2d:%.2d", 1900+now.tm_year, now.tm_mon+1, now.tm_mday, now.tm_hour, now.tm_min, now.tm_sec ); LOG->Trace( " " ); - CHECKPOINT; if( g_argc > 1 ) { @@ -1032,12 +1031,6 @@ int main(int argc, char* argv[]) WriteLogHeader(); - uint64_t iSpaceTotal = HOOKS->GetDiskSpaceTotal( "/UserPacks" ); - uint64_t iSpaceFree = HOOKS->GetDiskSpaceFree( "/UserPacks" ); - - LOG->Info( "%llu bytes total", iSpaceTotal ); - LOG->Info( "%llu bytes remaining", iSpaceFree ); - /* Set up alternative filesystem trees. */ if( PREFSMAN->m_sAdditionalFolders.Get() != "" ) { @@ -1056,25 +1049,32 @@ int main(int argc, char* argv[]) MountTreeOfZips( "Packages/", false ); - /* Mount patch data, if any. */ - if ( IsAFile( PATCH_FILE ) ) + /* Mount patch data. If PATCH_DATA_DIR exists, use it instead + * of PATCH_FILE (easier testing and mucking about, etc.) */ + if( IsADirectory(PATCH_DATA_DIR) ) { - LOG->Info( "VFS: mounting patch.zip" ); + LOG->Info( "VFS: mounting Data/patch/patch/." ); + FILEMAN->Mount( "dir", PATCH_DATA_DIR, "/", false ); + } + else if( IsAFile(PATCH_FILE) ) + { + LOG->Info( "VFS: mounting patch.zip." ); FILEMAN->Mount( "patch", PATCH_DIR, "/Patch" ); FILEMAN->Mount( "zip", "/Patch/patch.zip", "/", false ); - // MountTreeOfZips( PATCH_DIR, "patch" ); } else { - LOG->Trace("VFS: No patch file found"); + LOG->Info("VFS: No patch data found"); } +#if 0 LOG->Info("======= MOUNTPOINTS ========="); vector mymounts; FILEMAN->GetLoadedDrivers(mymounts); for (unsigned i = 0; i < mymounts.size(); i++) LOG->Info("%s ..... %s ..... %s", mymounts[i].Type.c_str(), mymounts[i].Root.c_str(), mymounts[i].MountPoint.c_str() ); LOG->Info("============================="); +#endif /* One of the above filesystems might contain files that affect preferences, eg Data/Static.ini. * Re-read preferences. */ diff --git a/src/arch/ArchHooks/ArchHooks.h b/src/arch/ArchHooks/ArchHooks.h index 3f2ed121..586955d1 100755 --- a/src/arch/ArchHooks/ArchHooks.h +++ b/src/arch/ArchHooks/ArchHooks.h @@ -90,6 +90,8 @@ private: static uint64_t FixupTimeIfBackwards( uint64_t usecs ); }; +ArchHooks* MakeArchHooks(); + #endif extern ArchHooks *HOOKS; // global and accessable from anywhere in our program -- 2.11.0