Metagen
2010-02-16 03:38:50
Does anyone know if i can import my own DLL into scar? (well i know i can just i don't know how) :D
woot I think i found it {.loaddll libsmart}
woot I think i found it {.loaddll libsmart}
2010-02-16 03:38:50
2010-02-16 05:03:26
2010-02-16 05:20:24
program New;
var p : TPoint;
begin
p.x := 1;
p.y := 5;
writeln(inttostr(GetX(p)));
writeln(inttostr(GetY(p)));
end.
Successfully compiled (299 ms)
1
5
Successfully executed
2010-02-16 05:26:18
From: Metagen
Wooooooot!!!
Hey guys i just made a c++ plugin ^^. It made this work :D
program New;
var p : TPoint;
begin
p.x := 1;
p.y := 5;
writeln(inttostr(GetX(p)));
writeln(inttostr(GetY(p)));
end.
Successfully compiled (299 ms)
1
5
Successfully executed
2010-02-16 05:57:30
int __stdcall GetX(int* tp)
{
return tp[0];
}
int __stdcall GetY(int* tp)
{
return tp[1];
}
int __stdcall SumElements(int** t2dia)
{
int x = 0;
for(int i = 0; i < (int)(t2dia[-1]); i++)
for(int j = 0; j < t2dia[i][-1]; j++)
{
x += t2dia[i][j];
}
return x;
}
2010-02-18 11:42:46
From: Metagen
Does anyone know if i can import my own DLL into scar? (well i know i can just i don't know how) :D
woot I think i found it {.loaddll libsmart}
2010-02-21 03:10:10
From: Metagen
its so much more fun to program in c++ :) i get to figure out all of freddies struct thingies :p
For instance a TPoint is actually an integer pointer and the x, y are stored at adress of tpoint and address of tpoint + 4 :p
Whats more fun is the T2DIntArray :D
I figured that one out too (it is more complicated, but still simple).
I think the code explains it best, this for loops through every element and adds them.
Ofc there is missing code that i derived from benlands tutorial for c++ injector thingy into delphi dll (which i find highly gay)
2010-02-21 04:14:26
From: BenLand100I think he meant that the Delphi dll is gay. Not your code :)
Clearly you don't know what a c++ struct is if you opted for using a pointer instead of a struct. A TPoint, for instance is a:
struct TPoint { int x,y; }
And a T2DIntArray is an array [of array] of TPoints (depending on how ps implements them, which I am not sure of). If my code is gay, then your code is in a coma, so gtfo.