Hi all. See if you can help me.
FirstQuestionI have a function in C for a dll.
DllImport float sum (float a, float b)
{
return a + b;
}
How do I give to that function float values from RGSS?
My code in RGSS (i cant use '
f' or '
d' as param):
n = Win32API.new ('test', 'sum', 'ii', 'i')
a = 5.10
b = 8.90
n.call p (a, b)
Last QuestionI defined a point class in RGSS
class Point # by Newold
#--------------------------------------------------------------------------
attr_accessor :x
attr_accessor :y
#--------------------------------------------------------------------------
def initialize(x=0,y=0)
@x = x; @y = y
end
#--------------------------------------------------------------------------
end
in dll i defined this struct:
struct point
{
float x;
float y;
};
How do I give to a function a point from RGSS? i want say, If i have this point in RGSS =>
Point.new(150,150), how i pass this point to a function in c as struct point.