From 678393ccb1b9db5f2bd98461423a6df3fce81a12 Mon Sep 17 00:00:00 2001 From: Epicalert Date: Fri, 12 Nov 2021 20:12:06 +0800 Subject: [PATCH] Clean up model format version Commit 09c60db8 should have incrememnted the model format version but didn't. Also added "since version x.x" in the model format docs. --- docs/model-format.man | 30 +++++++++++++++++++++++++++++- models/default/model.toml | 2 +- models/test/model.toml | 2 +- src/model.cpp | 2 +- 4 files changed, 32 insertions(+), 4 deletions(-) diff --git a/docs/model-format.man b/docs/model-format.man index e7d29c3..51636e2 100644 --- a/docs/model-format.man +++ b/docs/model-format.man @@ -1,4 +1,4 @@ -.TH FC2D_MODEL 5 "Facecam2D Model Format 0.3 Manual" +.TH FC2D_MODEL 5 "Facecam2D Model Format 0.4 Manual" . .SH NAME fc2d_model \- Facecam2D model file format @@ -133,24 +133,52 @@ If negative, the part will move in the opposite direction. . .TP rot_factor, scale_factor +.ft B +(Since version 0.2) +.ft Float: How much the part will rotate/scale. Default is 1.0. Higher values result in more exaggerated rotation or scaling. . .TP +offset_factor +.ft B +(Since version 0.4) +.ft +float: How much the part will be moved by the offset bind. +See +.B offset_bind. +. +.TP origin +.ft B +(Since version 0.3) +.ft Float Array: Origin (pivot point) of the model defined in normalized coordinates. Default is [0.0, 0.0]. . .TP pos_offset, scale_offset +.ft B +(Since version 0.3) +.ft Float Array: Positional offset or scale of a part. Default is [0.0, 0.0] for .B pos_offset and [1.0, 1.0] for .B scale_offset. . +.TP +offset_bind +.ft B +(Since version 0.4) +.ft +String: Offsets are vectors instead of actual points on the image. +You can bind to an offset with this property, which will +offset the part's position according to the vector. +Possible values: offset-eyes +. .SS textures .TP file diff --git a/models/default/model.toml b/models/default/model.toml index 8a19991..9d92b97 100644 --- a/models/default/model.toml +++ b/models/default/model.toml @@ -1,6 +1,6 @@ [format] version_major = 0 -version_minor = 3 +version_minor = 4 [model_info] name = "Default-chan" diff --git a/models/test/model.toml b/models/test/model.toml index 6338d35..8f1ae7e 100644 --- a/models/test/model.toml +++ b/models/test/model.toml @@ -1,6 +1,6 @@ [format] version_major = 0 -version_minor = 1 +version_minor = 4 [model_info] name = "Test Model" diff --git a/src/model.cpp b/src/model.cpp index de0ba3f..1789a57 100644 --- a/src/model.cpp +++ b/src/model.cpp @@ -12,7 +12,7 @@ #define BUFFER_SIZE_TEXTURE 16777220 // 16 MiB #define SUPPORTED_MODEL_MAJOR 0 -#define SUPPORTED_MODEL_MINOR 3 +#define SUPPORTED_MODEL_MINOR 4 void textureFromArchive(zip_t* archive, const char* path, ModelPart* part, size_t slot, std::string triggerName) { zip_file_t* textureFile = zip_fopen(archive, path, 0);