Re: Phix: cffi.e
- Posted by petelomax 6 days ago
- 298 views
andreasWagner said...
This Function Call needs the structur passed as Value, your code passes it as reference (C_PTR,Pointer)
Hmm, maybe something like this would work (where color is a single #RRGGBBAA value):
local constant xDrawCircleV = define_c_proc(ray,"+DrawCircleV",{C_FLOAT,C_FLOAT,C_FLOAT,C_DWORD}) c_proc(xDrawCircleV,{x,y,radius,color})
If you can make a small working C program, or better yet FASM which I've done myself more than once, then disassemble it with OllyDbg, fdbg, or even Phix's own filedump.exw,
then even should c_proc be unable cope, you could (with my help as needed) always replicate things using a wee bit of inline assembly...
I suppose I should really download what you've already got so far and give it a quick spin.