home *** CD-ROM | disk | FTP | other *** search
- //-----------------------------------------------------------------------------
- // System Includes
- //-----------------------------------------------------------------------------
- #include <windows.h>
-
- //-----------------------------------------------------------------------------
- // Engine Includes
- //-----------------------------------------------------------------------------
- #include "..\Engine\Engine.h"
-
- //-----------------------------------------------------------------------------
- // Test State Class
- //-----------------------------------------------------------------------------
- class TestState : public State
- {
- //-------------------------------------------------------------------------
- // Update function for the TestState.
- //-------------------------------------------------------------------------
- virtual void Update( float elapsed )
- {
- // Check if the user wants to exit.
- if( g_engine->GetInput()->GetKeyPress( DIK_Q ) )
- PostQuitMessage( 0 );
- };
- };
-
- //-----------------------------------------------------------------------------
- // Application specific state setup.
- //-----------------------------------------------------------------------------
- void StateSetup()
- {
- g_engine->AddState( new TestState, true );
- }
-
- //-----------------------------------------------------------------------------
- // Entry point for the application.
- //-----------------------------------------------------------------------------
- int WINAPI WinMain( HINSTANCE instance, HINSTANCE prev, LPSTR cmdLine, int cmdShow )
- {
- // Create the engine setup structure.
- EngineSetup setup;
- setup.instance = instance;
- setup.name = "Engine Control Test";
- setup.StateSetup = StateSetup;
-
- // Create the engine (using the setup structure), then run it.
- new Engine( &setup );
- g_engine->Run();
-
- return true;
- }