Re: Help wrapping SDL2.0
- Posted by ghaberek (admin) Oct 20, 2014
- 1684 views
I had forgot about Greg's struct.e I could have used that to wrap the Rect functions in SDL. It would come in handy for when you need to declare Rect variables in SDL. Since Euphoria has no native support for structs at this time, hopefully with the next release, struct support will be added.
Yes Greg has done some good work. I have declared structs in EU as I have found them in C. I also went ahead and declared some of the special types used in SDL, just for clarification.
I just realized you guys were talking about this: http://openeuphoria.org/forum/109791.wc#109791. I had forgotten all about that until now. Good to see it's actually getting tested, since I had said this...
I just whipped this up. Let me know what you think. Perhaps we could polish it and include it in the 4.0 release. (I'm not sure how much testing needs to be done, or how well this actually works for that matter.)
It's basically the same idea as the memory management routines in Win32Lib, but slimmed down and re-using the C_* constants from std/dll.e.
If it seems useful, then I can update it and added to my Euphoria Advanced Library. This will open up a lot more available types that I have added to adv/dll.e.
-Greg