map220v / LawnCPP

Plants vs. Zombies C++
5 stars 1 forks source link

What should I do before running it in order to run the code? #1

Open Wegorfrank opened 9 months ago

Wegorfrank commented 9 months ago

For instance,should I place the pak files or updating visualt studio to a definite version?

Wegorfrank commented 9 months ago

非常感谢你对于代码的分析,但是当我使用VS打开它并且点击运行之后,它会提示一大堆错误。我应当如何做才能解决?

PS:我是直接打开sln文件并运行的,也就是说我没有手动往项目当中添加任何dll或资源文件。

image
map220v commented 9 months ago

I just tested with MSVC 14.38.33130 and SDK 10.0.22621.0 It's should compile without any errors. img

Wegorfrank commented 9 months ago

Thank you.I will try it later.

Wegorfrank commented 9 months ago

After trying to set SDK version,it still failed.My visual studio version is VS2022.17.8.5. I tried to upload a screen recording to record how I failed,but on github it is impossible to upload a video larger than 10MB. Could you tell me how to solve it in detail? It will be much to my appreciation if I could receive any help from you and anyone.

image image image
Wegorfrank commented 9 months ago

After modifying the corresponding files,such as reformatting them and changing the include paths,it can be compiled.However,I am always informed of the ack of resources.xml while I had already placed the properties/resources.xml file.What should I do?

image image
map220v commented 9 months ago

Try running it with these resources LawnAssets.zip

Wegorfrank commented 9 months ago

Actually errors still existed.

ERR 资源

So could you tell me where should I place the LawnAssets files at in order to run it properly?Thanks very much.

I was busy from 3 weeks ago to now so I did not continue with the issue,but now I have time to continue with it.

map220v commented 9 months ago

Resources should be in LawnCPP\Release or LawnCPP\Debug. It seems that Debug build can't read main.pak properly so try running Release build or use these assets without main.pak

Wegorfrank commented 9 months ago

Thanks very much and I will try it later.Maybe reply you after tomorrow. because I am still a bit busy these days.

Wegorfrank commented 8 months ago

It is much to my pity that it still failedn to run properly even with releases version.However,thanks very much for the annotations you added to code.I can analyse the assembly code of plantsvszombies under the help of your C++ code.

map220v commented 8 months ago

This change should fix running game from Visual Studio https://github.com/map220v/LawnCPP/commit/68e97574edea6d8a0cea2bcf57b50217d65a73ea Also if Debug build asserts here, try recompiling this file with Ctrl + F7

Wegorfrank commented 8 months ago

Thank you for the update. The error "Resource file not found: properties/resources. xml" will no longer appear in the new version. A still existing issue is that if I run in Debug mode, the program will freeze on the "Popcap" interface and will not continue to enter the subsequent game interface. If I manually locate the Debug/LawnProjectexe file in the File Explorer and double-click to open it, it is possible that the above error will not occur, or it may crash after the Popcap interface. I hope to be able to use Debug mode to run debugging programs in VS normally without experiencing any lag. I would like to express my gratitude again for your update.

感谢更新,在新的版本中不再会出现“Resource file not found:properties/resources.xml”的错误了。 仍然存在的一个问题是,如果我使用Debug模式运行,那么程序会在"Popcap"界面卡死并不会再继续进入到之后的游戏界面。 crash

如果我手动在文件资源管理器中找到Debug/LawnProject.exe文件并手动双击打开则有可能不会出现上述的错误,也有可能会在"Popcap"界面之后闪退。 我希望自己能够正常的使用Debug模式在VS中运行调试程序,而不出现卡死的现象。

我再次向你的更新表示感谢。

Wegorfrank commented 8 months ago

I feel sorry that I did not read the message of your updation carefully.The progeam really asserted here, image

However,even after I recompiled the file with Ctrl+F7,it still failed. Because in github Issues I can only upload a file smaller than 10M,so I created a seperate repository to give you the corresponding screen recording:https://github.com/Wegorfrank/Crash Thanks a lot for your reply.