C++ friendly class for Lua integration
  • Order of the Butterfly
    Order of the Butterfly
    BalrogSoft
    Posts: 171 from 2006/10/6
    From: Spain
    Hi.

    I was searching a way to call C++ methods from lua scripts, after give a try to porting tolua++, i got the library working, but conversion utility fails with some lua scripts that uses to generate the header files, so if someone wants to give a try, it appears to be a problem with lua scripts, let me know.

    For this reason i have made a friendly class to comunicate with Lua, i have found a interesting solution on the web, it creates a table with the class pointer and the methods names, it isn't the best and elegant way but it works.

    luafriendly.lha

    Edited:

    I have found a bug, it was working only with one class, it works with any class defined now, i have updated the file.

    [ Edited by BalrogSoft 24.11.2011 - 13:13 ]
    Balrog Software - AmigaSkool.net
    Mac Mini - MorphOS 3.8 - G4 1.5Ghz - Ati 9200 64 Mb
    Efika - MorphOS 3.6 - Ati 9200 64Mb - 80 Gb HD
    Amiga 1200D - OS 3.9 - Blizzard 603e/240mh
  • »24.11.11 - 01:11
    Profile Visit Website