Page 3 of 3 FirstFirst 123
Results 21 to 24 of 24

Thread: Tilengine 2D Pascal Wrapper!

  1. #21
    Quote Originally Posted by Thyandyr View Post
    //  load layer (tileset + tilemap)
    //      tileset = TLN_LoadTileset ("Sonic_md_bg1.tsx");
      tileset := uTileEngine.LoadTileset('Sonic_md_bg1.tsx'); 
    //      tilemap = TLN_LoadTilemap ("Sonic_md_bg1.tmx", "Layer 1");
      tilemap := uTileEngine.LoadTileMap('Sonic_md_bg1.tmx', 'Layer 1');
    Commented lines are from the C example.

    Pascal header:
    function LoadTileset(filename : string) : Pointer; cdecl; external dllname name 'TLN_LoadTileset';
    function LoadTilemap(filename, layername : string) : Pointer; cdecl; external dllname name 'TLN_LoadTilemap';

    Should be:
    function LoadTileset(filename : PAnsiChar) : Pointer; cdecl; external dllname name 'TLN_LoadTileset';
    function LoadTilemap(filename, layername : PAnsiChar) : Pointer; cdecl; external dllname name 'TLN_LoadTilemap';

    and possibly for many others lines in the header...
    Thanks for your changes! Do a pull request in the repo

  2. #22
    I see some recent activity here I didn't know :-)

    How do I use this without the built-in windowing?
    SetRenderTarget sounds like it might do the trick, but how do I get pointer to a framebuffer in VCL?
    The two parameters required are returned by the typical "lock" function in many systems to get direct pixel acces to a video surface. Check the source code of the built-in windowing based in SDL2. This is what it does at line 785 on a SDL-based surface backbuffer:

    Pascal wrapper
    This wrapper was originally submitted by turrican, but as Tilengine evolves this wrapper is getting out of sync because it's not being updated anymore. It also lacks any example and build procedure for this language. To keep this language supported, someone should update the binding and provide a pascal version of any of the examples.

    Tilengine has its own dedicated forum, with threads in english and spanish. You can reach them here:
    Last edited by megamarc79; 08-09-2017 at 03:02 PM. Reason: typos

  3. #23
    I'd like someone to update it to the most current version of the Tilengine. And maybe provide a graphical Lazarus component, perhaps descendant of TImage (so we wouldn't need to worry about repainting it and it'll be easy to write screenshots) with set of events so we could utilize Tilengine in an OOP manner. Obviously it's not THAT important, but it would be good to have it, not to mention it would make development easier since the built-in windowing is weak and not many have enough skills to setup their own aside of putting components on a form.

  4. #24
    Here is the last version of the wrapper :

    And is improved :

Page 3 of 3 FirstFirst 123


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
Comodo SSL