void GameViewer::Refresh() { Emu.GetVFS().Init(m_path); LoadGames(); LoadPSF(); ShowData(); Emu.GetVFS().UnMountAll(); }
int main( int argc, char* argv[] ) { //string sAppDir = GetUntilLast( argv[0], "\\" ); /* This is a hacky thing to avoid messing with the command line arguments. Remove for normal usage. */ //argc = 2; argv[1] = "wikiadventure://"; /* End of hack thing. */ char czFullName[ MAX_PATH + 1 ]; GetModuleFileName( NULL, czFullName, MAX_PATH ); g_sAppDir = GetUntilLast( czFullName, "\\" ); DebugInfo( TypeInfo, string("Application directory: " + g_sAppDir).c_str() ); // Init the debug log, if it is activated #ifdef DEBUG_APP_LOG pDebugLog = new CDebugLogHandler( g_sAppDir + "\\Log\\Debug.xml" ); pDebugLog->AddTagTree( "Project" ); pDebugLog->AddTag( "Name", "WikiDialog Reader" ); pDebugLog->AddTag( "MainSourceDir", GetUntilLast( __FILE__, "\\" ) ); pDebugLog->AddTag( "Compiled", COMPILE_TIMESTAMP ); pDebugLog->AddTagTree( "CmdArguments" ); for ( int i = 0; i < argc; ++i ) pDebugLog->AddTag( "CmdArgument", argv[i] ); pDebugLog->CloseTagTree(); // CmdArguments pDebugLog->AddTagTree( "LogEntries" ); #endif for ( int i = 0; i < argc; ++i ) DebugInfo( TypeInfo, string("Command line: " + string(argv[i])).c_str() ); if ( argc != 2 ) { DebugInfo( TypeWarning, "Application is called with an invalid number of arguments." ); argc = 2; argv[1] = ""; } string sGamePage = GetAfterLast( argv[1], "//" ); // Remove "/" from text and replace "_" with a space sGamePage = ReplaceInText( RemoveFromText( sGamePage, "/" ), "_", " " ); DebugInfo(TypeInfo, string("Game page: " + sGamePage).c_str() ); pEngine = new CMyEngine; LoadGames( sGamePage ); // Terminate the debug log, if is it activated #ifdef DEBUG_APP_LOG if ( pDebugLog != 0 ) delete pDebugLog; #endif return 0; }
void GameViewer::Refresh() { LoadGames(); LoadPSF(); ShowData(); }