Implement miscellaneous PartsEngine functions

This commit is contained in:
Nunuhara Cabbage
2023-04-10 21:48:09 -07:00
parent 46f25755c5
commit e4ed459376
5 changed files with 108 additions and 14 deletions
+19
View File
@@ -156,19 +156,38 @@ void PE_AddMotionAlpha_curve(int parts_no, int begin_a, int end_a, int begin_t,
void PE_AddMotionCG_by_index(int parts_no, int begin_cg_no, int nr_cg, int begin_t, int end_t);
void PE_AddMotionHGaugeRate(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t);
void PE_AddMotionHGaugeRate_curve(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionVGaugeRate(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t);
void PE_AddMotionVGaugeRate_curve(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionNumeralNumber(int parts_no, int begin_n, int end_n, int begin_t, int end_t);
void PE_AddMotionNumeralNumber_curve(int parts_no, int begin_n, int end_n, int begin_t,
int end_t, struct string *curve_name);
void PE_AddMotionMagX(int parts_no, float begin, float end, int begin_t, int end_t);
void PE_AddMotionMagX_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionMagY(int parts_no, float begin, float end, int begin_t, int end_t);
void PE_AddMotionMagY_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionRotateX(int parts_no, float begin, float end, int begin_t, int end_t);
void PE_AddMotionRotateX_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionRotateY(int parts_no, float begin, float end, int begin_t, int end_t);
void PE_AddMotionRotateY_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionRotateZ(int parts_no, float begin, float end, int begin_t, int end_t);
void PE_AddMotionRotateZ_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name);
void PE_AddMotionVibrationSize(int parts_no, int begin_w, int begin_h, int begin_t, int end_t);
void PE_AddMotionSound(int sound_no, int begin_t);
void PE_BeginMotion(void);
void PE_EndMotion(void);
void PE_SetMotionTime(int t);
void PE_SeekEndMotion(void);
void PE_UpdateMotionTime(int time, bool skip);
bool PE_IsMotion(void);
int PE_GetMotionEndTime(void);
+11 -11
View File
@@ -158,14 +158,14 @@ HLL_LIBRARY(PartsEngine,
HLL_EXPORT(AddMotionPos, PE_AddMotionPos_curve),
HLL_EXPORT(AddMotionAlpha, PE_AddMotionAlpha_curve),
HLL_TODO_EXPORT(AddMotionCG, PartsEngine_AddMotionCG),
HLL_TODO_EXPORT(AddMotionHGaugeRate, PartsEngine_AddMotionHGaugeRate),
HLL_TODO_EXPORT(AddMotionVGaugeRate, PartsEngine_AddMotionVGaugeRate),
HLL_TODO_EXPORT(AddMotionNumeralNumber, PartsEngine_AddMotionNumeralNumber),
HLL_TODO_EXPORT(AddMotionMagX, PartsEngine_AddMotionMagX),
HLL_TODO_EXPORT(AddMotionMagY, PartsEngine_AddMotionMagY),
HLL_TODO_EXPORT(AddMotionRotateX, PartsEngine_AddMotionRotateX),
HLL_TODO_EXPORT(AddMotionRotateY, PartsEngine_AddMotionRotateY),
HLL_TODO_EXPORT(AddMotionRotateZ, PartsEngine_AddMotionRotateZ),
HLL_EXPORT(AddMotionHGaugeRate, PE_AddMotionHGaugeRate_curve),
HLL_EXPORT(AddMotionVGaugeRate, PE_AddMotionVGaugeRate_curve),
HLL_EXPORT(AddMotionNumeralNumber, PE_AddMotionNumeralNumber_curve),
HLL_EXPORT(AddMotionMagX, PE_AddMotionMagX_curve),
HLL_EXPORT(AddMotionMagY, PE_AddMotionMagY_curve),
HLL_EXPORT(AddMotionRotateX, PE_AddMotionRotateX_curve),
HLL_EXPORT(AddMotionRotateY, PE_AddMotionRotateY_curve),
HLL_EXPORT(AddMotionRotateZ, PE_AddMotionRotateZ_curve),
HLL_EXPORT(AddMotionVibrationSize, PE_AddMotionVibrationSize),
HLL_TODO_EXPORT(AddWholeMotionVibrationSize, PE_AddWholeMotionVibrationSize),
HLL_EXPORT(AddMotionSound, PE_AddMotionSound),
@@ -176,7 +176,7 @@ HLL_LIBRARY(PartsEngine,
HLL_EXPORT(BeginMotion, PE_BeginMotion),
HLL_EXPORT(EndMotion, PE_EndMotion),
HLL_EXPORT(IsMotion, PE_IsMotion),
HLL_TODO_EXPORT(SeekEndMotion, PartsEngine_SeekEndMotion),
HLL_EXPORT(SeekEndMotion, PE_SeekEndMotion),
HLL_EXPORT(UpdateMotionTime, PE_UpdateMotionTime),
HLL_EXPORT(BeginInput, PE_BeginInput),
HLL_EXPORT(EndInput, PE_EndInput),
@@ -193,8 +193,8 @@ HLL_LIBRARY(PartsEngine,
HLL_TODO_EXPORT(SetPartsAlphaClipperPartsNumber, PartsEngine_SetPartsAlphaClipperPartsNumber),
HLL_EXPORT(SetPartsPixelDecide, PE_SetPartsPixelDecide),
HLL_EXPORT(IsCursorIn, PE_IsCursorIn),
HLL_TODO_EXPORT(SetThumbnailReductionSize, PartsEngine_SetThumbnailReductionSize),
HLL_TODO_EXPORT(SetThumbnailMode, PartsEngine_SetThumbnailMode),
HLL_EXPORT(SetThumbnailReductionSize, PE_SetThumbnailReductionSize),
HLL_EXPORT(SetThumbnailMode, PE_SetThumbnailMode),
HLL_EXPORT(Save, PE_Save),
HLL_EXPORT(SaveWithoutHideParts, PE_SaveWithoutHideParts),
HLL_EXPORT(Load, PE_Load)
+66
View File
@@ -274,6 +274,16 @@ void PE_AddMotionHGaugeRate(int parts_no, int begin_numerator, int begin_denomin
motion->end.f = (float)end_numerator / (float)end_denominator;
parts_add_motion(parts, motion);
}
void PE_AddMotionHGaugeRate_curve(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionHGaugeRate(parts_no, begin_numerator, begin_denominator,
end_numerator, end_denominator, begin_t, end_t);
}
void PE_AddMotionVGaugeRate(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t)
{
@@ -284,6 +294,15 @@ void PE_AddMotionVGaugeRate(int parts_no, int begin_numerator, int begin_denomin
parts_add_motion(parts, motion);
}
void PE_AddMotionVGaugeRate_curve(int parts_no, int begin_numerator, int begin_denominator,
int end_numerator, int end_denominator, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionVGaugeRate(parts_no, begin_numerator, begin_denominator,
end_numerator, end_denominator, begin_t, end_t);
}
void PE_AddMotionNumeralNumber(int parts_no, int begin_n, int end_n, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -293,6 +312,13 @@ void PE_AddMotionNumeralNumber(int parts_no, int begin_n, int end_n, int begin_t
parts_add_motion(parts, motion);
}
void PE_AddMotionNumeralNumber_curve(int parts_no, int begin_n, int end_n, int begin_t,
int end_t, struct string *curve_name)
{
// TODO: use curve
PE_AddMotionNumeralNumber(parts_no, begin_n, end_n, begin_t, end_t);
}
void PE_AddMotionMagX(int parts_no, float begin, float end, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -302,6 +328,13 @@ void PE_AddMotionMagX(int parts_no, float begin, float end, int begin_t, int end
parts_add_motion(parts, motion);
}
void PE_AddMotionMagX_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionMagX(parts_no, begin, end, begin_t, end_t);
}
void PE_AddMotionMagY(int parts_no, float begin, float end, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -311,6 +344,13 @@ void PE_AddMotionMagY(int parts_no, float begin, float end, int begin_t, int end
parts_add_motion(parts, motion);
}
void PE_AddMotionMagY_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionMagY(parts_no, begin, end, begin_t, end_t);
}
void PE_AddMotionRotateX(int parts_no, float begin, float end, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -320,6 +360,13 @@ void PE_AddMotionRotateX(int parts_no, float begin, float end, int begin_t, int
parts_add_motion(parts, motion);
}
void PE_AddMotionRotateX_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionRotateX(parts_no, begin, end, begin_t, end_t);
}
void PE_AddMotionRotateY(int parts_no, float begin, float end, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -329,6 +376,13 @@ void PE_AddMotionRotateY(int parts_no, float begin, float end, int begin_t, int
parts_add_motion(parts, motion);
}
void PE_AddMotionRotateY_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionRotateY(parts_no, begin, end, begin_t, end_t);
}
void PE_AddMotionRotateZ(int parts_no, float begin, float end, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -338,6 +392,13 @@ void PE_AddMotionRotateZ(int parts_no, float begin, float end, int begin_t, int
parts_add_motion(parts, motion);
}
void PE_AddMotionRotateZ_curve(int parts_no, float begin, float end, int begin_t, int end_t,
struct string *curve_name)
{
// TODO: use curve
PE_AddMotionRotateZ(parts_no, begin, end, begin_t, end_t);
}
void PE_AddMotionVibrationSize(int parts_no, int begin_w, int begin_h, int begin_t, int end_t)
{
struct parts *parts = parts_get(parts_no);
@@ -400,6 +461,11 @@ void PE_SetMotionTime(int t)
PE_EndMotion();
}
void PE_SeekEndMotion(void)
{
PE_SetMotionTime(motion_end_t - 1);
}
void PE_UpdateMotionTime(int time, possibly_unused bool skip)
{
// TODO: use skip
+11 -2
View File
@@ -1437,8 +1437,17 @@ void PE_SetPartsPixelDecide(int parts_no, bool pixel_decide)
//NOTICE("PE_SetPartsPixelDecide(%d, %s)", parts_no, pixel_decide ? "true" : "false");
}
bool PE_SetThumbnailReductionSize(int ReductionSize);
bool PE_SetThumbnailMode(bool Mode);
bool PE_SetThumbnailReductionSize(int reduction_size)
{
NOTICE("PE_SetThumbnailReductionSize(%d)", reduction_size);
return true;
}
bool PE_SetThumbnailMode(bool mode)
{
NOTICE("PE_SetThumbnailMode(%s)", mode ? "true" : "false");
return true;
}
bool PE_Save(struct page **buffer)
{