1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-12-23 07:48:50 -05:00

Added freeze() to colour test.

Fixed a bug in cts 0, made cst 1 20% faster. Only cts 2 left to optimise.
(Can be optimised a lot!)



git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@94 3f818213-9676-44b0-a9b4-5e4c4e03d09d
This commit is contained in:
Wizzup? 2009-09-29 02:12:29 +00:00
parent 8ae45b0237
commit 950bf6cfa9
8 changed files with 697 additions and 648 deletions

View File

@ -33,15 +33,15 @@
<PackageName Value="LCL"/> <PackageName Value="LCL"/>
</Item2> </Item2>
</RequiredPackages> </RequiredPackages>
<Units Count="123"> <Units Count="125">
<Unit0> <Unit0>
<Filename Value="project1.lpr"/> <Filename Value="project1.lpr"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="project1"/> <UnitName Value="project1"/>
<CursorPos X="17" Y="12"/> <CursorPos X="10" Y="7"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="0"/> <EditorIndex Value="0"/>
<UsageCount Value="141"/> <UsageCount Value="143"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit0> </Unit0>
<Unit1> <Unit1>
@ -170,10 +170,10 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="TestUnit"/> <UnitName Value="TestUnit"/>
<CursorPos X="51" Y="133"/> <CursorPos X="37" Y="115"/>
<TopLine Value="110"/> <TopLine Value="83"/>
<EditorIndex Value="8"/> <EditorIndex Value="10"/>
<UsageCount Value="107"/> <UsageCount Value="109"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit18> </Unit18>
<Unit19> <Unit19>
@ -305,7 +305,7 @@
<CursorPos X="25" Y="17"/> <CursorPos X="25" Y="17"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="4"/> <EditorIndex Value="4"/>
<UsageCount Value="106"/> <UsageCount Value="108"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit37> </Unit37>
<Unit38> <Unit38>
@ -315,7 +315,7 @@
<CursorPos X="69" Y="25"/> <CursorPos X="69" Y="25"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="3"/> <EditorIndex Value="3"/>
<UsageCount Value="106"/> <UsageCount Value="108"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit38> </Unit38>
<Unit39> <Unit39>
@ -331,7 +331,7 @@
<UnitName Value="files"/> <UnitName Value="files"/>
<CursorPos X="37" Y="42"/> <CursorPos X="37" Y="42"/>
<TopLine Value="271"/> <TopLine Value="271"/>
<UsageCount Value="107"/> <UsageCount Value="109"/>
</Unit40> </Unit40>
<Unit41> <Unit41>
<Filename Value="../../Units/MMLCore/window.pas"/> <Filename Value="../../Units/MMLCore/window.pas"/>
@ -339,8 +339,8 @@
<UnitName Value="Window"/> <UnitName Value="Window"/>
<CursorPos X="24" Y="84"/> <CursorPos X="24" Y="84"/>
<TopLine Value="75"/> <TopLine Value="75"/>
<EditorIndex Value="9"/> <EditorIndex Value="12"/>
<UsageCount Value="106"/> <UsageCount Value="108"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit41> </Unit41>
<Unit42> <Unit42>
@ -355,8 +355,8 @@
<UnitName Value="CompTypes"/> <UnitName Value="CompTypes"/>
<CursorPos X="59" Y="545"/> <CursorPos X="59" Y="545"/>
<TopLine Value="524"/> <TopLine Value="524"/>
<EditorIndex Value="14"/> <EditorIndex Value="16"/>
<UsageCount Value="17"/> <UsageCount Value="18"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit43> </Unit43>
<Unit44> <Unit44>
@ -364,8 +364,8 @@
<UnitName Value="windowutil"/> <UnitName Value="windowutil"/>
<CursorPos X="86" Y="19"/> <CursorPos X="86" Y="19"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="10"/> <EditorIndex Value="13"/>
<UsageCount Value="35"/> <UsageCount Value="36"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit44> </Unit44>
<Unit45> <Unit45>
@ -374,17 +374,17 @@
<CursorPos X="32" Y="251"/> <CursorPos X="32" Y="251"/>
<TopLine Value="220"/> <TopLine Value="220"/>
<EditorIndex Value="5"/> <EditorIndex Value="5"/>
<UsageCount Value="15"/> <UsageCount Value="16"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit45> </Unit45>
<Unit46> <Unit46>
<Filename Value="../../Units/MMLCore/finder.pas"/> <Filename Value="../../Units/MMLCore/finder.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="finder"/> <UnitName Value="finder"/>
<CursorPos X="57" Y="15"/> <CursorPos X="70" Y="304"/>
<TopLine Value="2"/> <TopLine Value="272"/>
<EditorIndex Value="1"/> <EditorIndex Value="11"/>
<UsageCount Value="99"/> <UsageCount Value="101"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit46> </Unit46>
<Unit47> <Unit47>
@ -400,7 +400,7 @@
<UnitName Value="MMLThread"/> <UnitName Value="MMLThread"/>
<CursorPos X="132" Y="5"/> <CursorPos X="132" Y="5"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="97"/> <UsageCount Value="99"/>
</Unit48> </Unit48>
<Unit49> <Unit49>
<Filename Value="../../../Documents/fpc/rtl/objpas/classes/classesh.inc"/> <Filename Value="../../../Documents/fpc/rtl/objpas/classes/classesh.inc"/>
@ -412,10 +412,10 @@
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/> <Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<UnitName Value="mmlpsthread"/> <UnitName Value="mmlpsthread"/>
<CursorPos X="66" Y="1"/> <CursorPos X="46" Y="167"/>
<TopLine Value="1"/> <TopLine Value="157"/>
<EditorIndex Value="7"/> <EditorIndex Value="7"/>
<UsageCount Value="95"/> <UsageCount Value="97"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit50> </Unit50>
<Unit51> <Unit51>
@ -523,9 +523,11 @@
</Unit65> </Unit65>
<Unit66> <Unit66>
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
<CursorPos X="23" Y="15"/> <CursorPos X="54" Y="17"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<EditorIndex Value="8"/>
<UsageCount Value="28"/> <UsageCount Value="28"/>
<Loaded Value="True"/>
</Unit66> </Unit66>
<Unit67> <Unit67>
<Filename Value="../../../FPC/FPCCheckout/rtl/win/tthread.inc"/> <Filename Value="../../../FPC/FPCCheckout/rtl/win/tthread.inc"/>
@ -545,7 +547,7 @@
<UnitName Value="bitmaps"/> <UnitName Value="bitmaps"/>
<CursorPos X="63" Y="428"/> <CursorPos X="63" Y="428"/>
<TopLine Value="387"/> <TopLine Value="387"/>
<UsageCount Value="85"/> <UsageCount Value="87"/>
</Unit69> </Unit69>
<Unit70> <Unit70>
<Filename Value="../../../FPC/FPCCheckout/packages/fcl-image/src/fpcanvas.pp"/> <Filename Value="../../../FPC/FPCCheckout/packages/fcl-image/src/fpcanvas.pp"/>
@ -565,7 +567,7 @@
<IsPartOfProject Value="True"/> <IsPartOfProject Value="True"/>
<CursorPos X="30" Y="34"/> <CursorPos X="30" Y="34"/>
<TopLine Value="22"/> <TopLine Value="22"/>
<UsageCount Value="84"/> <UsageCount Value="86"/>
</Unit72> </Unit72>
<Unit73> <Unit73>
<Filename Value="../../../FPC/FPCCheckout/packages/fcl-image/src/fpcanvas.inc"/> <Filename Value="../../../FPC/FPCCheckout/packages/fcl-image/src/fpcanvas.inc"/>
@ -698,7 +700,7 @@
<CursorPos X="53" Y="27"/> <CursorPos X="53" Y="27"/>
<TopLine Value="9"/> <TopLine Value="9"/>
<EditorIndex Value="2"/> <EditorIndex Value="2"/>
<UsageCount Value="67"/> <UsageCount Value="69"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit92> </Unit92>
<Unit93> <Unit93>
@ -718,7 +720,9 @@
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/>
<CursorPos X="1" Y="1"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="9"/> <EditorIndex Value="9"/>
<UsageCount Value="10"/>
<Loaded Value="True"/>
</Unit95> </Unit95>
<Unit96> <Unit96>
<Filename Value="../../Units/PascalScript/uPSCompiler.pas"/> <Filename Value="../../Units/PascalScript/uPSCompiler.pas"/>
@ -758,7 +762,7 @@
<UnitName Value="plugins"/> <UnitName Value="plugins"/>
<CursorPos X="86" Y="128"/> <CursorPos X="86" Y="128"/>
<TopLine Value="128"/> <TopLine Value="128"/>
<UsageCount Value="61"/> <UsageCount Value="63"/>
</Unit101> </Unit101>
<Unit102> <Unit102>
<Filename Value="../../../Compilertje/Units/CogatUnits/compfiles.pas"/> <Filename Value="../../../Compilertje/Units/CogatUnits/compfiles.pas"/>
@ -788,7 +792,7 @@
</Unit105> </Unit105>
<Unit106> <Unit106>
<Filename Value="../../Units/MMLAddon/PSInc/psdefines.inc"/> <Filename Value="../../Units/MMLAddon/PSInc/psdefines.inc"/>
<CursorPos X="57" Y="4"/> <CursorPos X="1" Y="1"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="14"/> <UsageCount Value="14"/>
</Unit106> </Unit106>
@ -850,7 +854,7 @@
<UnitName Value="dtm"/> <UnitName Value="dtm"/>
<CursorPos X="52" Y="15"/> <CursorPos X="52" Y="15"/>
<TopLine Value="1"/> <TopLine Value="1"/>
<UsageCount Value="42"/> <UsageCount Value="44"/>
</Unit115> </Unit115>
<Unit116> <Unit116>
<Filename Value="../../../cogat/Units/CogatUnits/comppicker.pas"/> <Filename Value="../../../cogat/Units/CogatUnits/comppicker.pas"/>
@ -866,7 +870,7 @@
<CursorPos X="27" Y="34"/> <CursorPos X="27" Y="34"/>
<TopLine Value="13"/> <TopLine Value="13"/>
<EditorIndex Value="6"/> <EditorIndex Value="6"/>
<UsageCount Value="38"/> <UsageCount Value="40"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit117> </Unit117>
<Unit118> <Unit118>
@ -874,8 +878,8 @@
<UnitName Value="CompDragger"/> <UnitName Value="CompDragger"/>
<CursorPos X="101" Y="26"/> <CursorPos X="101" Y="26"/>
<TopLine Value="26"/> <TopLine Value="26"/>
<EditorIndex Value="11"/> <EditorIndex Value="14"/>
<UsageCount Value="16"/> <UsageCount Value="17"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit118> </Unit118>
<Unit119> <Unit119>
@ -884,11 +888,9 @@
<HasResources Value="True"/> <HasResources Value="True"/>
<ResourceBaseClass Value="Form"/> <ResourceBaseClass Value="Form"/>
<UnitName Value="MainForm"/> <UnitName Value="MainForm"/>
<CursorPos X="48" Y="1180"/> <CursorPos X="29" Y="635"/>
<TopLine Value="1161"/> <TopLine Value="612"/>
<EditorIndex Value="12"/>
<UsageCount Value="16"/> <UsageCount Value="16"/>
<Loaded Value="True"/>
</Unit119> </Unit119>
<Unit120> <Unit120>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/> <Filename Value="../../Units/MMLAddon/windowselector.pas"/>
@ -896,8 +898,8 @@
<UnitName Value="windowselector"/> <UnitName Value="windowselector"/>
<CursorPos X="76" Y="83"/> <CursorPos X="76" Y="83"/>
<TopLine Value="65"/> <TopLine Value="65"/>
<EditorIndex Value="13"/> <EditorIndex Value="15"/>
<UsageCount Value="28"/> <UsageCount Value="30"/>
<Loaded Value="True"/> <Loaded Value="True"/>
</Unit120> </Unit120>
<Unit121> <Unit121>
@ -913,120 +915,143 @@
<TopLine Value="338"/> <TopLine Value="338"/>
<UsageCount Value="10"/> <UsageCount Value="10"/>
</Unit122> </Unit122>
<Unit123>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<UnitName Value="cthreads"/>
<CursorPos X="28" Y="1077"/>
<TopLine Value="1070"/>
<EditorIndex Value="1"/>
<UsageCount Value="11"/>
<Loaded Value="True"/>
</Unit123>
<Unit124>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/inc/threadh.inc"/>
<CursorPos X="58" Y="78"/>
<TopLine Value="59"/>
<UsageCount Value="10"/>
</Unit124>
</Units> </Units>
<JumpHistory Count="28" HistoryIndex="27"> <JumpHistory Count="30" HistoryIndex="29">
<Position1> <Position1>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="40" Column="26" TopLine="25"/> <Caret Line="25" Column="37" TopLine="25"/>
</Position1> </Position1>
<Position2> <Position2>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="96" Column="43" TopLine="85"/> <Caret Line="46" Column="25" TopLine="25"/>
</Position2> </Position2>
<Position3> <Position3>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="77" Column="14" TopLine="49"/>
</Position3>
<Position4>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="11" Column="29" TopLine="1"/>
</Position4>
<Position5>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="9" Column="10" TopLine="1"/>
</Position5>
<Position6>
<Filename Value="testunit.pas"/>
<Caret Line="52" Column="43" TopLine="52"/>
</Position6>
<Position7>
<Filename Value="testunit.pas"/>
<Caret Line="54" Column="45" TopLine="54"/>
</Position7>
<Position8>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="72" Column="74" TopLine="59"/>
</Position8>
<Position9>
<Filename Value="../../Units/MMLCore/client.pas"/>
<Caret Line="17" Column="25" TopLine="1"/>
</Position9>
<Position10>
<Filename Value="../../Units/MMLAddon/windowselector.pas"/>
<Caret Line="79" Column="32" TopLine="65"/>
</Position10>
<Position11>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="56" Column="47" TopLine="37"/>
</Position11>
<Position12>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="74" Column="19" TopLine="49"/>
</Position12>
<Position13>
<Filename Value="../../Units/MMLAddon/colourpicker.pas"/>
<Caret Line="34" Column="27" TopLine="13"/>
</Position13>
<Position14>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="7" Column="90" TopLine="1"/>
</Position14>
<Position15>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="82" Column="17" TopLine="63"/>
</Position15>
<Position16>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="266" Column="51" TopLine="247"/>
</Position16>
<Position17>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="295" Column="55" TopLine="276"/>
</Position17>
<Position18>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="327" Column="53" TopLine="308"/>
</Position18>
<Position19>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="368" Column="53" TopLine="349"/>
</Position19>
<Position20>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="1004" Column="48" TopLine="985"/>
</Position20>
<Position21>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="1005" Column="43" TopLine="985"/>
</Position21>
<Position22>
<Filename Value="../../../cogat/mainform.pas"/>
<Caret Line="1008" Column="46" TopLine="985"/>
</Position22>
<Position23>
<Filename Value="testunit.pas"/>
<Caret Line="35" Column="78" TopLine="1"/>
</Position23>
<Position24>
<Filename Value="testunit.pas"/>
<Caret Line="25" Column="37" TopLine="25"/>
</Position24>
<Position25>
<Filename Value="testunit.pas"/>
<Caret Line="46" Column="25" TopLine="25"/>
</Position25>
<Position26>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="47" Column="25" TopLine="25"/> <Caret Line="47" Column="25" TopLine="25"/>
</Position26> </Position3>
<Position27> <Position4>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="136" Column="48" TopLine="108"/> <Caret Line="136" Column="48" TopLine="108"/>
</Position27> </Position4>
<Position28> <Position5>
<Filename Value="testunit.pas"/> <Filename Value="testunit.pas"/>
<Caret Line="139" Column="15" TopLine="117"/> <Caret Line="139" Column="15" TopLine="117"/>
</Position5>
<Position6>
<Filename Value="project1.lpr"/>
<Caret Line="7" Column="10" TopLine="1"/>
</Position6>
<Position7>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="12" Column="46" TopLine="1"/>
</Position7>
<Position8>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="313" Column="20" TopLine="294"/>
</Position8>
<Position9>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="321" Column="31" TopLine="294"/>
</Position9>
<Position10>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="327" Column="31" TopLine="294"/>
</Position10>
<Position11>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="343" Column="18" TopLine="324"/>
</Position11>
<Position12>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="346" Column="12" TopLine="324"/>
</Position12>
<Position13>
<Filename Value="../../../../../../usr/lib64/fpc/2.2.4/source/rtl/unix/cthreads.pp"/>
<Caret Line="1077" Column="28" TopLine="1070"/>
</Position13>
<Position14>
<Filename Value="testunit.pas"/>
<Caret Line="92" Column="29" TopLine="73"/>
</Position14>
<Position15>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="11" Column="86" TopLine="2"/>
</Position15>
<Position16>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="32" Column="38" TopLine="2"/>
</Position16>
<Position17>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="307" Column="52" TopLine="269"/>
</Position17>
<Position18>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="48" Column="71" TopLine="10"/>
</Position18>
<Position19>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="238" Column="59" TopLine="233"/>
</Position19>
<Position20>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="33" Column="65" TopLine="13"/>
</Position20>
<Position21>
<Filename Value="../../Units/MMLCore/finder.pas"/>
<Caret Line="285" Column="5" TopLine="253"/>
</Position21>
<Position22>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="134" Column="22" TopLine="108"/>
</Position22>
<Position23>
<Filename Value="../../Units/MMLAddon/PSInc/Wrappers/other.inc"/>
<Caret Line="16" Column="12" TopLine="1"/>
</Position23>
<Position24>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="134" Column="22" TopLine="108"/>
</Position24>
<Position25>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="112" Column="19" TopLine="79"/>
</Position25>
<Position26>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="176" Column="20" TopLine="151"/>
</Position26>
<Position27>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="134" Column="24" TopLine="115"/>
</Position27>
<Position28>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="176" Column="7" TopLine="146"/>
</Position28> </Position28>
<Position29>
<Filename Value="../../Units/MMLAddon/mmlpsthread.pas"/>
<Caret Line="179" Column="71" TopLine="157"/>
</Position29>
<Position30>
<Filename Value="../../Units/MMLAddon/PSInc/pscompile.inc"/>
<Caret Line="15" Column="95" TopLine="1"/>
</Position30>
</JumpHistory> </JumpHistory>
</ProjectOptions> </ProjectOptions>
<CompilerOptions> <CompilerOptions>
@ -1035,8 +1060,8 @@
<Filename Value="SAMufasaGUI"/> <Filename Value="SAMufasaGUI"/>
</Target> </Target>
<SearchPaths> <SearchPaths>
<IncludeFiles Value="$(ProjOutDir)/"/> <IncludeFiles Value="$(ProjOutDir)/;$(ProjPath)../../Units/MMLAddon/PSInc/"/>
<OtherUnitFiles Value="$(ProjPath)../../Units/MMLCore/;$(ProjPath)../../Units/MMLAddon/;$(ProjPath)../../Units/PascalScript/;$(ProjPath)../../Units/Misc/"/> <OtherUnitFiles Value="$(ProjPath)../../Units/MMLCore/;$(ProjPath)../../Units/MMLAddon/;$(ProjPath)../../Units/PascalScript/;$(ProjPath)../../Units/Misc/;$(ProjPath)../../Units/MMLAddon/PSInc/"/>
</SearchPaths> </SearchPaths>
<CodeGeneration> <CodeGeneration>
<Optimizations> <Optimizations>

