整理代码
This commit is contained in:
commit
c7b4e178ec
364 changed files with 59691 additions and 0 deletions
75
main.cpp
Normal file
75
main.cpp
Normal file
|
|
@ -0,0 +1,75 @@
|
|||
/*
|
||||
*******************************************************************************
|
||||
* INCLUDE
|
||||
*******************************************************************************
|
||||
*/
|
||||
#include "Application.h"
|
||||
#ifdef USING_HARDWARE_SUBSYSTEM
|
||||
#include "HardwareSubsystem.h"
|
||||
#endif
|
||||
|
||||
#ifdef USING_NETWORK_SUBSYSTEM
|
||||
#include "NetworkSubsystem.h"
|
||||
#endif
|
||||
|
||||
#ifdef USING_GRAPHICS_SUBSYSTEM
|
||||
#include "GraphicsSubsystem.h"
|
||||
#endif
|
||||
|
||||
#ifdef WINDOWS_GUI_APPLICATION
|
||||
#include <Windows.h>
|
||||
#include <tchar.h>
|
||||
#endif
|
||||
|
||||
#ifdef USING_VIDEO_SUBSYSTEM
|
||||
#include "VideoSubsystem.h"
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
*******************************************************************************
|
||||
* FUNCTIONS
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifdef WINDOWS_GUI_APPLICATION
|
||||
int WINAPI _tWinMain(_In_ HINSTANCE hInstance, _In_opt_ HINSTANCE hPrevInstance, _In_ LPSTR lpCmdLine,
|
||||
_In_ INT nCmdShow)
|
||||
#else
|
||||
int main()
|
||||
#endif
|
||||
{
|
||||
Application app;
|
||||
|
||||
#ifdef USING_HARDWARE_SUBSYSTEM
|
||||
app.addSubsystem(new Hardware::HardwareSubsystem());
|
||||
#endif
|
||||
|
||||
#ifdef USING_NETWORK_SUBSYSTEM
|
||||
app.addSubsystem(new Network::NetworkSubsystem());
|
||||
#endif
|
||||
|
||||
#ifdef USING_GRAPHICS_SUBSYSTEM
|
||||
app.addSubsystem(new Graphics::GraphicsSubsystem());
|
||||
#endif
|
||||
|
||||
#ifdef USING_VIDEO_SUBSYSTEM
|
||||
app.addSubsystem(new Video::VideoSubsystem());
|
||||
#endif
|
||||
|
||||
int rc = 0;
|
||||
|
||||
try
|
||||
{
|
||||
rc = app.run();
|
||||
}
|
||||
catch (const std::exception& e)
|
||||
{
|
||||
std::cout << e.what() << std::endl;
|
||||
}
|
||||
catch (...)
|
||||
{
|
||||
std::cout << "Unknown exception" << std::endl;
|
||||
}
|
||||
|
||||
return rc;
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue