chukong / SampleGame-FantasyWarrior3D

A 3D sample game powered by Cocos2d-x v3.8
397 stars 245 forks source link

Compile error: tParticle : undeclared identifier #217

Open iLikeCV opened 6 years ago

iLikeCV commented 6 years ago

Hi, everyone! I am going to convert the lua project into C++ project. I add the BillboardParticleSystem class into my project and build it. I get the error as follow:

1>------ Build started: Project: FantasyWarrior3D, Configuration: Debug Win32 ------ 1>BillboardParticleSystem.cpp 1>d:\mobile\projects\cocos2dx\3.17\fantasywarrior3d\classes\billboardparticlesystem.cpp(1163): error C2065: 'tParticle': undeclared identifier 1>Done building project "FantasyWarrior3D.vcxproj" -- FAILED. ========== Build: 0 succeeded, 1 failed, 5 up-to-date, 0 skipped ==========

The error was in setTotalParticles method of BillboardParticleSystem class. In detail, size_t particlesSize = tp * sizeof(tParticle);

Please help me. Thanks.

iLikeCV commented 6 years ago

Hi. I changed the code as follows: size_t particlesSize = tp * sizeof(sBillboardParticle); Is it right?

georgeraraujo commented 6 years ago

Hi. I changed the code as follows: size_t particlesSize = tp * sizeof(sBillboardParticle); Is it right?

I think it is - that's what I did on PR #216, and it works.