Danbias/Code/Game/DanBiasGame/Include/DanBiasGame.h

70 lines
1.6 KiB
C
Raw Normal View History

2013-12-03 12:07:37 +01:00
#ifndef DANBIASGAME_DANBIASGAME_H
#define DANBIASGAME_DANBIASGAME_H
#if defined (DANBIAS_GAME_DLL_EXPORT)
#define DANBIAS_GAME_DLL __declspec(dllexport)
#else
#define DANBIAS_GAME_DLL __declspec(dllimport)
#endif
#define NOMINMAX
#include <Windows.h>
2013-12-12 09:33:59 +01:00
#define DANBIAS_CLIENT
2013-12-03 12:07:37 +01:00
namespace DanBias
{
extern "C"
{
2013-12-03 12:07:37 +01:00
enum DanBiasClientReturn
{
DanBiasClientReturn_Error,
DanBiasClientReturn_Sucess,
};
struct DanBiasGameDesc
{
//Stuff goes here...
int port;
HINSTANCE hinst;
int nCmdShow;
2013-12-03 12:07:37 +01:00
};
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
class DanBiasGamePrivateData;
2013-12-03 12:07:37 +01:00
class DANBIAS_GAME_DLL DanBiasGame
{
public:
//--------------------------------------------------------------------------------------
// Interface API functions
//--------------------------------------------------------------------------------------
2013-12-03 12:07:37 +01:00
static DanBiasClientReturn Initiate(DanBiasGameDesc& desc);
static DanBiasClientReturn Run();
static void Release();
private:
static HRESULT InitWindow( HINSTANCE hInstance, int nCmdShow);
static HRESULT InitDirect3D();
static HRESULT InitInput();
static HRESULT Update(float deltaTime);
static HRESULT Render(float deltaTime);
static HRESULT CleanUp();
private:
static __int64 cntsPerSec;
static __int64 prevTimeStamp;
static float secsPerCnt;
static InputClass* inputObj;
static HINSTANCE g_hInst;
static HWND g_hWnd;
static DanBiasGamePrivateData* m_data;
2013-12-03 12:07:37 +01:00
};
2013-12-03 12:07:37 +01:00
}//End Extern "C"
} //End namespace DanBias
2013-12-03 12:07:37 +01:00
#endif // !DANBIASGAME_DANBIASGAME_H