Wchris Posted January 21, 2010 Share Posted January 21, 2010 File Name: Delphi/Pascal/Purebasic Header generator File Submitter: Wchris File Submitted: 21 Jan 2010 File Updated: 25 Sep 2010 File Category: Tools and Utilities This tool generates object pascal or purebasic headers from original C++ engine.h header. I just updated and enhanced it, the original version was written by Lupin. Source code included Last update 25 September 2010 Beta support for purebasic in progress, please follow this thread for more information http://leadwerks.com/werkspace/index.php?/topic/2724-purebasic-import-1st-try/page__pid__25457__st__20#entry25457 Click here to download this file Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
ZeroByte Posted January 22, 2010 Share Posted January 22, 2010 Thank's Wchris, just tried it, work's great. Quote Win 7 64, LE 2.31, Liquid Cooled I7-960 @ 4.00GHz, 6GB DDR3 Ram @ 1600mhz, BFG GTX295, Sound Blaster X-FI. Link to comment Share on other sites More sharing options...
Wchris Posted January 26, 2010 Author Share Posted January 26, 2010 Thank's Wchris, just tried it, work's great. Hello Zerobyte, happy to see you again don't forget to try this http://leadwerks.com/werkspace/index.php?app=downloads&showfile=87 it'll show you how to enable Framework and Lua. Have fun ! Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
kratrest Posted September 3, 2010 Share Posted September 3, 2010 The Delphi header conversion does not define const_str. I do not know how to define it. Quote Link to comment Share on other sites More sharing options...
Ywa Posted September 3, 2010 Share Posted September 3, 2010 Replace the content of 'Templates\PascalTypes.txt' with this: BP=Pointer byte=Pointer float=Single flt=Single int=Integer long=Integer str=PAnsiChar const_str=AnsiString short int=Smallint unsigned char=Byte That should make it compilable on Delphi. Quote Link to comment Share on other sites More sharing options...
Wchris Posted September 4, 2010 Author Share Posted September 4, 2010 The Delphi header conversion does not define const_str. I do not know how to define it. additionnaly to what Ywa suggested, i would also recpmmend to allways use Ansistring datatype instead of string (http://www.codexterity.com/delphistrings.htm) There is also a project option parameter called "huge stings" i would recommend to check. Leadwerks is not compatible with delphi short strings (like string[25]) or unicode strings (delphi 2009 and 2010 defaults to unicode), only long strings like ansistring (or PansiChar pointers) are compatible. (Many Thanks to Lumooja who added const_str to the C++ headers, because Ansistring is only compatible in read only mode.) It's really great to be able to use AnsiString instead of PansiChar. and Welcome Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
kratrest Posted September 11, 2010 Share Posted September 11, 2010 additionnaly to what Ywa suggested, i would also recpmmend to allways use Ansistring datatype instead of string (http://www.codexterity.com/delphistrings.htm) There is also a project option parameter called "huge stings" i would recommend to check. Leadwerks is not compatible with delphi short strings (like string[25]) or unicode strings (delphi 2009 and 2010 defaults to unicode), only long strings like ansistring (or PansiChar pointers) are compatible. (Many Thanks to Lumooja who added const_str to the C++ headers, because Ansistring is only compatible in read only mode.) It's really great to be able to use AnsiString instead of PansiChar. and Welcome Thanks for the new header generator. I no longer get the const_str error. I am now getter an access error to the engine.dll. I am still trying to figure it out. I must be doing something wrong. If I comment the following lines out of the leadwerks.pas file I at least get a window to open up: LEPositionEntity (entity, position, global); Result := LECreateSpotLight (range, parent); LERotateEntity (entity, angle, global); Result := LELoadMaterial (name); Result := LECreateCube (parent); LEPaintEntity (entity, material, recursive); LEScaleEntity (entity, scale); Result := LECreateDirectionalLight (parent); LETurnEntity (entity, angle, global); LEUpdateFramework; Quote Link to comment Share on other sites More sharing options...
kratrest Posted September 11, 2010 Share Posted September 11, 2010 Thanks for the new header generator. I no longer get the const_str error. I am now getter an access error to the engine.dll. I am still trying to figure it out. I must be doing something wrong. If I comment the following lines out of the leadwerks.pas file I at least get a window to open up: LEPositionEntity (entity, position, global); Result := LECreateSpotLight (range, parent); LERotateEntity (entity, angle, global); Result := LELoadMaterial (name); Result := LECreateCube (parent); LEPaintEntity (entity, material, recursive); LEScaleEntity (entity, scale); Result := LECreateDirectionalLight (parent); LETurnEntity (entity, angle, global); LEUpdateFramework; Quote Link to comment Share on other sites More sharing options...
Wchris Posted September 11, 2010 Author Share Posted September 11, 2010 Hi Kratest, your provide no source code, so it's difficult for me to understand what's wrong. what version of delphi do you use ? have you tryed this example http://leadwerks.com/werkspace/index.php?/files/file/87-simple-frawewerk-lua-sample/ if not, can you try it (with the complete header) and tell me if it works with the header you generated ? Quote Windows 7 home - 32 bits Intel Quad Q6600 - nVidia GTX 460 1GB - 2 GB RAM Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.