![]() ![]() 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. CLSID for the relevant gdi+ encoder parameter.ĭata.b $9C, $DD, $5D, $B3, $51, $05, $E7, $EBĭebug GdipSaveImageToJpeg("test.bmp", "test.jpg", 0) Compression = 0 for max compression, 100 for : your system will have the gdiplus.dll for sure."fw" is not a variable, it's leadwerks engine internally predefined name used to link the engine framework to your external variable. \Parameter\Value = GdipSaveImageToFile(image, destinationFile$, ?clsid_jpeg, encParams) = #GDIPLUS_OKĭata.b $9A, $73, $00, $00, $F8, $1E, $F3, $2E \Parameter\Type = #EncoderParameterValueTypeLong If GdipCreateBitmapFromFile(sourceFile$, = #GDIPLUS_OKĬopyMemory(?clsid_EncoderQuality, SizeOf(GUID)) Protected input.GdiplusStartupInput, encParams.EncoderParameters Procedure.l GdipSaveImageToJpeg(sourceFile$, destinationFile$, compression.l=100) Compression = 0 for max compression, 100 for least. GdipSaveImageToFile(image, filename.p-unicode, *clsidEncoder.CLSID, *encoderParams) GdipCreateBitmapFromFile(filename.p-unicode, *bitmap) GdiplusStartup(token, *input.GdiplusStartupInput, output) The following two structures are used for setting encoder parameters (in our case the 'quality' parameter). #EncoderParameterValueTypeRationalRange = 8 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |