Hello Lovers,
I've been working on a few games with LÖVE and I'm a big fan of the framework. I also like the simplicity and possibilities of the framework, but I was wondering where the link between the lua functions and the functions in C++ is, so I can learn more about LÖVE and C++. This could be useful if I want to extend LÖVE to support Bluetooth on Android for example.
Lua C++ connection
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Lua C++ connection
https://bitbucket.org/rude/love this is the source code for love. Also if you plan to extend love join irc and check with the devs to see if what you doing is something they would like to merge in. They might be able to give you pointers as well.
Also you might be able to write a lua side library utilizing the lua jni wrapper bartbes made. The only thing you would have to do is build an apk with the correct permissions in order for bluetooth to work.
https://bitbucket.org/bartbes/jniwrap
Also you might be able to write a lua side library utilizing the lua jni wrapper bartbes made. The only thing you would have to do is build an apk with the correct permissions in order for bluetooth to work.
https://bitbucket.org/bartbes/jniwrap
Re: Lua C++ connection
Thanks, but I still don't understand how the API in Lua calls the specific functions in C++. Which part of the source code is responsible for that?bobbyjones wrote:https://bitbucket.org/rude/love this is the source code for love. Also if you plan to extend love join irc and check with the devs to see if what you doing is something they would like to merge in. They might be able to give you pointers as well.
-
- Party member
- Posts: 730
- Joined: Sat Apr 26, 2014 7:46 pm
Re: Lua C++ connection
In the love source there are files for each module called wrap_blank.h and wrap_blank.cpp in each of those files they create a struct WrappedModule that contain the type, module, and a list of functions. They then use a function defined in
https://bitbucket.org/rude/love/src/eaf ... untime.cpp
To wrap the module. I hardly understand how they do things, but that's the basic idea. I only added one function to love and I used the infrastructure they had already set up. It seems simply enough.
https://bitbucket.org/rude/love/src/eaf ... untime.cpp
To wrap the module. I hardly understand how they do things, but that's the basic idea. I only added one function to love and I used the infrastructure they had already set up. It seems simply enough.
Who is online
Users browsing this forum: Bing [Bot] and 2 guests