Implement playable Mac client and rendering validation
This commit is contained in:
@@ -104,6 +104,11 @@ bool parse_msa(const std::string& text, Msa& out, std::string* err) {
|
||||
e.start_time = ev.num("StartingTime");
|
||||
e.effect_file = ev.str("EffectFileName");
|
||||
e.sound_file = ev.str("SoundFileName");
|
||||
e.attaching_bone = ev.str("AttachingBoneName");
|
||||
e.attaching = ev.inum("AttachingEnable") != 0;
|
||||
e.following = ev.inum("FollowingEnable") != 0;
|
||||
e.independent = ev.inum("IndependentFlag") != 0;
|
||||
e.fishing_effect = ev.inum("FishingEffectFlag") != 0;
|
||||
vec3(ev.find("EffectPosition"), e.position);
|
||||
out.events.push_back(std::move(e));
|
||||
}
|
||||
@@ -130,6 +135,11 @@ bool parse_msa_file(const std::string& path, Msa& out, std::string* err) {
|
||||
e.start_time = ev.num("StartingTime");
|
||||
e.effect_file = ev.str("EffectFileName");
|
||||
e.sound_file = ev.str("SoundFileName");
|
||||
e.attaching_bone = ev.str("AttachingBoneName");
|
||||
e.attaching = ev.inum("AttachingEnable") != 0;
|
||||
e.following = ev.inum("FollowingEnable") != 0;
|
||||
e.independent = ev.inum("IndependentFlag") != 0;
|
||||
e.fishing_effect = ev.inum("FishingEffectFlag") != 0;
|
||||
vec3(ev.find("EffectPosition"), e.position);
|
||||
out.events.push_back(std::move(e));
|
||||
}
|
||||
|
||||
@@ -10,6 +10,11 @@ struct MotionEvent {
|
||||
float start_time = 0; // StartingTime
|
||||
std::string effect_file; // EffectFileName(type 10)
|
||||
std::string sound_file; // SoundFileName
|
||||
std::string attaching_bone;
|
||||
bool attaching = false;
|
||||
bool following = false;
|
||||
bool independent = false;
|
||||
bool fishing_effect = false;
|
||||
float position[3] = {0, 0, 0};
|
||||
};
|
||||
|
||||
|
||||
@@ -4,6 +4,9 @@
|
||||
// 里(`m2dev-client-src-main/extern/library/SpeedTree/speedtree_static.lib`,实测 COFF x86-64,
|
||||
// IDV 专有,不能链进 macOS/移动端、不可随意分发);`SpeedTreeLib/` 是渲染 wrapper,不含 parser。
|
||||
// → 运行时使用读取真实 bark/composite atlas 的 proxy;真几何走经授权的 Windows x64 离线 exporter。
|
||||
// 2026-09-11: hash-matched native exports for 87 local species are now staged in
|
||||
// assets/TreeGeometry and loaded preferentially by the runtime. This sniffer
|
||||
// remains only the fallback texture reader, not a geometry decoder.
|
||||
//
|
||||
// 这里只做「嗅探」:读文件头 magic + version,抽取内嵌贴图和 composite atlas token。
|
||||
// 不解析枝干/叶片几何。无 godot 依赖。
|
||||
|
||||
@@ -5,6 +5,32 @@
|
||||
#include <string>
|
||||
|
||||
int main() {
|
||||
{
|
||||
fmt::Msa effects;
|
||||
std::string error;
|
||||
if (!fmt::parse_msa(R"(MotionFileName "test.gr2"
|
||||
Group MotionEventData
|
||||
{
|
||||
Group Event00
|
||||
{
|
||||
MotionEventType 1
|
||||
StartingTime 0.25
|
||||
EffectFileName "d:/ymir work/pc/test.mse"
|
||||
AttachingBoneName "equip_right_hand"
|
||||
AttachingEnable 1
|
||||
FollowingEnable 1
|
||||
IndependentFlag 1
|
||||
EffectPosition 10 20 30
|
||||
}
|
||||
}
|
||||
)", effects, &error) || effects.events.size() != 1 ||
|
||||
!effects.events[0].attaching || !effects.events[0].following ||
|
||||
!effects.events[0].independent || effects.events[0].attaching_bone != "equip_right_hand" ||
|
||||
effects.events[0].position[2] != 30) {
|
||||
std::fprintf(stderr, "effect attachment metadata lost\n");
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
const std::string text = R"(
|
||||
ScriptType MotionData
|
||||
MotionFileName "d:/ymir work/pc/test.gr2"
|
||||
|
||||
Reference in New Issue
Block a user