a
This commit is contained in:
parent
4b0a924184
commit
247661fc13
22 changed files with 325 additions and 8 deletions
18
engine/include/GearBox/Client.h
Normal file
18
engine/include/GearBox/Client.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef __GEARBOX_CLIENT_H__
|
||||
#define __GEARBOX_CLIENT_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL GBClient GBClientCreate(GBEngine engine);
|
||||
GBDECL void GBClientDestroy(GBClient client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
21
engine/include/GearBox/Core.h
Normal file
21
engine/include/GearBox/Core.h
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#ifndef __GEARBOX_CORE_H__
|
||||
#define __GEARBOX_CORE_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL void GBInit(void);
|
||||
GBDECL GBEngine GBEngineCreate(GBEngineParam* param);
|
||||
GBDECL void GBEngineDestroy(GBEngine engine);
|
||||
GBDECL void GBEngineStart(GBEngine engine);
|
||||
GBDECL void GBEngineLoop(GBEngine engine);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
13
engine/include/GearBox/Foundation.h
Normal file
13
engine/include/GearBox/Foundation.h
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
#ifndef __GEARBOX_FOUNDATION_H__
|
||||
#define __GEARBOX_FOUNDATION_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#include <GearBox/Core.h>
|
||||
#include <GearBox/Version.h>
|
||||
#include <GearBox/Log.h>
|
||||
#include <GearBox/Client.h>
|
||||
#include <GearBox/Server.h>
|
||||
|
||||
#endif
|
||||
23
engine/include/GearBox/Log.h
Normal file
23
engine/include/GearBox/Log.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#ifndef __GEARBOX_LOG_H__
|
||||
#define __GEARBOX_LOG_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
enum GBLogLevel {
|
||||
GBLogInfo = 0,
|
||||
GBLogWarn,
|
||||
GBLogError
|
||||
};
|
||||
|
||||
GBDECL void GBLog(int level, const char* fmt, ...);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
17
engine/include/GearBox/MachDep.h
Normal file
17
engine/include/GearBox/MachDep.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef __GEARBOX_MACHDEP_H__
|
||||
#define __GEARBOX_MACHDEP_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
|
||||
#if defined(_MILSKO) && defined(_WIN32)
|
||||
#define GBDECL extern __declspec(dllexport)
|
||||
#elif defined(_WIN32)
|
||||
#define GBDECL extern __declspec(dllimport)
|
||||
#else
|
||||
#define GBDECL extern
|
||||
#endif
|
||||
|
||||
#endif
|
||||
18
engine/include/GearBox/Server.h
Normal file
18
engine/include/GearBox/Server.h
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
#ifndef __GEARBOX_SERVER_H__
|
||||
#define __GEARBOX_SERVER_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL GBServer GBServerCreate(GBEngine engine);
|
||||
GBDECL void GBServerDestroy(GBServer server);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
41
engine/include/GearBox/TypeDefs.h
Normal file
41
engine/include/GearBox/TypeDefs.h
Normal file
|
|
@ -0,0 +1,41 @@
|
|||
#ifndef __GEARBOX_TYPEDEFS_H__
|
||||
#define __GEARBOX_TYPEDEFS_H__
|
||||
|
||||
typedef struct _GBVersion GBVersion;
|
||||
typedef struct _GBEngineParam GBEngineParam;
|
||||
#ifdef _GEARBOX
|
||||
typedef struct _GBClient* GBClient;
|
||||
typedef struct _GBServer* GBServer;
|
||||
typedef struct _GBEngine* GBEngine;
|
||||
#else
|
||||
typedef void* GBClient;
|
||||
typedef void* GBServer;
|
||||
typedef void* GBEngine;
|
||||
#endif
|
||||
|
||||
#ifdef _GEARBOX
|
||||
struct _GBClient {
|
||||
};
|
||||
|
||||
struct _GBServer {
|
||||
};
|
||||
|
||||
struct _GBEngine {
|
||||
GBClient client;
|
||||
GBServer server;
|
||||
};
|
||||
#endif
|
||||
|
||||
struct _GBVersion {
|
||||
char string[64];
|
||||
int majorlevel;
|
||||
int minorlevel;
|
||||
int patchlevel;
|
||||
};
|
||||
|
||||
struct _GBEngineParam {
|
||||
int client;
|
||||
int server;
|
||||
};
|
||||
|
||||
#endif
|
||||
17
engine/include/GearBox/Version.h
Normal file
17
engine/include/GearBox/Version.h
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
#ifndef __GEARBOX_VERSION_H__
|
||||
#define __GEARBOX_VERSION_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL void GBVersionGet(GBVersion* version);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue