This commit is contained in:
Nishi 2026-01-09 00:40:51 +09:00
commit 247661fc13
Signed by: nishi
GPG key ID: 27EF69B208EB9343
22 changed files with 325 additions and 8 deletions

View 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

View 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

View 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

View 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

View 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

View 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

View 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

View 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