i did it in the pascal header, but i currently don't know how to do it in purebasic. If we find a way to transform procedures that return 1 value into functions, why not. The current syntax in purebasic is : LEEntityPosition(player, playerpos, 0) So i don't understand why purebasic accepts your syntax and does not complain he has nothing to assign to playerpos because the prototype is not a function ? It is declared like this : Prototype LEEntityPosition ( entity.i, *position.TVec3, Globaly.i=0 ) dll procedure into a function and the purebasic header currently doesn't There is an option in purebasic to force variable declarations, maybe you should activate it.Īnd this is wrong : playerpos=LEEntityPosition(player,Vec3(VResult))īecause the C header transforms the engine. playerpos ? why not playerpos\Y ?Īnd what is camery ? this is what happens with languages that are not strict on variable declarations Ok, i'll update the generator to add global before the wrappers Playerpos=LEEntityPosition(player,Vec3(VResult)) LEUpdateController(player,Vec3(VResult, camrotationy.f, camrotationx.f, 0),move,strafe,jumo,0.5) Strafe=LEKeyDown(#KEY_D)-LEKeyDown(#KEY_A) LERotateEntity(camera,Vec3(VResult, camrotationy.f, camrotationx.f, 0)) LEMoveMouse(LEGraphicsWidth()/2,LEGraphicsHeight()/2)Ĭamrotation=LEEntityRotation(camera,Vec3(VResult, mouse_y.f, mouse_x.f, 0)) Mouse_y.f=Curve(LEMouseY()-LEGraphicsHeight()/2,mouse_y.f,6.0) Mouse_x.f=Curve(LEMouseX()-LEGraphicsWidth()/2,mouse_x.f,6.0) While (LEKeyHit(#KEY_ESCAPE)=0) And (LEAppTerminate()=0) try use enableexplecit command in PB.Ģnd: i got a litte problem 2 handle vec3 results. Mybay you can correct this in new headgen version. I now renamed it to framework and all works fine.īut now i got another Problem - if i include i the headgen with xinclude i mmust correct to set the leadwerks.pb variables global - otherwise it crashes. So this "fw" within quotes cannot be changed, it must match the name defined in the engine. "fw" is not a variable, it's leadwerks engine internally predefined name used to link the engine framework to your external variable.
0 Comments
Leave a Reply. |
Details
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |