Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

正在学Rust,应该怎么编译工程 #7

Closed
pengyz opened this issue May 7, 2020 · 6 comments
Closed

正在学Rust,应该怎么编译工程 #7

pengyz opened this issue May 7, 2020 · 6 comments

Comments

@pengyz
Copy link
Contributor

pengyz commented May 7, 2020

按照README中给的步骤编译报错,提示找不到,Cargo.toml,而且openpal3目录里都是C#代码,rust代码不在里面。
Demo工程是哪个?怎么编译?

@dontpanic92
Copy link
Owner

更新了一下 Readme
另外编译完之后需要把 cpk 解压出来,大概是这样的结构
图片

然后在 openpal3.toml 里面把 asset_path 更新成这个目录

@pengyz
Copy link
Contributor Author

pengyz commented May 8, 2020

感谢回复,等会儿我试一下

@pengyz
Copy link
Contributor Author

pengyz commented May 8, 2020

已经可以运行了,但是控制台有报错,unknown_data_count 这个是模型文件解析代码还不完善的问题吗?

@dontpanic92
Copy link
Owner

嗯,控制台是随意输出的log,之前有想检查一下那些没解析的字段就打出来了

@pengyz
Copy link
Contributor Author

pengyz commented May 9, 2020

我这里CG播放一小段后会卡住,现在就是这样的吗?我看到控制台有报错。
能指点一下整个工程怎么调试吗?C#和rust混合的项目 开发环境怎么配置 我配了VSCode,但是好像不管用,rust的异常断不下来。
我只会C++,项目我简单看了一下 openpal3是个空壳子,里面主要是C#调用COM相关的代码?是不是主要逻辑都在openbg里,它是bgengine的rust开源实现?

@dontpanic92
Copy link
Owner

dontpanic92 commented May 9, 2020

嗯,现在就只实现了那一小段剧情动画。加了 C# 之后我还没调试过,之前纯 rust 的时候,用 msvc toolchain 编译后挂上 VS 就可以调试了。

openpal3 现在就是空壳子,计划是之后会放跟游戏逻辑有关的部分,比如人物数据/战斗场景之类的。用 C# 做脚本其实现在还处于实验性质的阶段,不知道最后效果则么样😂

opengb 里也有一些以前在 PAL3.exe 里的功能,比如读场景什么的,我把这些跟游戏逻辑无关的也挪到 opengb 里面去了

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants