mirror of
https://github.com/nunuhara/xsystem4.git
synced 2026-09-22 23:18:01 +03:00
Merge pull request #332 from kichikuou/SealEngine
SealEngine: Implement and stub various functions
This commit is contained in:
@@ -149,6 +149,9 @@ struct RE_plugin {
|
||||
|
||||
// TapirEngine
|
||||
bool suspended;
|
||||
|
||||
// SealEngine
|
||||
int mag_speed;
|
||||
};
|
||||
|
||||
struct RE_instance {
|
||||
@@ -171,6 +174,7 @@ struct RE_instance {
|
||||
float shadow_volume_bone_radius;
|
||||
bool draw_bump;
|
||||
float fps;
|
||||
bool use_mag_speed;
|
||||
bool motion_blend;
|
||||
float motion_blend_rate;
|
||||
vec3 ambient;
|
||||
@@ -212,7 +216,9 @@ int RE_create_instance(struct RE_plugin *plugin);
|
||||
bool RE_release_instance(struct RE_plugin *plugin, int instance);
|
||||
|
||||
bool RE_instance_set_type(struct RE_instance *instance, int type);
|
||||
bool RE_instance_data_exists(struct RE_instance *instance, const char *name);
|
||||
bool RE_instance_load(struct RE_instance *instance, const char *name);
|
||||
bool RE_instance_motion_exists(struct RE_instance *instance, const char *name);
|
||||
bool RE_instance_load_motion(struct RE_instance *instance, const char *name);
|
||||
bool RE_instance_load_next_motion(struct RE_instance *instance, const char *name);
|
||||
bool RE_instance_free_next_motion(struct RE_instance *instance);
|
||||
@@ -228,6 +234,8 @@ bool RE_instance_find_path(struct RE_instance *instance, vec3 start, vec3 goal);
|
||||
const vec3 *RE_instance_get_path_line(struct RE_instance *instance, int *nr_path_points);
|
||||
bool RE_instance_optimize_path_line(struct RE_instance *instance);
|
||||
bool RE_instance_calc_path_finder_intersect_eye_vec(struct RE_instance *instance, int mouse_x, int mouse_y, vec3 out);
|
||||
bool RE_plugin_transform_pos_to_view_pos(struct RE_plugin *plugin, float x, float y, float z, int *view_x, int *view_y);
|
||||
bool RE_plugin_get_camera_z_vector(struct RE_plugin *plugin, vec3 out);
|
||||
|
||||
int RE_motion_get_state(struct motion *motion);
|
||||
bool RE_motion_set_state(struct motion *motion, int state);
|
||||
|
||||
+83
-2
@@ -49,6 +49,7 @@ static struct RE_instance *create_instance(struct RE_plugin *plugin)
|
||||
instance->shadow_volume_bone_radius = 0.1f;
|
||||
instance->draw_bump = true;
|
||||
instance->fps = 30.0f;
|
||||
instance->use_mag_speed = true;
|
||||
instance->column_height = 1.0f;
|
||||
instance->column_radius = 1.0f;
|
||||
glm_mat4_identity(instance->local_transform);
|
||||
@@ -240,6 +241,7 @@ struct RE_plugin *RE_plugin_new(enum RE_plugin_version version)
|
||||
plugin->pae_cache = ht_create(32);
|
||||
for (int i = 0; i < RE_NR_BACK_CGS; i++)
|
||||
RE_back_cg_init(&plugin->back_cg[i]);
|
||||
plugin->mag_speed = 1;
|
||||
plugin->fog_type = RE_FOG_NONE;
|
||||
plugin->fog_near = 1.0;
|
||||
plugin->fog_far = 10.0;
|
||||
@@ -326,6 +328,8 @@ bool RE_build_model(struct RE_plugin *plugin, int elapsed_ms)
|
||||
continue;
|
||||
|
||||
float delta_frame = inst->fps * elapsed_ms / 1000.0;
|
||||
if (inst->use_mag_speed)
|
||||
delta_frame *= plugin->mag_speed;
|
||||
update_motion(inst->motion, delta_frame);
|
||||
update_motion(inst->next_motion, delta_frame);
|
||||
|
||||
@@ -432,13 +436,38 @@ bool RE_instance_set_type(struct RE_instance *instance, int type)
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RE_instance_data_exists(struct RE_instance *instance, const char *name)
|
||||
{
|
||||
if (!instance)
|
||||
return false;
|
||||
const char *ext;
|
||||
switch (instance->type) {
|
||||
case RE_ITYPE_STATIC:
|
||||
case RE_ITYPE_SKINNED:
|
||||
ext = ".POL";
|
||||
break;
|
||||
case RE_ITYPE_PARTICLE_EFFECT:
|
||||
ext = ".3de";
|
||||
break;
|
||||
default:
|
||||
return archive_exists_by_name(instance->plugin->aar, name, NULL);
|
||||
}
|
||||
const char *basename = strrchr(name, '\\');
|
||||
basename = basename ? basename + 1 : name;
|
||||
char *path = xmalloc(strlen(name) + strlen(basename) + strlen(ext) + 2);
|
||||
sprintf(path, "%s\\%s%s", name, basename, ext);
|
||||
bool exists = archive_exists_by_name(instance->plugin->aar, path, NULL);
|
||||
free(path);
|
||||
return exists;
|
||||
}
|
||||
|
||||
bool RE_instance_load(struct RE_instance *instance, const char *name)
|
||||
{
|
||||
if (!instance)
|
||||
return false;
|
||||
unload_instance(instance);
|
||||
if (name[0] == '\0')
|
||||
return false;
|
||||
return true; // empty name just unloads the instance
|
||||
|
||||
struct pae *pae;
|
||||
switch (instance->type) {
|
||||
@@ -479,6 +508,19 @@ bool RE_instance_load(struct RE_instance *instance, const char *name)
|
||||
}
|
||||
}
|
||||
|
||||
bool RE_instance_motion_exists(struct RE_instance *instance, const char *name)
|
||||
{
|
||||
if (!instance || !instance->model)
|
||||
return false;
|
||||
if (instance->model->mot_cache && ht_get(instance->model->mot_cache, name, NULL))
|
||||
return true;
|
||||
char *path = xmalloc(strlen(instance->model->path) + strlen(name) + 6);
|
||||
sprintf(path, "%s\\%s.MOT", instance->model->path, name);
|
||||
bool exists = archive_exists_by_name(instance->plugin->aar, path, NULL);
|
||||
free(path);
|
||||
return exists;
|
||||
}
|
||||
|
||||
bool RE_instance_load_motion(struct RE_instance *instance, const char *name)
|
||||
{
|
||||
if (!instance)
|
||||
@@ -650,7 +692,7 @@ bool RE_instance_optimize_path_line(struct RE_instance *inst)
|
||||
|
||||
bool RE_instance_calc_path_finder_intersect_eye_vec(struct RE_instance *inst, int mouse_x, int mouse_y, vec3 out)
|
||||
{
|
||||
if (!inst || !inst->model->collider)
|
||||
if (!inst || !inst->model || !inst->model->collider)
|
||||
return false;
|
||||
|
||||
float ndc_x = 2.f * mouse_x / inst->plugin->renderer->viewport_width - 1.f;
|
||||
@@ -676,6 +718,45 @@ bool RE_instance_calc_path_finder_intersect_eye_vec(struct RE_instance *inst, in
|
||||
return collider_raycast(inst->model->collider, origin, direction, out);
|
||||
}
|
||||
|
||||
bool RE_plugin_transform_pos_to_view_pos(struct RE_plugin *plugin, float x, float y, float z, int *view_x, int *view_y)
|
||||
{
|
||||
if (!plugin)
|
||||
return false;
|
||||
|
||||
mat4 vp;
|
||||
RE_calc_view_matrix(&plugin->camera, GLM_YUP, vp);
|
||||
glm_mat4_mul(plugin->proj_transform, vp, vp);
|
||||
|
||||
vec4 pos = { x, y, z, 1.f };
|
||||
glm_mat4_mulv(vp, pos, pos);
|
||||
|
||||
if (pos[3] == 0.f)
|
||||
return false;
|
||||
|
||||
float ndc_x = pos[0] / pos[3];
|
||||
float ndc_y = pos[1] / pos[3];
|
||||
|
||||
*view_x = (int)((ndc_x + 1.f) * 0.5f * plugin->renderer->viewport_width);
|
||||
*view_y = (int)((1.f - ndc_y) * 0.5f * plugin->renderer->viewport_height);
|
||||
return true;
|
||||
}
|
||||
|
||||
bool RE_plugin_get_camera_z_vector(struct RE_plugin *plugin, vec3 out)
|
||||
{
|
||||
if (!plugin)
|
||||
return false;
|
||||
|
||||
vec3 euler = {
|
||||
glm_rad(plugin->camera.pitch + plugin->camera.quake_pitch),
|
||||
glm_rad(plugin->camera.yaw + plugin->camera.quake_yaw),
|
||||
glm_rad(plugin->camera.roll)
|
||||
};
|
||||
mat4 rot;
|
||||
glm_euler(euler, rot);
|
||||
glm_mat4_mulv3(rot, GLM_FORWARD, 0.f, out);
|
||||
return true;
|
||||
}
|
||||
|
||||
void RE_instance_update_local_transform(struct RE_instance *inst)
|
||||
{
|
||||
vec3 euler = {
|
||||
|
||||
+147
-57
@@ -1806,7 +1806,6 @@ static bool ReignEngine_SetBackCGShow(int plugin, int num, bool show)
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, ReignEngine, SetGlareBrightnessParam, int plugin, int index, float param);
|
||||
//float ReignEngine_GetSSAOParam(int plugin, int type);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, ReignEngine, SetSSAOParam, int plugin, int type, float param);
|
||||
//bool ReignEngine_CalcIntersectEyeVec(int plugin, int instance, int nMouseX, int nMouseY, float *pfX, float *pfY, float *pfZ);
|
||||
HLL_QUIET_UNIMPLEMENTED(false, bool, ReignEngine, IsLoading, int plugin);
|
||||
//int ReignEngine_GetDebugInfoMode(int plugin);
|
||||
//bool ReignEngine_SetDebugInfoMode(int plugin, int nMode);
|
||||
@@ -1942,8 +1941,21 @@ static bool TapirEngine_Resume(int plugin_number)
|
||||
return RE_plugin_resume(get_plugin(plugin_number));
|
||||
}
|
||||
|
||||
//int TapirEngine_GetNumofPlugin(void);
|
||||
//bool TapirEngine_IsExistPlugin(int PluginNumber);
|
||||
static int TapirEngine_GetNumofPlugin(void)
|
||||
{
|
||||
int count = 0;
|
||||
for (int i = 0; i < RE_MAX_PLUGINS; i++) {
|
||||
if (plugins[i])
|
||||
count++;
|
||||
}
|
||||
return count;
|
||||
}
|
||||
|
||||
static bool TapirEngine_IsExistPlugin(int plugin_number)
|
||||
{
|
||||
return get_plugin(plugin_number) != NULL;
|
||||
}
|
||||
|
||||
//int TapirEngine_GetNumofInstance(int PluginNumber);
|
||||
|
||||
#define REIGN_EXPORTS \
|
||||
@@ -2280,7 +2292,7 @@ static bool TapirEngine_Resume(int plugin_number)
|
||||
HLL_EXPORT(SetGlareBrightnessParam, ReignEngine_SetGlareBrightnessParam), \
|
||||
HLL_TODO_EXPORT(GetSSAOParam, ReignEngine_GetSSAOParam), \
|
||||
HLL_EXPORT(SetSSAOParam, ReignEngine_SetSSAOParam), \
|
||||
HLL_TODO_EXPORT(CalcIntersectEyeVec, ReignEngine_CalcIntersectEyeVec), \
|
||||
HLL_EXPORT(CalcIntersectEyeVec, TapirEngine_CalcPathFinderIntersectEyeVec), \
|
||||
HLL_EXPORT(IsLoading, ReignEngine_IsLoading), \
|
||||
HLL_TODO_EXPORT(GetDebugInfoMode, ReignEngine_GetDebugInfoMode), \
|
||||
HLL_TODO_EXPORT(SetDebugInfoMode, ReignEngine_SetDebugInfoMode), \
|
||||
@@ -2316,27 +2328,77 @@ HLL_LIBRARY(ReignEngine, REIGN_EXPORTS,
|
||||
HLL_EXPORT(Suspend, TapirEngine_Suspend), \
|
||||
HLL_EXPORT(IsSuspend, TapirEngine_IsSuspend), \
|
||||
HLL_EXPORT(Resume, TapirEngine_Resume), \
|
||||
HLL_TODO_EXPORT(GetNumofPlugin, TapirEngine_GetNumofPlugin), \
|
||||
HLL_TODO_EXPORT(IsExistPlugin, TapirEngine_IsExistPlugin), \
|
||||
HLL_EXPORT(GetNumofPlugin, TapirEngine_GetNumofPlugin), \
|
||||
HLL_EXPORT(IsExistPlugin, TapirEngine_IsExistPlugin), \
|
||||
HLL_TODO_EXPORT(GetNumofInstance, TapirEngine_GetNumofInstance)
|
||||
|
||||
HLL_LIBRARY(TapirEngine, REIGN_EXPORTS, TAPIR_EXPORTS);
|
||||
|
||||
HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
static void SealEngine_SetMagSpeed(int mag_speed)
|
||||
{
|
||||
for (int i = 0; i < RE_MAX_PLUGINS; i++) {
|
||||
if (plugins[i])
|
||||
plugins[i]->mag_speed = mag_speed;
|
||||
}
|
||||
}
|
||||
//bool SealEngine_SaveInstance(int PluginNumber, int InstanceNumber, struct string *FileName);
|
||||
//bool SealEngine_IsExistInstanceData(int PluginNumber, int InstanceNumber, struct string *FileName);
|
||||
|
||||
static bool SealEngine_IsExistInstanceData(int plugin, int instance, struct string *filename)
|
||||
{
|
||||
return RE_instance_data_exists(get_instance(plugin, instance), filename->text);
|
||||
}
|
||||
|
||||
//bool SealEngine_GetInstanceName(int PluginNumber, int InstanceNumber, struct string **pIName);
|
||||
//bool SealEngine_GetInstancePos(int PluginNumber, int InstanceNumber, float *pX, float *pY, float *pZ);
|
||||
//bool SealEngine_GetInstanceAngle(int PluginNumber, int InstanceNumber, float *pAngle);
|
||||
//bool SealEngine_GetInstanceAngleP(int PluginNumber, int InstanceNumber, float *pAngleP);
|
||||
//bool SealEngine_GetInstanceAngleB(int PluginNumber, int InstanceNumber, float *pAngleB);
|
||||
|
||||
static bool SealEngine_GetInstanceAngle(int plugin, int instance, float *angle)
|
||||
{
|
||||
struct RE_instance *ri = get_instance(plugin, instance);
|
||||
if (!ri)
|
||||
return false;
|
||||
*angle = -ri->yaw;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool SealEngine_GetInstanceAngleP(int plugin, int instance, float *angle_p)
|
||||
{
|
||||
struct RE_instance *ri = get_instance(plugin, instance);
|
||||
if (!ri)
|
||||
return false;
|
||||
*angle_p = ri->pitch;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool SealEngine_GetInstanceAngleB(int plugin, int instance, float *angle_b)
|
||||
{
|
||||
struct RE_instance *ri = get_instance(plugin, instance);
|
||||
if (!ri)
|
||||
return false;
|
||||
*angle_b = ri->roll;
|
||||
return true;
|
||||
}
|
||||
|
||||
//bool SealEngine_SetInstanceVertexUV(int PluginNumber, int InstanceNumber, int Index, float U, float V);
|
||||
//bool SealEngine_GetInstanceDiffuse(int PluginNumber, int InstanceNumber, float *pR, float *pG, float *pB);
|
||||
//bool SealEngine_GetInstanceAmbient(int PluginNumber, int InstanceNumber, float *pR, float *pG, float *pB);
|
||||
//bool SealEngine_GetInstanceAlpha(int PluginNumber, int InstanceNumber, float *Alpha);
|
||||
|
||||
static bool SealEngine_GetInstanceAlpha(int plugin, int instance, float *alpha)
|
||||
{
|
||||
struct RE_instance *ri = get_instance(plugin, instance);
|
||||
if (!ri)
|
||||
return false;
|
||||
*alpha = ri->alpha;
|
||||
return true;
|
||||
}
|
||||
|
||||
//bool SealEngine_SetInstanceGrayscaleRate(int PluginNumber, int InstanceNumber, float GrayscaleRate);
|
||||
//bool SealEngine_GetInstanceGrayscaleRate(int PluginNumber, int InstanceNumber, float *GrayscaleRate);
|
||||
//bool SealEngine_IsExistInstanceMotion(int PluginNumber, int InstanceNumber, struct string *MotionName);
|
||||
|
||||
static bool SealEngine_IsExistInstanceMotion(int plugin, int instance, struct string *motion_name)
|
||||
{
|
||||
return RE_instance_motion_exists(get_instance(plugin, instance), motion_name->text);
|
||||
}
|
||||
|
||||
//int SealEngine_GetInstanceNumofBone(int PluginNumber, int InstanceNumber);
|
||||
//bool SealEngine_GetInstanceBoneName(int PluginNumber, int InstanceNumber, int BoneIndex, struct string **pIName);
|
||||
//bool SealEngine_GetInstanceBoneParentIndex(int PluginNumber, int InstanceNumber, int BoneIndex, int *pParentBoneIndex);
|
||||
@@ -2377,12 +2439,24 @@ HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
//bool SealEngine_IsInstanceMeshAlphaBlending(int PluginNumber, int InstanceNumber, int MeshNumber);
|
||||
//bool SealEngine_ClearLineList(int PluginNumber, int InstanceNumber);
|
||||
//bool SealEngine_AddLineList(int PluginNumber, int InstanceNumber, float X0, float Y0, float Z0, int Color0, float X1, float Y1, float Z1, int Color1);
|
||||
//bool SealEngine_SetInstanceCircleShadowRadius(int PluginNumber, int InstanceNumber, float CircleShadowRadius);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetInstanceCircleShadowRadius, int PluginNumber, int InstanceNumber, float CircleShadowRadius);
|
||||
//float SealEngine_GetInstanceCircleShadowRadius(int PluginNumber, int InstanceNumber);
|
||||
//bool SealEngine_LoadInstanceLightParam(int PluginNumber, int InstanceNumber);
|
||||
//bool SealEngine_StoreInstanceLightParam(int PluginNumber, int InstanceNumber);
|
||||
//bool SealEngine_SetInstanceUseMagSpeed(int PluginNumber, int InstanceNumber, bool UseMagSpeed);
|
||||
//bool SealEngine_IsInstanceUseMagSpeed(int PluginNumber, int InstanceNumber);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, StoreInstanceLightParam, int PluginNumber, int InstanceNumber);
|
||||
static bool SealEngine_SetInstanceUseMagSpeed(int plugin, int instance, bool use_mag_speed)
|
||||
{
|
||||
struct RE_instance *ri = get_instance(plugin, instance);
|
||||
if (!ri)
|
||||
return false;
|
||||
ri->use_mag_speed = use_mag_speed;
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool SealEngine_IsInstanceUseMagSpeed(int plugin, int instance)
|
||||
{
|
||||
struct RE_instance *ri = get_instance(plugin, instance);
|
||||
return ri ? ri->use_mag_speed : false;
|
||||
}
|
||||
//bool SealEngine_CreateInstanceDebugBoneList(int PluginNumber, int InstanceNumber, int BoneInstanceNumber, int OnCursorIndex, int SelectedIndex);
|
||||
//bool SealEngine_CreateInstanceDebugBoneCollision(int PluginNumber, int InstanceNumber, int BoneInstanceNumber, int OnCursorIndex, int SelectedIndex);
|
||||
//bool SealEngine_GetCameraPos(int PluginNumber, float *X, float *Y, float *Z);
|
||||
@@ -2391,26 +2465,37 @@ HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
//bool SealEngine_GetCameraAngleB(int PluginNumber, float *AngleB);
|
||||
//bool SealEngine_GetCameraXVector(int PluginNumber, float *X, float *Y, float *Z);
|
||||
//bool SealEngine_GetCameraYVector(int PluginNumber, float *X, float *Y, float *Z);
|
||||
//bool SealEngine_GetCameraZVector(int PluginNumber, float *X, float *Y, float *Z);
|
||||
//bool SealEngine_SetDrawDOF(int PluginNumber, bool DrawDOF);
|
||||
//bool SealEngine_SetDOF_L(int PluginNumber, float DOF_L);
|
||||
//bool SealEngine_SetDOF_F(int PluginNumber, float DOF_F);
|
||||
//bool SealEngine_SetDOF_f(int PluginNumber, float DOF_f);
|
||||
//bool SealEngine_GetDrawDOF(int PluginNumber, bool *DrawDOF);
|
||||
//bool SealEngine_GetDOF_L(int PluginNumber, float *DOF_L);
|
||||
//bool SealEngine_GetDOF_F(int PluginNumber, float *DOF_F);
|
||||
//bool SealEngine_GetDOF_f(int PluginNumber, float *DOF_f);
|
||||
|
||||
static bool SealEngine_GetCameraZVector(int plugin, float *x, float *y, float *z)
|
||||
{
|
||||
vec3 result;
|
||||
if (!RE_plugin_get_camera_z_vector(get_plugin(plugin), result))
|
||||
return false;
|
||||
*x = result[0];
|
||||
*y = result[1];
|
||||
*z = -result[2];
|
||||
return true;
|
||||
}
|
||||
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetDrawDOF, int PluginNumber, bool DrawDOF);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetDOF_L, int PluginNumber, float DOF_L);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetDOF_F, int PluginNumber, float DOF_F);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetDOF_f, int PluginNumber, float DOF_f);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, GetDrawDOF, int PluginNumber, bool *DrawDOF);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, GetDOF_L, int PluginNumber, float *DOF_L);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, GetDOF_F, int PluginNumber, float *DOF_F);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, GetDOF_f, int PluginNumber, float *DOF_f);
|
||||
//bool SealEngine_SetShadowLightVector(int PluginNumber, float X, float Y, float Z);
|
||||
//bool SealEngine_GetShadowLightVector(int PluginNumber, float *X, float *Y, float *Z);
|
||||
//bool SealEngine_SetShadowRate(int PluginNumber, float Rate);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetShadowRate, int PluginNumber, float Rate);
|
||||
//float SealEngine_GetShadowRate(int PluginNumber);
|
||||
//bool SealEngine_SetSoftFogEdgeLength(int PluginNumber, float SoftFogEdgeLength);
|
||||
//float SealEngine_GetSoftFogEdgeLength(int PluginNumber);
|
||||
//bool SealEngine_SetEdgeLength(int PluginNumber, float EdgeLength);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetEdgeLength, int PluginNumber, float EdgeLength);
|
||||
//float SealEngine_GetEdgeLength(int PluginNumber);
|
||||
//bool SealEngine_SetEdgeReductionRate(int PluginNumber, float EdgeReductionRate);
|
||||
//float SealEngine_GetEdgeReductionRate(int PluginNumber);
|
||||
//bool SealEngine_SetEdgeColor(int PluginNumber, float ColorR, float ColorG, float ColorB);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, SetEdgeColor, int PluginNumber, float ColorR, float ColorG, float ColorB);
|
||||
//bool SealEngine_GetEdgeColor(int PluginNumber, float *ColorR, float *ColorG, float *ColorB);
|
||||
//bool SealEngine_Calc2DDetectionHeight(int PluginNumber, float X, float Z, float *Height);
|
||||
//bool SealEngine_Calc2DDetection(int PluginNumber, float X0, float Y0, float Z0, float X1, float Y1, float Z1, float Radius, float *X2, float *Y2, float *Z2);
|
||||
@@ -2418,30 +2503,35 @@ HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
//bool SealEngine_FindPath(int PluginNumber, float StartX, float StartY, float StartZ, float GoalX, float GoalY, float GoalZ);
|
||||
//bool SealEngine_GetPathLine(int PluginNumber, struct page **pIXArray, struct page **pIYArray, struct page **pIZArray);
|
||||
//bool SealEngine_GetOptimizedPathLine(int PluginNumber, struct page **pIXArray, struct page **pIYArray, struct page **pIZArray);
|
||||
//bool SealEngine_TransformPosToViewPos(int PluginNumber, float X, float Y, float Z, int *ViewX, int *ViewY);
|
||||
//bool SealEngine_ResetLightParam(int PluginNumber);
|
||||
|
||||
static bool SealEngine_TransformPosToViewPos(int PluginNumber, float x, float y, float z, int *view_x, int *view_y)
|
||||
{
|
||||
return RE_plugin_transform_pos_to_view_pos(get_plugin(PluginNumber), x, y, -z, view_x, view_y);
|
||||
}
|
||||
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SealEngine, ResetLightParam, int PluginNumber);
|
||||
//bool SealEngine_SetLightParam(int PluginNumber, int Type, float Value);
|
||||
//float SealEngine_GetLightParam(int PluginNumber, int Type);
|
||||
//bool SealEngine_IsThreadLoadingMode(int PluginNumber);
|
||||
HLL_QUIET_UNIMPLEMENTED(false, bool, SealEngine, IsThreadLoadingMode, int PluginNumber);
|
||||
//bool SealEngine_ClearCache(int PluginNumber);
|
||||
//bool SealEngine_GetHistogram(int PluginNumber, struct page **HistogramList);
|
||||
|
||||
#define SEAL_EXPORTS \
|
||||
HLL_EXPORT(SetMagSpeed, SealEngine_SetMagSpeed), \
|
||||
HLL_TODO_EXPORT(SaveInstance, SealEngine_SaveInstance), \
|
||||
HLL_TODO_EXPORT(IsExistInstanceData, SealEngine_IsExistInstanceData), \
|
||||
HLL_EXPORT(IsExistInstanceData, SealEngine_IsExistInstanceData), \
|
||||
HLL_TODO_EXPORT(GetInstanceName, SealEngine_GetInstanceName), \
|
||||
HLL_TODO_EXPORT(GetInstancePos, SealEngine_GetInstancePos), \
|
||||
HLL_TODO_EXPORT(GetInstanceAngle, SealEngine_GetInstanceAngle), \
|
||||
HLL_TODO_EXPORT(GetInstanceAngleP, SealEngine_GetInstanceAngleP), \
|
||||
HLL_TODO_EXPORT(GetInstanceAngleB, SealEngine_GetInstanceAngleB), \
|
||||
HLL_EXPORT(GetInstanceAngle, SealEngine_GetInstanceAngle), \
|
||||
HLL_EXPORT(GetInstanceAngleP, SealEngine_GetInstanceAngleP), \
|
||||
HLL_EXPORT(GetInstanceAngleB, SealEngine_GetInstanceAngleB), \
|
||||
HLL_TODO_EXPORT(SetInstanceVertexUV, SealEngine_SetInstanceVertexUV), \
|
||||
HLL_TODO_EXPORT(GetInstanceDiffuse, SealEngine_GetInstanceDiffuse), \
|
||||
HLL_TODO_EXPORT(GetInstanceAmbient, SealEngine_GetInstanceAmbient), \
|
||||
HLL_TODO_EXPORT(GetInstanceAlpha, SealEngine_GetInstanceAlpha), \
|
||||
HLL_EXPORT(GetInstanceAlpha, SealEngine_GetInstanceAlpha), \
|
||||
HLL_TODO_EXPORT(SetInstanceGrayscaleRate, SealEngine_SetInstanceGrayscaleRate), \
|
||||
HLL_TODO_EXPORT(GetInstanceGrayscaleRate, SealEngine_GetInstanceGrayscaleRate), \
|
||||
HLL_TODO_EXPORT(IsExistInstanceMotion, SealEngine_IsExistInstanceMotion), \
|
||||
HLL_EXPORT(IsExistInstanceMotion, SealEngine_IsExistInstanceMotion), \
|
||||
HLL_TODO_EXPORT(GetInstanceNumofBone, SealEngine_GetInstanceNumofBone), \
|
||||
HLL_TODO_EXPORT(GetInstanceBoneName, SealEngine_GetInstanceBoneName), \
|
||||
HLL_TODO_EXPORT(GetInstanceBoneParentIndex, SealEngine_GetInstanceBoneParentIndex), \
|
||||
@@ -2482,12 +2572,12 @@ HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
HLL_TODO_EXPORT(IsInstanceMeshAlphaBlending, SealEngine_IsInstanceMeshAlphaBlending), \
|
||||
HLL_TODO_EXPORT(ClearLineList, SealEngine_ClearLineList), \
|
||||
HLL_TODO_EXPORT(AddLineList, SealEngine_AddLineList), \
|
||||
HLL_TODO_EXPORT(SetInstanceCircleShadowRadius, SealEngine_SetInstanceCircleShadowRadius), \
|
||||
HLL_EXPORT(SetInstanceCircleShadowRadius, SealEngine_SetInstanceCircleShadowRadius), \
|
||||
HLL_TODO_EXPORT(GetInstanceCircleShadowRadius, SealEngine_GetInstanceCircleShadowRadius), \
|
||||
HLL_TODO_EXPORT(LoadInstanceLightParam, SealEngine_LoadInstanceLightParam), \
|
||||
HLL_TODO_EXPORT(StoreInstanceLightParam, SealEngine_StoreInstanceLightParam), \
|
||||
HLL_TODO_EXPORT(SetInstanceUseMagSpeed, SealEngine_SetInstanceUseMagSpeed), \
|
||||
HLL_TODO_EXPORT(IsInstanceUseMagSpeed, SealEngine_IsInstanceUseMagSpeed), \
|
||||
HLL_EXPORT(StoreInstanceLightParam, SealEngine_StoreInstanceLightParam), \
|
||||
HLL_EXPORT(SetInstanceUseMagSpeed, SealEngine_SetInstanceUseMagSpeed), \
|
||||
HLL_EXPORT(IsInstanceUseMagSpeed, SealEngine_IsInstanceUseMagSpeed), \
|
||||
HLL_TODO_EXPORT(CreateInstanceDebugBoneList, SealEngine_CreateInstanceDebugBoneList), \
|
||||
HLL_TODO_EXPORT(CreateInstanceDebugBoneCollision, SealEngine_CreateInstanceDebugBoneCollision), \
|
||||
HLL_TODO_EXPORT(GetCameraPos, SealEngine_GetCameraPos), \
|
||||
@@ -2496,26 +2586,26 @@ HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
HLL_TODO_EXPORT(GetCameraAngleB, SealEngine_GetCameraAngleB), \
|
||||
HLL_TODO_EXPORT(GetCameraXVector, SealEngine_GetCameraXVector), \
|
||||
HLL_TODO_EXPORT(GetCameraYVector, SealEngine_GetCameraYVector), \
|
||||
HLL_TODO_EXPORT(GetCameraZVector, SealEngine_GetCameraZVector), \
|
||||
HLL_TODO_EXPORT(SetDrawDOF, SealEngine_SetDrawDOF), \
|
||||
HLL_TODO_EXPORT(SetDOF_L, SealEngine_SetDOF_L), \
|
||||
HLL_TODO_EXPORT(SetDOF_F, SealEngine_SetDOF_F), \
|
||||
HLL_TODO_EXPORT(SetDOF_f, SealEngine_SetDOF_f), \
|
||||
HLL_TODO_EXPORT(GetDrawDOF, SealEngine_GetDrawDOF), \
|
||||
HLL_TODO_EXPORT(GetDOF_L, SealEngine_GetDOF_L), \
|
||||
HLL_TODO_EXPORT(GetDOF_F, SealEngine_GetDOF_F), \
|
||||
HLL_TODO_EXPORT(GetDOF_f, SealEngine_GetDOF_f), \
|
||||
HLL_EXPORT(GetCameraZVector, SealEngine_GetCameraZVector), \
|
||||
HLL_EXPORT(SetDrawDOF, SealEngine_SetDrawDOF), \
|
||||
HLL_EXPORT(SetDOF_L, SealEngine_SetDOF_L), \
|
||||
HLL_EXPORT(SetDOF_F, SealEngine_SetDOF_F), \
|
||||
HLL_EXPORT(SetDOF_f, SealEngine_SetDOF_f), \
|
||||
HLL_EXPORT(GetDrawDOF, SealEngine_GetDrawDOF), \
|
||||
HLL_EXPORT(GetDOF_L, SealEngine_GetDOF_L), \
|
||||
HLL_EXPORT(GetDOF_F, SealEngine_GetDOF_F), \
|
||||
HLL_EXPORT(GetDOF_f, SealEngine_GetDOF_f), \
|
||||
HLL_TODO_EXPORT(SetShadowLightVector, SealEngine_SetShadowLightVector), \
|
||||
HLL_TODO_EXPORT(GetShadowLightVector, SealEngine_GetShadowLightVector), \
|
||||
HLL_TODO_EXPORT(SetShadowRate, SealEngine_SetShadowRate), \
|
||||
HLL_EXPORT(SetShadowRate, SealEngine_SetShadowRate), \
|
||||
HLL_TODO_EXPORT(GetShadowRate, SealEngine_GetShadowRate), \
|
||||
HLL_TODO_EXPORT(SetSoftFogEdgeLength, SealEngine_SetSoftFogEdgeLength), \
|
||||
HLL_TODO_EXPORT(GetSoftFogEdgeLength, SealEngine_GetSoftFogEdgeLength), \
|
||||
HLL_TODO_EXPORT(SetEdgeLength, SealEngine_SetEdgeLength), \
|
||||
HLL_EXPORT(SetEdgeLength, SealEngine_SetEdgeLength), \
|
||||
HLL_TODO_EXPORT(GetEdgeLength, SealEngine_GetEdgeLength), \
|
||||
HLL_TODO_EXPORT(SetEdgeReductionRate, SealEngine_SetEdgeReductionRate), \
|
||||
HLL_TODO_EXPORT(GetEdgeReductionRate, SealEngine_GetEdgeReductionRate), \
|
||||
HLL_TODO_EXPORT(SetEdgeColor, SealEngine_SetEdgeColor), \
|
||||
HLL_EXPORT(SetEdgeColor, SealEngine_SetEdgeColor), \
|
||||
HLL_TODO_EXPORT(GetEdgeColor, SealEngine_GetEdgeColor), \
|
||||
HLL_TODO_EXPORT(Calc2DDetectionHeight, SealEngine_Calc2DDetectionHeight), \
|
||||
HLL_TODO_EXPORT(Calc2DDetection, SealEngine_Calc2DDetection), \
|
||||
@@ -2523,11 +2613,11 @@ HLL_QUIET_UNIMPLEMENTED(, void, SealEngine, SetMagSpeed, int MagSpeed);
|
||||
HLL_TODO_EXPORT(FindPath, SealEngine_FindPath), \
|
||||
HLL_TODO_EXPORT(GetPathLine, SealEngine_GetPathLine), \
|
||||
HLL_TODO_EXPORT(GetOptimizedPathLine, SealEngine_GetOptimizedPathLine), \
|
||||
HLL_TODO_EXPORT(TransformPosToViewPos, SealEngine_TransformPosToViewPos), \
|
||||
HLL_TODO_EXPORT(ResetLightParam, SealEngine_ResetLightParam), \
|
||||
HLL_EXPORT(TransformPosToViewPos, SealEngine_TransformPosToViewPos), \
|
||||
HLL_EXPORT(ResetLightParam, SealEngine_ResetLightParam), \
|
||||
HLL_TODO_EXPORT(SetLightParam, SealEngine_SetLightParam), \
|
||||
HLL_TODO_EXPORT(GetLightParam, SealEngine_GetLightParam), \
|
||||
HLL_TODO_EXPORT(IsThreadLoadingMode, SealEngine_IsThreadLoadingMode), \
|
||||
HLL_EXPORT(IsThreadLoadingMode, SealEngine_IsThreadLoadingMode), \
|
||||
HLL_TODO_EXPORT(ClearCache, SealEngine_ClearCache), \
|
||||
HLL_TODO_EXPORT(GetHistogram, SealEngine_GetHistogram)
|
||||
|
||||
|
||||
@@ -111,6 +111,8 @@ static bool SystemService_SetHideMouseCursorByGame(bool hide)
|
||||
//bool SystemService_GetHideMouseCursorByGame(void);
|
||||
HLL_WARN_UNIMPLEMENTED(false, bool, SystemService, SetUsePower2Texture, bool use);
|
||||
//bool SystemService_GetUsePower2Texture(void);
|
||||
HLL_WARN_UNIMPLEMENTED(true, bool, SystemService, SetAntiAliasingMode, int mode);
|
||||
//int SystemService_GetAntiAliasingMode(void);
|
||||
|
||||
enum window_settings_asect_ratio {
|
||||
ASPECT_RATIO_NORMAL,
|
||||
@@ -441,6 +443,8 @@ HLL_LIBRARY(SystemService,
|
||||
HLL_TODO_EXPORT(GetHideMouseCursorByGame, SystemService_GetHideMouseCursorByGame),
|
||||
HLL_EXPORT(SetUsePower2Texture, SystemService_SetUsePower2Texture),
|
||||
HLL_TODO_EXPORT(GetUsePower2Texture, SystemService_GetUsePower2Texture),
|
||||
HLL_EXPORT(SetAntiAliasingMode, SystemService_SetAntiAliasingMode),
|
||||
HLL_TODO_EXPORT(GetAntiAliasingMode, SystemService_GetAntiAliasingMode),
|
||||
HLL_EXPORT(SetWindowSetting, SystemService_SetWindowSetting),
|
||||
HLL_EXPORT(GetWindowSetting, SystemService_GetWindowSetting),
|
||||
HLL_EXPORT(SetMouseCursorConfig, SystemService_SetMouseCursorConfig),
|
||||
|
||||
Reference in New Issue
Block a user