I complemented the contact callback function of love.physics in order to get remove/persist events, but I can't figure out how to regenerate the bindings. There are no *.i files in the 0.5 source package neither in the svn. Where should I look?
Thanks.
Regenerating the swig binding
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Re: Regenerating the swig binding
I ended up hand-generated the missing binding
I'm sharing the contact code with the community as it's been requested here http://love2d.org/forum/tracker.php?p=2&t=31
basically, I added a "getType()" function to contacts. The returned value is:
0 = add contact
1 = persist contact
2 = remove contact
3 = result (don't know what that is but it's provided by box2d)
next time, I'll use love.constants instead of numbers
to use it, just patch the source code (patch -p1 in the main directory) with the attached patch; then when you get a contact from the callback, check it's type with c:getType().
I'm sharing the contact code with the community as it's been requested here http://love2d.org/forum/tracker.php?p=2&t=31
basically, I added a "getType()" function to contacts. The returned value is:
0 = add contact
1 = persist contact
2 = remove contact
3 = result (don't know what that is but it's provided by box2d)
next time, I'll use love.constants instead of numbers
to use it, just patch the source code (patch -p1 in the main directory) with the attached patch; then when you get a contact from the callback, check it's type with c:getType().
- Attachments
-
- love-0.5-0_contact.patch.gz
- patch for getting persist/delete callbacks for contacts
- (1.75 KiB) Downloaded 256 times
Re: Regenerating the swig binding
I'm still interested by how to regenerate swig bindings. Anyone?
Re: Regenerating the swig binding
"We" (i.e. I) decided to stop using SWIG[1], and start wrapping everything manually.
Due to certain limitations in SWIG and/or my lack of skills with this tool, I had to make a separate tool which post-processed the generated wrapper code and "injected" extra methods. It was horrible. Please don't make me find that tool and relive that nightmare. Let the SWIG binding rest in peace.
[1]: Reasons available on request.
Due to certain limitations in SWIG and/or my lack of skills with this tool, I had to make a separate tool which post-processed the generated wrapper code and "injected" extra methods. It was horrible. Please don't make me find that tool and relive that nightmare. Let the SWIG binding rest in peace.
[1]: Reasons available on request.
Re: Regenerating the swig binding
Thanks, Rude. Did you drop swig prior to 0.5.0, or is it in the svn? I read a few threads about the future of love. Are your plans to bury it? Maybe you should let the community get more involved in the development, by stabilizing the svn and documenting a little bit the roadmap/how-to-contribute stuff.
Cheers for that great project.
Ben.
BTW, I'm also interested by the gory details of your hate relation with SWIG.
Cheers for that great project.
Ben.
BTW, I'm also interested by the gory details of your hate relation with SWIG.
Re: Regenerating the swig binding
Me too. I've seen SWIG around, but I only just took a look at it due to this thread. It's certainly a tool that's piqued my interest, so I'd like to hear more about it.benob wrote:BTW, I'm also interested by the gory details of your hate relation with SWIG.
Who is online
Users browsing this forum: Amazon [Bot], Bing [Bot], Google [Bot] and 0 guests