Add version macros

This commit is contained in:
Nomango 2020-02-17 13:23:46 +08:00
parent 09fdd51f5b
commit f28d542551
3 changed files with 24 additions and 6 deletions

View File

@ -48,6 +48,13 @@
// Compile-time Config Header File
#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_RENDER_ENGINE_NONE 0

View File

@ -40,6 +40,11 @@ Application::Application()
Application::~Application() {}
int Application::GetVersion() const
{
return KGE_VERSION;
}
void Application::Run(RunnerPtr runner, bool debug)
{
KGE_ASSERT(runner);

View File

@ -58,12 +58,6 @@ public:
*/
void Quit();
/**
* \~chinese
* @brief
*/
void Destroy();
/**
* \~chinese
* @brief
@ -76,6 +70,12 @@ public:
*/
WindowPtr GetMainWindow() const;
/**
* \~chinese
* @brief
*/
int GetVersion() const;
/**
* \~chinese
* @brief
@ -121,6 +121,12 @@ public:
*/
void Render();
/**
* \~chinese
* @brief
*/
void Destroy();
private:
bool quiting_;
float time_scale_;