Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Cleanup and Smart finished. #1

Merged
merged 2 commits into from

2 participants

@JohnPeel

Cleaned up non-source files.
Finished the smartfunc.pas file.

@Drags111 Drags111 merged commit 1f32c4d into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
View
BIN  LionKing.exe
Binary file not shown
View
10 LionKing.lpi
@@ -40,8 +40,8 @@
<IsVisibleTab Value="True"/>
<EditorIndex Value="0"/>
<WindowIndex Value="0"/>
- <TopLine Value="1"/>
- <CursorPos X="49" Y="26"/>
+ <TopLine Value="20"/>
+ <CursorPos X="13" Y="32"/>
<UsageCount Value="21"/>
<Loaded Value="True"/>
</Unit0>
@@ -65,7 +65,7 @@
<UsageCount Value="10"/>
</Unit2>
</Units>
- <JumpHistory Count="2" HistoryIndex="1">
+ <JumpHistory Count="3" HistoryIndex="2">
<Position1>
<Filename Value="smartfunc.pas"/>
<Caret Line="17" Column="15" TopLine="1"/>
@@ -74,6 +74,10 @@
<Filename Value="LionKing.lpr"/>
<Caret Line="9" Column="35" TopLine="1"/>
</Position2>
+ <Position3>
+ <Filename Value="LionKing.lpr"/>
+ <Caret Line="26" Column="49" TopLine="1"/>
+ </Position3>
</JumpHistory>
</ProjectOptions>
<CompilerOptions>
View
2  LionKing.lpr
@@ -29,7 +29,7 @@ TLionKing = class(TCustomApplication)
procedure LoadSmart;
begin
- smart_setup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503, 's');
+ SmartSetup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503, 's');
end;
{ TLionKing }
View
BIN  LionKing.res
Binary file not shown
View
92 backup/LionKing.lpr.bak
@@ -1,92 +0,0 @@
-program LionKing;
-
-{$mode objfpc}{$H+}
-
-uses
- {$IFDEF UNIX}{$IFDEF UseCThreads}
- cthreads,
- {$ENDIF}{$ENDIF}
- Classes, SysUtils, CustApp
- { you can add units after this };
-
-const
- libSmart = 'smart';
-
-procedure std_setup (ServerURL, SecondParam: PChar; sizeX, sizeY: Integer; SomeStr: PChar); cdecl; external libSmart;
-
-type
-
- { TLionKing }
-
- TLionKing = class(TCustomApplication)
- protected
- procedure DoRun; override;
- public
- constructor Create(TheOwner: TComponent); override;
- destructor Destroy; override;
- procedure WriteHelp; virtual;
- end;
-
-procedure LoadSmart;
-begin
- std_setup('http://world19.runescape.com/', 'plugin.js?param=o0,a1,m0', 765, 503, 's');
-end;
-
-{ TLionKing }
-
-procedure TLionKing.DoRun;
-var
- ErrorMsg: String;
-begin
- // quick check parameters
- ErrorMsg:=CheckOptions('h','help');
- if ErrorMsg<>'' then begin
- ShowException(Exception.Create(ErrorMsg));
- Terminate;
- Exit;
- end;
-
- // parse parameters
- if HasOption('h','help') then begin
- WriteHelp;
- Terminate;
- Exit;
- end;
-
- { add your program here }
- Writeln('Whatup world?');
- LoadSmart;
-
- // stop program loop
- Terminate;
-end;
-
-constructor TLionKing.Create(TheOwner: TComponent);
-begin
- inherited Create(TheOwner);
- StopOnException:=True;
-end;
-
-destructor TLionKing.Destroy;
-begin
- inherited Destroy;
-end;
-
-procedure TLionKing.WriteHelp;
-begin
- { add your help code here }
- writeln('Usage: ',ExeName,' -h');
-end;
-
-var
- Application: TLionKing;
-
-{$R *.res}
-
-begin
- Application:=TLionKing.Create(nil);
- Application.Title:='Lion King';
- Application.Run;
- Application.Free;
-end.
-
View
5 lib/i386-win32/LionKing.compiled
@@ -1,5 +0,0 @@
-<?xml version="1.0"?>
-<CONFIG>
- <Compiler Value="c:\lazarus\fpc\2.4.3\bin\i386-win32\fpc.exe" Date="1051467285"/>
- <Params Value=" -MObjFPC -Scghi -O1 -gl -vewnhi -l -FiC:\Users\Justin\Desktop\lionking\lib\i386-win32 -FuC:\Users\Justin\Desktop\lionking\ -FUC:\Users\Justin\Desktop\lionking\lib\i386-win32\ LionKing.lpr"/>
-</CONFIG>
View
BIN  lib/i386-win32/LionKing.o
Binary file not shown
View
BIN  lib/i386-win32/LionKing.or
Binary file not shown
View
BIN  lib/i386-win32/LionKing.res
Binary file not shown
View
BIN  lib/i386-win32/libimpLionKing.a
Binary file not shown
View
95 smartfunc.pas
@@ -7,26 +7,89 @@ interface
uses
Classes, SysUtils;
-// Look at https://github.com/BenLand100/SMART/blob/master/src/Main.cpp#L30
-// for all exports
-
const
libSmart = 'smart';
-procedure smart_setup (ServerURL, SecondParam: PChar; sizeX, sizeY: Integer;
- SomeStr: PChar); stdcall; external libSmart name 'std_setup';
-
-procedure smart_getmousepos (var x, y: integer); stdcall; external libSmart
- name 'std_getmousepos';
-
-{ Add stuff here that you want other units to see }
+procedure SmartSetup(root, params: PChar; width, height: LongInt; initseq: PChar); stdcall; external libSmart name 'std_setup';
+procedure SmartSetJVMPath(path: string); stdcall; external libSmart name 'std_setJVMPath';
+{$IFDEF WINDOWS}
+function SmartGetDC(): LongInt; stdcall; external libSmart name 'std_getImageHDC';
+function SmartGetDebugDC(): LongInt; stdcall; external libSmart name 'std_getDebugHDC';
+{$ENDIF}
+function SmartImageArray(): Pointer; stdcall; external libSmart name 'std_getImageArray';
+function SmartDebugArray(): Pointer; stdcall; external libSmart name 'std_getDebugArray';
+function SmartGetRefresh(): integer; stdcall; external libSmart name 'std_getRefresh';
+procedure SmartSetRefresh(x: LongInt); stdcall; external libSmart name 'std_setRefresh';
+procedure SmartSetTransparentColor(color: integer); stdcall; external libSmart name 'std_setTransparentColor';
+procedure SmartSetDebug(enabled: boolean); stdcall; external libSmart name 'std_setDebug';
+procedure SmartSetGraphics(enabled: boolean); stdcall; external libSmart name 'std_setGraphics';
+function SmartActive(): boolean; stdcall; external libSmart name 'std_isActive';
+function SmartEnabled(): boolean; stdcall; external libSmart name 'std_isBlocking';
+procedure SmartGetMousePos(var x, y: LongInt); stdcall; external libSmart name 'std_getMousePos';
+procedure SmartHoldMouse(x, y: LongInt; left: boolean); stdcall; external libSmart name 'std_holdMouse';
+procedure SmartReleaseMouse(x, y: LongInt; left: boolean); stdcall; external libSmart name 'std_releaseMouse';
+procedure SmartMoveMouse(x, y: LongInt); stdcall; external libSmart name 'std_moveMouse';
+procedure SmartWindMouse(x, y: LongInt); stdcall; external libSmart name 'std_windMouse';
+procedure SmartDragMouse(x, y: LongInt); stdcall; external libSmart name 'std_dragMouse';
+procedure SmartClickMouse(x, y: LongInt; left: boolean); stdcall; external libSmart name 'std_clickMouse';
+procedure SmartSendKeys(Text: PChar); stdcall; external libSmart name 'std_sendKeys';
+procedure SmartHoldKey(Code: LongInt); stdcall; external libSmart name 'std_holdKey';
+procedure SmartReleaseKey(Code: LongInt); stdcall; external libSmart name 'std_releaseKey';
+function SmartIsKeyDown(Code: LongInt): Boolean; stdcall; external libSmart name 'std_isKeyDown';
+function SmartGetColor(x, y: integer): integer; stdcall; external libSmart name 'std_getColor';
+function SmartFindColor(var x, y: integer; color, sx, sy, ex, ey: integer): boolean; stdcall; external libSmart name 'std_findColor';
+function SmartFindColorTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean; stdcall; external libSmart name 'std_findColorTol';
+function SmartFindColorSpiral(var x, y: integer; color, sx, sy, ex, ey: integer): boolean; stdcall; external libSmart name 'std_findColorSpiral';
+function SmartFindColorSpiralTolerance(var x, y: integer; color, sx, sy, ex, ey, tol: integer): boolean; stdcall; external libSmart name 'std_findColorSpiralTol';
+function SmartstringFromBytes(bytes: integer; str: string): integer; stdcall; external libSmart name 'std_stringFromBytes';
+function SmartstringFromChars(chars: integer; str: string): integer; stdcall; external libSmart name 'std_stringFromChars';
+function SmartstringFromstring(jstr: integer; str: string): integer; stdcall; external libSmart name 'std_stringFromstring';
+function SmartInvokeIntMethod(obj: integer; clazz, meth: string; a, b: integer): integer; stdcall; external libSmart name 'std_invokeIntMethod';
+function SmartGetFieldObject(parent: integer; path: string): integer; stdcall; external libSmart name 'std_getFieldObject';
+function SmartIsPathValid(parent: integer; path: string): boolean; stdcall; external libSmart name 'std_isPathValid';
+function SmartGetFieldInt(parent: integer; path: string): integer; stdcall; external libSmart name 'std_getFieldInt';
+function SmartGetFieldShort(parent: integer; path: string): integer; stdcall; external libSmart name 'std_getFieldShort';
+function SmartGetFieldByte(parent: integer; path: string): integer; stdcall; external libSmart name 'std_getFieldByte';
+function SmartGetFieldFloat(parent: integer; path: string): extended; stdcall; external libSmart name 'std_getFieldFloat';
+function SmartGetFieldDouble(parent: integer; path: string): extended; stdcall; external libSmart name 'std_getFieldDouble';
+function SmartGetFieldBoolean(parent: integer; path: string): boolean; stdcall; external libSmart name 'std_getFieldBool';
+function SmartGetFieldLongH(parent: integer; path: string): integer; stdcall; external libSmart name 'std_getFieldLongH';
+function SmartGetFieldLongL(parent: integer; path: string): integer; stdcall; external libSmart name 'std_getFieldLongL';
+function SmartGetFieldArrayInt(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayInt';
+function SmartGetFieldArrayFloat(parent: integer; path: string; index: integer): extended; stdcall; external libSmart name 'std_getFieldArrayFloat';
+function SmartGetFieldArrayDouble(parent: integer; path: string; index: integer): extended; stdcall; external libSmart name 'std_getFieldArrayDouble';
+function SmartGetFieldArrayLongH(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayLongH';
+function SmartGetFieldArrayLongL(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayLongL';
+function SmartGetFieldArrayBoolean(parent: integer; path: string; index: integer): boolean; stdcall; external libSmart name 'std_getFieldArrayBool';
+function SmartGetFieldArrayByte(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayByte';
+function SmartGetFieldArrayShort(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayShort';
+function SmartGetFieldArrayChar(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayChar';
+function SmartGetFieldArray3DInt(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DInt';
+function SmartGetFieldArray3DFloat(parent: integer; path: string; x ,y, z: integer): extended; stdcall; external libSmart name 'std_getFieldArray3DFloat';
+function SmartGetFieldArray3DDouble(parent: integer; path: string; x ,y, z: integer): extended; stdcall; external libSmart name 'std_getFieldArray3DDouble';
+function SmartGetFieldArray3DBoolean(parent: integer; path: string; x ,y, z: integer): boolean; stdcall; external libSmart name 'std_getFieldArray3DBool';
+function SmartGetFieldArray3DLongH(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DLongH';
+function SmartGetFieldArray3DLongL(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DLongL';
+function SmartGetFieldArray3DByte(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DByte';
+function SmartGetFieldArray3DShort(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DShort';
+function SmartGetFieldArray3DChar(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DChar';
+function SmartGetFieldArray3DObject(parent: integer; path: string; x ,y, z: integer): integer; stdcall; external libSmart name 'std_getFieldArray3DObject';
+function SmartGetFieldArray2DInt(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DInt';
+function SmartGetFieldArray2DFloat(parent: integer; path: string; x ,y: integer): extended; stdcall; external libSmart name 'std_getFieldArray2DFloat';
+function SmartGetFieldArray2DDouble(parent: integer; path: string; x ,y: integer): extended; stdcall; external libSmart name 'std_getFieldArray2DDouble';
+function SmartGetFieldArray2DBoolean(parent: integer; path: string; x ,yz: integer): boolean; stdcall; external libSmart name 'std_getFieldArray2DBool';
+function SmartGetFieldArray2DLongH(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DLongH';
+function SmartGetFieldArray2DLongL(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DLongL';
+function SmartGetFieldArray2DByte(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DByte';
+function SmartGetFieldArray2DShort(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DShort';
+function SmartGetFieldArray2DChar(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DChar';
+function SmartGetFieldArray2DObject(parent: integer; path: string; x ,y: integer): integer; stdcall; external libSmart name 'std_getFieldArray2DObject';
+function SmartGetFieldArrayObject(parent: integer; path: string; index: integer): integer; stdcall; external libSmart name 'std_getFieldArrayObject';
+function SmartGetFieldArraySize(parent: integer; path: string; dim: integer): integer; stdcall; external libSmart name 'std_getFieldArraySize';
+function SmartIsEqual(obja,objb: integer): boolean; stdcall; external libSmart name 'std_isEqual';
+function SmartIsNull(obj: integer): boolean; stdcall; external libSmart name 'std_isNull';
+procedure SmartFreeObject(obj: integer); stdcall; external libSmart name 'std_freeObject';
implementation
-
-
-
-
-
-
end.
Something went wrong with that request. Please try again.