Tilengine - The 2D retro graphics engine forum
Missing "Affine" binding for C Sharp? - Printable Version

+- Tilengine - The 2D retro graphics engine forum (http://tilengine.org/forum)
+-- Forum: English forums (http://tilengine.org/forum/forumdisplay.php?fid=3)
+--- Forum: Support (http://tilengine.org/forum/forumdisplay.php?fid=7)
+--- Thread: Missing "Affine" binding for C Sharp? (/showthread.php?tid=125)



Missing "Affine" binding for C Sharp? - Domarius - 07-16-2018

I'm just converting the C samples over to C Sharp as an exercise, and I noticed there's a C Sharp binding for, say, Palette from TFN_Palette, but I don't see one for TFN_Affine.

Oh I suppose if I finish converting the samples I can upload them as more C Sharp samples.

Actually I noticed the C Sharp binding for Palette doesn't look that complicated, maybe you can give me enough info about what's missing that I could finish any similar missing bindings myself and commit them for you?


RE: Missing "Affine" binding for C Sharp? - megamarc - 07-16-2018

In the beginning there was void TLN_SetLayerAffineTransform() that received a TLN_Affine struct. But then I added the TLN_SetLayerTransform() function that receives the same parameters individually, not packed in a struct. And when I created the C# binding, I ignored the original function and only wrapped the newer, that doesn't use the TLN_Affine struct, that is the Layer::SetTransform() method. Look at line 1000 of https://github.com/megamarc/Tilengine/blob/master/bindings/csharp/Tilengine.cs. So in short this is a redundant struct that is not really needed in the original C API.