Add version macros
This commit is contained in:
parent
09fdd51f5b
commit
f28d542551
|
|
@ -48,6 +48,13 @@
|
||||||
// Compile-time Config Header File
|
// Compile-time Config Header File
|
||||||
#include <kiwano/config.h>
|
#include <kiwano/config.h>
|
||||||
|
|
||||||
|
#define KGE_MAJOR_VERSION 1
|
||||||
|
#define KGE_MINOR_VERSION 0
|
||||||
|
#define KGE_VERSION ((KGE_MAJOR_VERSION << 4) + KGE_MINOR_VERSION)
|
||||||
|
|
||||||
|
#define KGE_GET_MAJOR_VERSION(VERSION) ((VERSION & 0x00F0) >> 4)
|
||||||
|
#define KGE_GET_MINOR_VERSION(VERSION) (VERSION & 0x000F)
|
||||||
|
|
||||||
#define KGE_NOT_USED(VAR) ((void)VAR)
|
#define KGE_NOT_USED(VAR) ((void)VAR)
|
||||||
|
|
||||||
#define KGE_RENDER_ENGINE_NONE 0
|
#define KGE_RENDER_ENGINE_NONE 0
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,11 @@ Application::Application()
|
||||||
|
|
||||||
Application::~Application() {}
|
Application::~Application() {}
|
||||||
|
|
||||||
|
int Application::GetVersion() const
|
||||||
|
{
|
||||||
|
return KGE_VERSION;
|
||||||
|
}
|
||||||
|
|
||||||
void Application::Run(RunnerPtr runner, bool debug)
|
void Application::Run(RunnerPtr runner, bool debug)
|
||||||
{
|
{
|
||||||
KGE_ASSERT(runner);
|
KGE_ASSERT(runner);
|
||||||
|
|
|
||||||
|
|
@ -58,12 +58,6 @@ public:
|
||||||
*/
|
*/
|
||||||
void Quit();
|
void Quit();
|
||||||
|
|
||||||
/**
|
|
||||||
* \~chinese
|
|
||||||
* @brief 销毁游戏运行过程中产生的所有资源
|
|
||||||
*/
|
|
||||||
void Destroy();
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \~chinese
|
* \~chinese
|
||||||
* @brief 获取程序运行器
|
* @brief 获取程序运行器
|
||||||
|
|
@ -76,6 +70,12 @@ public:
|
||||||
*/
|
*/
|
||||||
WindowPtr GetMainWindow() const;
|
WindowPtr GetMainWindow() const;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \~chinese
|
||||||
|
* @brief 获取版本号
|
||||||
|
*/
|
||||||
|
int GetVersion() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \~chinese
|
* \~chinese
|
||||||
* @brief 添加模块
|
* @brief 添加模块
|
||||||
|
|
@ -121,6 +121,12 @@ public:
|
||||||
*/
|
*/
|
||||||
void Render();
|
void Render();
|
||||||
|
|
||||||
|
/**
|
||||||
|
* \~chinese
|
||||||
|
* @brief 销毁游戏运行过程中产生的所有资源
|
||||||
|
*/
|
||||||
|
void Destroy();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool quiting_;
|
bool quiting_;
|
||||||
float time_scale_;
|
float time_scale_;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue