/*
* Engine.h
* Jonathan Boldiga
* 09/02/03
*
* Description: Engine is the main engine class, derived from OGLWindow.
* It holds virtual functions gameCycle, onPrepare, onGetCamera,
* and onGetWorld. Engine is also the location of the main
* Windows message loop.
*
*/
#ifndef __ENGINE_H
#define __ENGINE_H
#define WIN32_LEAN_AND_MEAN
#define WIN32_EXTRA_LEAN
#include "World.h"
#include "OGLWindow.h"
#include "Camera.h"
#include "HiResTimer.h"
#include
#include
#include
#include
class Engine : public OGLWindow{
private:
protected:
HiResTimer* timer; // high performance timer
virtual void gameCycle(float deltaTime);
virtual void onPrepare() {} // setup OpenGL for frame
virtual Camera* onGetCamera() { return NULL; } // override in derived engine
virtual World* onGetWorld() { return NULL; }
virtual void checkInput(float deltaTime);
public:
Engine(){}
Engine(const char *szName, bool fscreen, int w, int h, int b) :
OGLWindow(szName, fscreen, w, h, b) {}
~Engine() {}
LRESULT enterMessageLoop();
};
#endif