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