1
0
mirror of https://github.com/moparisthebest/Simba synced 2025-01-31 07:10:28 -05:00

NEW CPASCAL with new and improved internals. (note, plugintest works, but not in debug mode, for some reason) valgrind says the jvm is trying to do something its not supposed to...

git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@536 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
BenLand100 2010-02-10 03:28:15 +00:00
parent 79cdefecdd
commit 0ecc5f06dd
4 changed files with 64 additions and 8 deletions

Binary file not shown.

Binary file not shown.

View File

@ -81,14 +81,6 @@ const medium_maze ='61' + #10 +
'0110111111111111111010000000001111111111101111111111111111110' + #10 +
'0000000000000000000000000000000000000000000000000000000000000' + #10 ;
type Tpoint = record
x,y: integer;
end;
type TpointArray = array of TPoint;
type TpointArrayArray = array of TpointArray;
type TboolGrid = array of array of boolean;
function readLine(raw: string; var off: integer): string;

View File

@ -0,0 +1,64 @@
program new;
{$LoadDLL libsmart}
function IsKeyDown(C:Char): Boolean;
begin
Result := SmartIsKeyDown(ord(c));
end;
procedure MoveMouse(x, y: Integer);
begin
SmartMoveMouse(x, y);
end;
procedure HoldMouse(x, y: Integer; left: Boolean);
begin
SmartHoldMouse(x, y, left);
end;
procedure ReleaseMouse(x, y: Integer; left: Boolean);
begin
SmartReleaseMouse(x, y, left);
end;
procedure KeyUp(key: byte);
begin
If Key = 13 Then
Key := 10;
SmartReleaseKey(key);
end;
procedure KeyDown(key: byte);
begin
If Key = 13 Then
Key := 10;
SmartHoldKey(key);
end;
procedure SendKeys(S: String);
begin
SmartSendKeys(S);
end;
procedure GetMousePos(var x, y: Integer);
begin
SmartGetMousePos(x, y);
end;
function GetColor(x, y: Integer): Integer;
begin
result:= SmartGetColor(x, y);
end;
var
w,h:integer;
begin
SmartSetup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503);
SetTargetArray(SmartImageArray(), 765,503);
getclientdimensions(w,h);
writeln(inttostr(w) + ' , ' + inttostr(h));
if findcolortolerance(w,h,00000,0,0,764,502,300) then
smartmovemouse(w,h);
savescreenshot('/tmp/smart.bmp');
//Wait(5000);
end.