summaryrefslogtreecommitdiff
path: root/osframework/source/demos/Demo4/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'osframework/source/demos/Demo4/main.cpp')
-rw-r--r--osframework/source/demos/Demo4/main.cpp47
1 files changed, 47 insertions, 0 deletions
diff --git a/osframework/source/demos/Demo4/main.cpp b/osframework/source/demos/Demo4/main.cpp
new file mode 100644
index 0000000..2d0bd68
--- /dev/null
+++ b/osframework/source/demos/Demo4/main.cpp
@@ -0,0 +1,47 @@
+//////////////////////////////////////////////////////////////////////////
+// main.cpp
+//
+// This is the starting point for all new projects. This file's purpose is
+// pretty small, but important. In here we create our application, initialize
+// it, and begin processing all the game code.
+//
+// This demo will teach you:
+// * Using the resource manager
+// * Title screen with progress bar
+// * Loading/playing music
+// * Playing sounds with pitch and panning values changed
+// * smooth motion with UpdateF
+// * Reading/writing to files/registry
+// * Getting command line switches
+// * Widgets: Hyperlink widget, edit widget, checkbox, list, scrollbars, safedeletewidget
+//////////////////////////////////////////////////////////////////////////
+
+#include "GameApp.h"
+
+// The SexyAppFramework resides in the "Sexy" namespace. As a convenience,
+// you'll see in all the .cpp files "using namespace Sexy" to avoid
+// having to prefix everything with Sexy::
+using namespace Sexy;
+
+int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow)
+{
+
+ // Make sure to set this. Some classes, like the exception handler and custom cursors
+ // will need to use it.
+ gHInstance = hInstance;
+
+ // Create and initialize our game application.
+ GameApp* anApp = new GameApp();
+ anApp->Init();
+
+ // Starts the entire application: sets up the resource loading thread and
+ // custom cursor thread, and enters the game loop where the application
+ // will remain until it is shut down. You will most likely not need to
+ // override this function.
+ anApp->Start();
+
+
+ delete anApp;
+
+ return 0;
+}