You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
52 lines
1.6 KiB
52 lines
1.6 KiB
#include "uniquake.h"
|
|
|
|
#include "../Quake/quakedef.h"
|
|
|
|
typedef struct unity_gamecalls_s
|
|
{
|
|
void(*SetEntityModel)(void *context, int entityNum, const char *modelName);
|
|
void(*SetEntityTransform)(void *context, int entityNum, vec3_t origin, vec3_t angles);
|
|
void(*RemoveEntity)(void *context, int entityNum);
|
|
void(*UpdateEntityAnimation)(void *context, int entityNum, int pose1, int pose2, float blend);
|
|
void(*SetEntitySkin)(void *context, int entityNum, int skinNum);
|
|
void(*ParticleExplosion)(void *context, vec3_t origin);
|
|
} unity_gamecalls_t;
|
|
|
|
static void *unity_context;
|
|
static const unity_gamecalls_t *unity_gamecalls;
|
|
|
|
UNIQUAKE_API void UniQuake_SetGameCallbacks(void *context, const unity_gamecalls_t *callbacks)
|
|
{
|
|
unity_context = context;
|
|
unity_gamecalls = callbacks;
|
|
}
|
|
|
|
void UQ_Game_SetEntityModel(int entityNum, const char *modelName)
|
|
{
|
|
unity_gamecalls->SetEntityModel(unity_context, entityNum, modelName);
|
|
}
|
|
|
|
void UQ_Game_SetEntityTransform(int entityNum, vec3_t origin, vec3_t angles)
|
|
{
|
|
unity_gamecalls->SetEntityTransform(unity_context, entityNum, origin, angles);
|
|
}
|
|
|
|
void UQ_Game_RemoveEntity(int entityNum)
|
|
{
|
|
unity_gamecalls->RemoveEntity(unity_context, entityNum);
|
|
}
|
|
|
|
void UQ_Game_UpdateEntityAnimation(int entityNum, int pose1, int pose2, float blend)
|
|
{
|
|
unity_gamecalls->UpdateEntityAnimation(unity_context, entityNum, pose1, pose2, blend);
|
|
}
|
|
|
|
void UQ_Game_SetEntitySkin(int entityNum, int skinNum)
|
|
{
|
|
unity_gamecalls->SetEntitySkin(unity_context, entityNum, skinNum);
|
|
}
|
|
|
|
void UQ_Game_ParticleExplosion(vec3_t origin)
|
|
{
|
|
unity_gamecalls->ParticleExplosion(unity_context, origin);
|
|
}
|