This commit is contained in:
Nishi 2026-02-01 08:09:18 +09:00
commit ae67600abf
Signed by: nishi
GPG key ID: 27EF69B208EB9343
11 changed files with 178 additions and 94 deletions

View file

@ -13,6 +13,7 @@ GSDECL void GSClientDestroy(GSClient client);
GSDECL void GSClientStep(GSClient client);
GSDECL GSGL GSClientGetGL(GSClient client);
GSDECL GSSoundEngine GSClientGetSoundEngine(GSClient client);
GSDECL GSNetClient GSClientGetNetClient(GSClient client);
GSDECL void GSClientSetSkybox(GSClient client, GSBool toggle);
#ifdef __cplusplus

View file

@ -11,6 +11,7 @@ extern "C" {
#endif
#define GSGLMaxDistance 100.0
#define GSGLMaxShadowDistance 1024
/* gl_shader.c */
GSDECL GSBool GSGLShaderPrepare(GSGL gl, GLuint* shader, const char* vs, const char* fs);

View file

@ -13,6 +13,13 @@ GSDECL GSPhysics GSPhysicsCreate(GSServer server);
GSDECL void GSPhysicsDestroy(GSPhysics physics);
GSDECL void GSPhysicsStep(GSPhysics physics);
GSDECL GSPhysicsObject GSPhysicsCreateBox(GSPhysics physics, GSNumber mass, GSVector3 size);
GSDECL GSPhysicsObject GSPhysicsCreateSphere(GSPhysics physics, GSNumber mass, GSNumber radius);
GSDECL void GSPhysicsGetPosition(GSPhysicsObject obj, GSVector3 vec);
GSDECL void GSPhysicsSetPosition(GSPhysicsObject obj, GSVector3 vec);
GSDECL void GSPhysicsGetRotation(GSPhysicsObject obj, GSMatrix3x3 mat);
GSDECL void GSPhysicsDestroyObject(GSPhysicsObject obj);
#ifdef __cplusplus
}
#endif

View file

@ -8,9 +8,11 @@
extern "C" {
#endif
GSDECL GSServer GSServerCreate(GSEngine engine);
GSDECL void GSServerDestroy(GSServer server);
GSDECL void GSServerStep(GSServer server);
GSDECL GSServer GSServerCreate(GSEngine engine);
GSDECL void GSServerDestroy(GSServer server);
GSDECL GSNetServer GSServerGetNetServer(GSServer server);
GSDECL GSPhysics GSServerGetPhysics(GSServer server);
GSDECL void GSServerStep(GSServer server);
#ifdef __cplusplus
}

View file

@ -52,21 +52,22 @@ typedef struct _GSBinary GSBinary;
typedef struct _GSNetState GSNetState;
typedef struct _GSNetKV GSNetKV;
#ifdef _GEARSRC
typedef struct _GSClient* GSClient;
typedef struct _GSServer* GSServer;
typedef struct _GSEngine* GSEngine;
typedef struct _GSFile* GSFile;
typedef struct _GSResource* GSResource;
typedef struct _GSGL* GSGL;
typedef struct _GSSkyBox* GSSkyBox;
typedef struct _GSModel* GSModel;
typedef struct _GSSoundDriver* GSSoundDriver;
typedef struct _GSSoundEngine* GSSoundEngine;
typedef struct _GSSound* GSSound;
typedef struct _GSNetClient* GSNetClient;
typedef struct _GSNetServer* GSNetServer;
typedef struct _GSNetSocket* GSNetSocket;
typedef struct _GSPhysics* GSPhysics;
typedef struct _GSClient* GSClient;
typedef struct _GSServer* GSServer;
typedef struct _GSEngine* GSEngine;
typedef struct _GSFile* GSFile;
typedef struct _GSResource* GSResource;
typedef struct _GSGL* GSGL;
typedef struct _GSSkyBox* GSSkyBox;
typedef struct _GSModel* GSModel;
typedef struct _GSSoundDriver* GSSoundDriver;
typedef struct _GSSoundEngine* GSSoundEngine;
typedef struct _GSSound* GSSound;
typedef struct _GSNetClient* GSNetClient;
typedef struct _GSNetServer* GSNetServer;
typedef struct _GSNetSocket* GSNetSocket;
typedef struct _GSPhysics* GSPhysics;
typedef struct _GSPhysicsObject* GSPhysicsObject;
typedef struct _GSModelFace GSModelFace;
typedef struct _GSModelMaterial GSModelMaterial;
@ -88,6 +89,7 @@ typedef void* GSNetClient;
typedef void* GSNetServer;
typedef void* GSNetSocket;
typedef void* GSPhysics;
typedef void* GSPhysicsObject;
#endif
typedef float GSNumber;
typedef GSNumber GSVector2[2];
@ -321,6 +323,13 @@ struct _GSPhysics {
dJointGroupID contact_group;
};
struct _GSPhysicsObject {
GSEngine engine;
dGeomID geom;
dBodyID body;
};
struct _GSClient {
GSEngine engine;