View File

@ -1,3 +1,5 @@
{ This is an automatically generated lazarus resource file }
LazarusResources.Add('TForm1','FORMDATA',[ LazarusResources.Add('TForm1','FORMDATA',[
'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'{'#4#6'Height'#3#29#2#3'Top'#3#148#0#5'Wi' 'TPF0'#6'TForm1'#5'Form1'#4'Left'#3'{'#4#6'Height'#3#29#2#3'Top'#3#148#0#5'Wi'
+'dth'#3#251#2#13'ActiveControl'#7#8'SynEdit1'#7'Caption'#6#9'Mufasa v2'#12'C' +'dth'#3#251#2#13'ActiveControl'#7#8'SynEdit1'#7'Caption'#6#9'Mufasa v2'#12'C'

View File

@ -87,6 +87,10 @@ begin
MMLPSThread.Client.MWindow.SetWindow(Form1.Window); MMLPSThread.Client.MWindow.SetWindow(Form1.Window);
MMLPSThread.Resume; MMLPSThread.Resume;
// sleep(500);
// MMLPSThread.PSScript.Stop;
end; end;
procedure TForm1.Button1Click(Sender: TObject); procedure TForm1.Button1Click(Sender: TObject);

View File

@ -5,18 +5,18 @@ begin
getclientdimensions(w,h); getclientdimensions(w,h);
writeln(inttostr(w) + ', ' + inttostr(h)); writeln(inttostr(w) + ', ' + inttostr(h));
freeze();
for i := 0 to 2 do for i := 0 to 2 do
begin begin
setcolortolerancespeed(i); setcolortolerancespeed(i);
t := getsystemtime; t := getsystemtime;
for j := 0 to 100 do for j := 0 to 100 do
findcolortolerance(x, y, 255, 0, 0, w -1 , h -1, 40); findcolortolerance(x, y, 2532562, 0, 0, w -1 , h -1, 1);
t2 := getsystemtime; t2 := getsystemtime;
writeln('Time for 101 tries: ' + inttostr(t2 - t) + ' ms.'); writeln('Time for 101 tries: ' + inttostr(t2 - t) + ' ms.');
writeln('That is ' + FloatToStr((t2 - t) / 101) + ' ms each.'); writeln('That is ' + FloatToStr((t2 - t) / 101) + ' ms each.');
if findcolortolerance(x, y, 255, 0, 0, w-1, h-1, 40) then if findcolortolerance(x, y, 2532562, 0, 0, w-1, h-1, 1) then
begin begin
writeln('CTS: ' + inttostr(I) + '; Found the colour at (' + inttostr(x) + ', ' + writeln('CTS: ' + inttostr(I) + '; Found the colour at (' + inttostr(x) + ', ' +
inttostr(y) + ')'); inttostr(y) + ')');
@ -25,6 +25,7 @@ begin
end else end else
writeln('not found'); writeln('not found');
end; end;
unfreeze();
end. end.
Compiled succesfully in 7 ms. Compiled succesfully in 7 ms.

View File

@ -8,3 +8,12 @@ begin
Sleep(t); Sleep(t);
end; end;
function Freeze: boolean;
begin
result := CurrThread.Client.MWindow.Freeze();
end;
function Unfreeze: boolean;
begin
result := CurrThread.Client.MWindow.Unfreeze;
end;

View File

@ -14,6 +14,9 @@ Sender.AddFunction(@max,'function Max(a, b: Integer): Integer;');
Sender.AddFunction(@min,'function Min(a, b: Integer): Integer;'); Sender.AddFunction(@min,'function Min(a, b: Integer): Integer;');
Sender.AddFunction(@pssqr,'function Sqr(e : extended) : extended;'); Sender.AddFunction(@pssqr,'function Sqr(e : extended) : extended;');
Sender.AddFunction(@Freeze, 'function freeze:boolean;');
Sender.AddFunction(@Unfreeze, 'function unfreeze: boolean;');
Sender.AddFunction(@GetColor,'function GetColor(x, y: Integer): Integer;'); Sender.AddFunction(@GetColor,'function GetColor(x, y: Integer): Integer;');
Sender.AddFunction(@FindColor, 'function findcolor(var x, y: integer; color, x1, y1, x2, y2: integer): boolean;'); Sender.AddFunction(@FindColor, 'function findcolor(var x, y: integer; color, x1, y1, x2, y2: integer): boolean;');
Sender.AddFunction(@FindColorTolerance, 'function findcolortolerance(var x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean;'); Sender.AddFunction(@FindColorTolerance, 'function findcolortolerance(var x, y: integer; color, x1, y1, x2, y2, tol: integer): boolean;');

View File

@ -16,7 +16,6 @@ type
Parser: TPSPascalPreProcessorParser; const Active: Boolean; Parser: TPSPascalPreProcessorParser; const Active: Boolean;
const DirectiveName, DirectiveParam: string; var Continue: Boolean); const DirectiveName, DirectiveParam: string; var Continue: Boolean);
protected protected
PSScript : TPSScript;
DebugTo : TMemo; DebugTo : TMemo;
PluginsToload : Array of integer; PluginsToload : Array of integer;
procedure OnCompile(Sender: TPSScript); procedure OnCompile(Sender: TPSScript);
@ -29,6 +28,7 @@ type
procedure OnThreadTerminate(Sender: TObject); procedure OnThreadTerminate(Sender: TObject);
procedure Execute; override; procedure Execute; override;
public public
PSScript : TPSScript; // Moved to public, as we can't kill it otherwise.
Client : TClient; Client : TClient;
procedure SetPSScript(Script : string); procedure SetPSScript(Script : string);
procedure SetDebug( Strings : TMemo ); procedure SetDebug( Strings : TMemo );

View File

@ -271,7 +271,7 @@ begin
begin begin
for xx := x1 to x2 do for xx := x1 to x2 do
begin begin
if ((abs(clR-Ptr^.R) <= Tol) and (abs(clG-Ptr^.G) <= Tol) and (Abs(clG-Ptr^.B) <= Tol)) then if ((abs(clB-Ptr^.B) <= Tol) and (abs(clG-Ptr^.G) <= Tol) and (Abs(clR-Ptr^.R) <= Tol)) then
goto Hit; goto Hit;
inc(Ptr); inc(Ptr);
end; end;
@ -279,16 +279,21 @@ begin
end; end;
1: 1:
begin
Tol := Sqr(Tol);
for yy := y1 to y2 do for yy := y1 to y2 do
begin begin
for xx := x1 to x2 do for xx := x1 to x2 do
begin begin
if (Sqrt(sqr(clR-Ptr^.R) + sqr(clG - Ptr^.G) + sqr(clB - Ptr^.B)) <= Tol) then if (sqr(clB - Ptr^.B) + sqr(clG - Ptr^.G) + sqr(clR-Ptr^.R)) <= Tol then
goto Hit; goto Hit;
inc(ptr); inc(ptr);
end; end;
Inc(Ptr, PtrInc); Inc(Ptr, PtrInc);
end; end;
end;
2: 2:
begin begin
for yy := y1 to y2 do for yy := y1 to y2 do