BenLand100
2008-07-13 22:37:39
This should be ready for release. I fixed the signed/unsigned bug (Markus pointed out that they were reversed) It is now the same as it has been, signed when signed == true, and unsigned when signed == false. Also, added SmartIsKeyDown for Wizzup (<3). I do not have time to rewrite the whole scar link to make it work multiple clients per scar instance, it might however run multiple Smarts per Scar folder (one per process) without the upx (?) packing, if it does not, just someone pack it first. This does have reflection, and imo it should stay that way. As far as SRL and the dev team is concerned, it is not obligated (and should not, imo) officialy support reflection, however if an individual (dev, ssrl, member, etc.) wishes to mantain a reflection client, it should be their own responsibility and not mantained in conjunction with the main SRL include. That in itself will prevent the community from relying on it, and will not add any extra pressure to the dev team.
In short, assuming this works, this is the Release Version. I included a simple text file listing all SMART Exports, someone asked for that, forget who.
n3ss3s
2008-07-14 04:50:12
So it's going public? I hate it on IRC when I don't know that is something public or did someone burn their waffles :(
Wizzup?
2008-07-14 06:13:19
Thanks, will get Markus and see if it still needs to be UPX'ed.
Also, thanks for the SmartIsKeyDown. <3 ;)
n3ss3s
2008-07-14 07:22:56
BEN!!!
Before releasing please add one thing to SMART -
"ClearSmartDebug"
With current situation if you paint on the debug dc, you can't wipe away the old text, which ends up in a mess :(
Thanks.
Wizzup?
2008-07-14 08:23:33
Lol:
function IsKeyDown(C:Char): Boolean;
Var
V: Variant;
I: Integer;
begin
V := C;
I := V;
Result := SmartIsKeyDown(I);
end;
Char <> LongInt. :p
BenLand100
2008-07-14 09:40:39
From: Wizzup?
Char <> LongInt. :p
Char <> Key either… Are you telling me that hold key and release key never worked?
procedure SmartHoldKey(Code: Integer);
function SmartIsKeyDown(Code: Integer): Boolean;
procedure SmartReleaseKey(Code: Integer);
@n3ss3s, fill the canvas with the transparent color (which you can set, btw)
Wizzup?
2008-07-14 10:02:06
From: BenLand100
Char <> Key either… Are you telling me that hold key and release key never worked?
procedure SmartHoldKey(Code: Integer);
function SmartIsKeyDown(Code: Integer): Boolean;
procedure SmartReleaseKey(Code: Integer);
@n3ss3s, fill the canvas with the transparent color (which you can set, btw)
Now I am confused… How should I override the SCAR function then?
SCAR gives me a Type Mismatch if just do
Result := SmartIsKeyDown(C);
EDIT: Wait… should I ord() it?
function IsKeyDown(C:Char): Boolean;
begin
Result := SmartIsKeyDown(ord(c));
end;
BenLand100
2008-07-14 10:12:46
From: Wizzup?
Now I am confused… How should I override the SCAR function then?
SCAR gives me a Type Mismatch if just do
EDIT: Wait… should I ord() it?
Ord will do it, however, I am very taken aback at the fact that Scar's IsKeyDown takes a char argument… Common sense demands that it take the same argument as KeyDown and KeyUp, especially since some keys don't have printable characters associated with them.
n3ss3s
2008-07-14 10:13:52
clNone isn't transparent, if that's what you mean.
@n3ss3s, fill the canvas with the transparent color (which you can set, btw)
Sigh, actually you can set a trasparent color ;)
Argh, if I do
Procedure SmartClearDebug;
Var
DDC, bmp, def: Integer;
Begin
DDC := SmartGetDebugDC;
If DDC = 0 Then Exit;
def := GetClientWindowHandle;
bmp := BitmapFromString(765, 503, '');
SmartSetTrasparentColor(255);
FastDrawClear(bmp, 255);
SetTargetDC(DDC);
CopyCanvas(GetBitmapCanvas(bmp), GetClientCanvas, 0, 0, 765, 503, 0, 0, 765, 503);
SetTargetDC(def);
End;
After that it won't paint with any color.
You'll get rep++ if you'll make the function ;)
Markus
2008-07-14 12:51:14
Ben!
Signed/Unsigned are stil switched!