math and things
This commit is contained in:
parent
247661fc13
commit
2fe23438b0
17 changed files with 243 additions and 35 deletions
|
|
@ -10,6 +10,7 @@ extern "C" {
|
|||
|
||||
GBDECL GBClient GBClientCreate(GBEngine engine);
|
||||
GBDECL void GBClientDestroy(GBClient client);
|
||||
GBDECL void GBClientStep(GBClient client);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,11 +8,14 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL void GBInit(void);
|
||||
GBDECL void GBInit(void);
|
||||
|
||||
GBDECL GBEngine GBEngineCreate(GBEngineParam* param);
|
||||
GBDECL void GBEngineDestroy(GBEngine engine);
|
||||
GBDECL void GBEngineStart(GBEngine engine);
|
||||
GBDECL void GBEngineParamInit(GBEngineParam* param);
|
||||
GBDECL void GBEngineLoop(GBEngine engine);
|
||||
GBDECL GBClient GBEngineGetClient(GBEngine engine);
|
||||
GBDECL GBServer GBEngineGetServer(GBEngine engine);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -9,5 +9,6 @@
|
|||
#include <GearBox/Log.h>
|
||||
#include <GearBox/Client.h>
|
||||
#include <GearBox/Server.h>
|
||||
#include <GearBox/Math.h>
|
||||
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -5,8 +5,13 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <stdarg.h>
|
||||
#include <math.h>
|
||||
|
||||
#if defined(_MILSKO) && defined(_WIN32)
|
||||
#ifdef _GEARBOX
|
||||
#include <gbnet.h>
|
||||
#endif
|
||||
|
||||
#if defined(_GEARBOX) && defined(_WIN32)
|
||||
#define GBDECL extern __declspec(dllexport)
|
||||
#elif defined(_WIN32)
|
||||
#define GBDECL extern __declspec(dllimport)
|
||||
|
|
|
|||
19
engine/include/GearBox/Math.h
Normal file
19
engine/include/GearBox/Math.h
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
#ifndef __GEARBOX_MATH_H__
|
||||
#define __GEARBOX_MATH_H__
|
||||
|
||||
#include <GearBox/MachDep.h>
|
||||
#include <GearBox/TypeDefs.h>
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
GBDECL void GBMathCross(double* out, double v00, double v01, double v02, double v10, double v11, double v12);
|
||||
GBDECL void GBMathNormal3(double* out, double v00, double v01, double v02, double v10, double v11, double v12, double v20, double v21, double v22);
|
||||
GBDECL void GBMathNormal4(double* out, double v00, double v01, double v02, double v10, double v11, double v12, double v20, double v21, double v22, double v30, double v31, double v32);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
@ -10,6 +10,7 @@ extern "C" {
|
|||
|
||||
GBDECL GBServer GBServerCreate(GBEngine engine);
|
||||
GBDECL void GBServerDestroy(GBServer server);
|
||||
GBDECL void GBServerStep(GBServer server);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,6 +13,13 @@ typedef void* GBServer;
|
|||
typedef void* GBEngine;
|
||||
#endif
|
||||
|
||||
typedef void* (*GBGLGetProcAddressCallback)(const char* name);
|
||||
typedef void (*GBGLSwapBufferCallback)(void);
|
||||
typedef void (*GBReadyCallback)(int width, int height);
|
||||
typedef void (*GBTickCallback)(void);
|
||||
typedef long (*GBGetTickCallback)(void);
|
||||
typedef void (*GBSleepCallback)(int ms);
|
||||
|
||||
#ifdef _GEARBOX
|
||||
struct _GBClient {
|
||||
};
|
||||
|
|
@ -21,8 +28,9 @@ struct _GBServer {
|
|||
};
|
||||
|
||||
struct _GBEngine {
|
||||
GBClient client;
|
||||
GBServer server;
|
||||
GBEngineParam* param;
|
||||
GBClient client;
|
||||
GBServer server;
|
||||
};
|
||||
#endif
|
||||
|
||||
|
|
@ -34,8 +42,14 @@ struct _GBVersion {
|
|||
};
|
||||
|
||||
struct _GBEngineParam {
|
||||
int client;
|
||||
int server;
|
||||
int client;
|
||||
int server;
|
||||
GBGLGetProcAddressCallback gl_getprocaddress;
|
||||
GBGLSwapBufferCallback gl_swapbuffer;
|
||||
GBReadyCallback ready;
|
||||
GBTickCallback tick;
|
||||
GBGetTickCallback get_tick;
|
||||
GBSleepCallback sleep;
|
||||
};
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue