diff --git a/Changelog.txt b/Changelog.txt
new file mode 100644
index 0000000..04a2f65
--- /dev/null
+++ b/Changelog.txt
@@ -0,0 +1,2 @@
+Changelog since version 1:
+
diff --git a/Known Issues.txt b/Known Issues.txt
new file mode 100644
index 0000000..89dbcbb
--- /dev/null
+++ b/Known Issues.txt
@@ -0,0 +1,8 @@
+Known issues:
+
+Linux:
+ - Mouse Clicking only works in the client, and the mouse click must be in the client, otherwise the event is ignored.
+ - CopyClientToBitmap isn't stable for IntArrPtr.
+
+Windows:
+
diff --git a/Projects/SAMufasaGUI/project1.lpi b/Projects/SAMufasaGUI/project1.lpi
index bc11e63..2942796 100644
--- a/Projects/SAMufasaGUI/project1.lpi
+++ b/Projects/SAMufasaGUI/project1.lpi
@@ -7,7 +7,7 @@
-
+
@@ -37,7 +37,7 @@
-
+
@@ -166,10 +166,10 @@
-
-
-
-
+
+
+
+
@@ -298,10 +298,10 @@
-
-
-
-
+
+
+
+
@@ -310,8 +310,8 @@
-
-
+
+
@@ -320,27 +320,27 @@
-
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
@@ -356,7 +356,7 @@
-
+
@@ -365,26 +365,26 @@
-
+
-
-
+
+
-
+
-
-
-
-
+
+
+
+
@@ -395,127 +395,99 @@
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
+
-
-
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -527,6 +499,11 @@
+
+
+
+
+
diff --git a/Projects/SAMufasaGUI/testunit.lfm b/Projects/SAMufasaGUI/testunit.lfm
index f81a6ce..c7d2ccd 100644
--- a/Projects/SAMufasaGUI/testunit.lfm
+++ b/Projects/SAMufasaGUI/testunit.lfm
@@ -1,7 +1,7 @@
object Form1: TForm1
- Left = 237
+ Left = 369
Height = 527
- Top = 190
+ Top = 223
Width = 779
ActiveControl = Button1
Caption = 'Form1'
diff --git a/Projects/SAMufasaGUI/testunit.lrs b/Projects/SAMufasaGUI/testunit.lrs
index 47a086f..0223a6d 100644
--- a/Projects/SAMufasaGUI/testunit.lrs
+++ b/Projects/SAMufasaGUI/testunit.lrs
@@ -1,10 +1,10 @@
{ This is an automatically generated lazarus resource file }
-
-LazarusResources.Add('TForm1','FORMDATA',[
- 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3#237#0#6'Height'#3#15#2#3'Top'#3#190#0#5'W'
- +'idth'#3#11#3#13'ActiveControl'#7#7'Button1'#7'Caption'#6#5'Form1'#12'Client'
- +'Height'#3#15#2#11'ClientWidth'#3#11#3#8'Position'#7#14'poScreenCenter'#10'L'
- +'CLVersion'#6#6'0.9.29'#0#7'TButton'#7'Button1'#4'Left'#2#8#6'Height'#2#25#3
- +'Top'#2#16#5'Width'#2'K'#7'Caption'#6#7'Button1'#7'OnClick'#7#12'Button1Clic'
- +'k'#8'TabOrder'#2#0#0#0#0
-]);
+
+LazarusResources.Add('TForm1','FORMDATA',[
+ 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'q'#1#6'Height'#3#15#2#3'Top'#3#223#0#5'Wi'
+ +'dth'#3#11#3#13'ActiveControl'#7#7'Button1'#7'Caption'#6#5'Form1'#12'ClientH'
+ +'eight'#3#15#2#11'ClientWidth'#3#11#3#8'Position'#7#14'poScreenCenter'#10'LC'
+ +'LVersion'#6#6'0.9.29'#0#7'TButton'#7'Button1'#4'Left'#2#8#6'Height'#2#25#3
+ +'Top'#2#16#5'Width'#2'K'#7'Caption'#6#7'Button1'#7'OnClick'#7#12'Button1Clic'
+ +'k'#8'TabOrder'#2#0#0#0#0
+]);
diff --git a/Projects/SAMufasaGUI/testunit.pas b/Projects/SAMufasaGUI/testunit.pas
index e5b9054..e5b5201 100644
--- a/Projects/SAMufasaGUI/testunit.pas
+++ b/Projects/SAMufasaGUI/testunit.pas
@@ -25,6 +25,8 @@ var
Form1: TForm1;
implementation
+uses
+ lclintf;
type
TMyThread = class(TThread)
@@ -63,7 +65,7 @@ Const
{$ENDIF}
Var
Client: TClient;
- w,h, x, y, xx, yy, i:integer;
+ w,h, x, y, xx, yy, i,t1,t2:integer;
bmp: TBitmap;
ReturnData : TRetData;
arr: Array Of Integer;
@@ -79,8 +81,19 @@ begin
Writeln('Creating the client');
Client := TClient.Create;
+ //Client.MWindow.SetTarget(77594696);
Writeln('Getting the dimensions');
Client.MWindow.GetDimensions(w, h);
+ t1 := lclintf.gettickcount;
+ for i := 0 to 100 do
+ Client.MFinder.FindColor(x, y, 123456, 0, 0, w, h);
+ t2 := lclintf.gettickcount;
+ writeln(inttostr(round((t2 - t1) / 101)));
+
+ //break;
+
+
+
writeln(inttostr(w) + ' , ' + inttostr(h));
Writeln('Setting target');
// Client.MWindow.SetTarget(67232,w_window);
@@ -159,7 +172,7 @@ begin
// Client.MWIndow.SetTarget(PRGB32(@Arr[0]), Point(Loopx + 1, Loopy + 1));
Client.MWindow.FreeReturnData;
- Client.MInput.IsMouseButtonDown(mouse_Left);
+ Client.MInput.IsMouseButtonDown(mouse_Right);
// Sleep(1000);
if Client.MInput.IsMouseButtonDown(mouse_Left) then
writeln('Left mouse is down!');
diff --git a/README b/README
new file mode 100644
index 0000000..277e88a
--- /dev/null
+++ b/README
@@ -0,0 +1,3 @@
+Hello, and welcome to the Mufasa project.
+
+blablabla
diff --git a/Units/MMLCore/input.pas b/Units/MMLCore/input.pas
index 305ca4b..d37052f 100644
--- a/Units/MMLCore/input.pas
+++ b/Units/MMLCore/input.pas
@@ -201,7 +201,7 @@ begin
event.xbutton.send_event := 1;
event.xbutton.same_screen:= 1;
- event.xbutton.subwindow:= 0;
+ event.xbutton.subwindow:= 0; // this can't be right.
event.xbutton.root := TClient(Client).MWindow.DesktopWindow;
event.xbutton.window := TClient(Client).MWindow.CurWindow;
event.xbutton.x_root:= x;
diff --git a/Units/MMLCore/window.pas b/Units/MMLCore/window.pas
index 9f885a6..792afc4 100644
--- a/Units/MMLCore/window.pas
+++ b/Units/MMLCore/window.pas
@@ -195,7 +195,7 @@ begin
XSetErrorHandler(Old_Handler);
Exit;
end;
- WriteLn(IntToStr(Self.XWindowImage^.width) + ', ' + IntToStr(Self.XWindowImage^.height));
+ //WriteLn(IntToStr(Self.XWindowImage^.width) + ', ' + IntToStr(Self.XWindowImage^.height));
Result.Ptr := PRGB32(Self.XWindowImage^.data);
Result.IncPtrWith := 0;
Self.XImageFreed:=False;