Пример #1
0
int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int iCmdShow)
{
	// create inline debugger
	Debug::Log debug;
	debug.Create ( "Test_Log.txt" );
	
	int Status;
	
	// set priority for process
	//SetPriorityClass ( GetCurrentProcess (), REALTIME_PRIORITY_CLASS );

#ifdef INLINE_DEBUG
	debug << "\r\ncalling WindowClass::Register";
#endif

	WindowClass::Register ( hInstance, "testSystem" );
	
#ifdef INLINE_DEBUG
	debug << "\r\nCreating new Playstation 1 System instance";
#endif

	//System *_PS1SYSTEM = new System ();

#ifdef INLINE_DEBUG
	debug << "\r\nRunning test program\r\n";
#endif

	do
	{

		Status = _PS1SYSTEM.RunTestProgram ();
		
		if ( Status == 1 )
		{
			_PS1SYSTEM.SaveState ();
		}
		
		if ( Status == 2 )
		{
			_PS1SYSTEM.LoadState ();
		}
		
	} while ( Status );

#ifdef INLINE_DEBUG
	debug << "\r\nPausing for input\r\n";
#endif

	cin.ignore();
	
#ifdef INLINE_DEBUG
	debug << "\r\nDeleting PS1 object\r\n";
#endif

	//delete _PS1SYSTEM;
	
#ifdef INLINE_DEBUG
	debug << "\r\nReturning from program\r\n";
#endif

	return 0;
}