1
0
mirror of https://github.com/moparisthebest/Simba synced 2024-11-24 02:02:17 -05:00
Simba/Tests/PS/bmpbench.simba
Merlijn Wajer 9b3694f105 Merge new CTS/Finder system.
Touches pretty much all the functions in finder.pas, so I expect a lot of
functions to break. Tests will have to be written and results will have to be
compared with Simba 0.97. Still, I think it's ready for merging to simba-next.

Squashed commit of the following:

commit ef3bfa6410
Merge: d1e3645 5b3e2a8
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Aug 4 00:44:01 2011 +0200

    Merge branch 'simba-next' into cts-rework

commit 5b3e2a864b
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Aug 4 00:41:00 2011 +0200

    Merge new CTS/Finder system.

    Touches pretty much all the functions in finder.pas, so I expect a lot of
    functions to break. Tests will have to be written and results will have to be
    compared with Simba 0.97. Still, I think it's ready for merging to simba-next.

    Squashed commit of the following:

    commit d1e3645ee5
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 19:08:23 2011 +0200

        MML/Finder: Fix all compiler hints + bug.

    commit f159f20bc2
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 19:05:03 2011 +0200

        MML/Finder: Fix FindDTMsRotated.

    commit 1fc33752e4
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 19:04:16 2011 +0200

        MML/Finder: FindDTMsRotated rework.

    commit a621a6e8da
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 18:13:36 2011 +0200

        MML/Finder: FindDTMs rework done.

    commit 0b592eef86
    Merge: 56e01c6 aaafd6b
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 16:48:09 2011 +0200

        Merge branch 'master' into cts-rework

        Conflicts:
        	Units/MMLCore/finder.pas

    commit 56e01c67fa
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 16:16:19 2011 +0200

        MML/Finder: CTS: Bitmap+Color functions done.

        Only DTM to go.

    commit 464b90d42b
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Aug 1 13:58:49 2011 +0200

        MMLCore/finder: Small cleanup.

    commit 2414f60c08
    Merge: 55b0435 a20a31a
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jul 31 18:12:41 2011 +0200

        Merge branch 'master' into cts-rework

    commit 55b0435a4e
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 20:27:54 2011 +0200

        Tests: Update BmpBench.

    commit 013daccf07
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 20:09:31 2011 +0200

        MML/Core: Cleanup.

    commit 6f32e21291
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 20:08:17 2011 +0200

        MML/Core: FindBitmapToleranceIn seems to work.

    commit 3b939443e8
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 19:10:10 2011 +0200

        MML/Core: FindBitmapToleranceIn is nearly finished.

        Speed is nice, results are not accurate yet.
        I probably missed something when pre-loading the data.

    commit 0422f0eb5a
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 15:53:48 2011 +0200

        MML/Core: Fixes for FindBitmapToleranceIn.

    commit 65f4ae16ed
    Merge: daff307 353d1f3
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 14:32:46 2011 +0200

        Merge branch 'master' into cts-rework

    commit daff307f3d
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 13:46:10 2011 +0200

        Tests: Add BmpBench.

    commit cdb89a1802
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 13:12:21 2011 +0200

        MMLCore: FindBitmapToleranceIn cts rewrite.

    commit d0bd81c2e9
    Merge: 3282636 da0de6e
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 30 00:15:50 2011 +0200

        Merge branch 'master' into cts-rework

    commit 3282636178
    Merge: 7c86003 a8cdf77
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jul 25 16:50:43 2011 +0200

        Merge branch 'master' into cts-rework

    commit 7c8600311c
    Merge: 153025f e0767cb
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jul 24 00:14:53 2011 +0200

        Merge branch 'master' into cts-rework

        Conflicts:
        	Doc/sphinx/conf.py
        	Doc/sphinx/libmml/intro.rst

    commit 153025f080
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jul 17 19:51:16 2011 +0200

        libMML: Changed the indentation.

    commit 8abd502580
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jul 17 19:37:33 2011 +0200

        Documentation: Bump version to 820.

    commit 031654b3d1
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jul 17 19:36:21 2011 +0200

        Documentation: Initial libMML documentation.

    commit f91c9ffb0e
    Merge: f5c9690 989d077
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jul 7 12:00:58 2011 +0200

        Merge branch 'master' into cts-rework

    commit f5c9690bee
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jul 7 11:59:15 2011 +0200

        Finder: More rework and cleanups.

    commit 79021409d0
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 21:34:03 2011 +0200

        Finder: CTS 2 fix.

    commit cda571dcb0
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 21:06:17 2011 +0200

        Finder: Remote tolerance param. Cleanups.

    commit 733a8cbf32
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 20:39:44 2011 +0200

        Finder: More fixes. :-)

    commit e6b005b61f
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 18:34:49 2011 +0200

        Finder: CTS-rework fixes.

    commit 6f896b56a2
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 18:15:33 2011 +0200

        Finder: Start CTS rework.

    commit a630399148
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 13:01:22 2011 +0200

        Small TODO update.

    commit 0e6bf83a5c
    Merge: f19fd6b f2873b1
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Wed Jul 6 12:59:09 2011 +0200

        Merge branch 'master' into cts-rework

    commit f19fd6bf8d
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jul 3 20:42:14 2011 +0200

        Simba/Doc: Add Raymond to doc.

    commit 451ab89db3
    Merge: 37183f5 35026bc
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sat Jul 2 14:48:43 2011 +0200

        Merge branch 'master' into cts-rework

    commit 37183f5fd0
    Merge: cca7b05 6873e72
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Tue Jun 28 22:10:02 2011 +0200

        Merge branch 'master' into cts-rework

    commit cca7b05213
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jun 16 17:03:14 2011 +0200

        Add CTS 3 to FindColorsTolerance.

        Conflicts:

        	Units/MMLCore/finder.pas

    commit c837d9b960
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jun 16 16:33:25 2011 +0200

        CTS 3: Fix typo.

    commit 52db461f84
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 6 16:06:17 2011 +0200

        CTS 3: Now implement the formula properly.

    commit 7a0db25416
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Sun Jun 5 19:44:52 2011 +0200

        Add L*a*b CTS (3).

    commit 2e1e786d0e
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jun 16 15:11:17 2011 +0200

        FindBitmapToleranceIn now works.

    commit 58ea6021cd
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jun 16 14:26:20 2011 +0200

        CTS work. CTS 2 is still broken for bitmaps.

    commit 91d952d33a
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Thu Jun 16 12:52:10 2011 +0200

        CTS cleanups.

    commit d9836a251c
    Merge: 5bf7d8b bfc3f86
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 13 20:44:08 2011 +0200

        Merge branch 'master' into cts-rework

    commit 5bf7d8beea
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 13 20:38:00 2011 +0200

        Completed first CTS rework.

    commit 7a412d1670
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 13 20:21:23 2011 +0200

        CTS: Cleanups.

    commit 14474a84ab
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 13 18:16:59 2011 +0200

        CTS rework for FindColorsTolerance.

    commit b87a123701
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 13 17:44:04 2011 +0200

        More cleanups to CTS.

    commit 9415d08100
    Author: Merlijn Wajer <merlijn@wizzup.org>
    Date:   Mon Jun 13 17:41:06 2011 +0200

        Finder: Trying a different CTS approach.

commit d1e3645ee5
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 19:08:23 2011 +0200

    MML/Finder: Fix all compiler hints + bug.

commit f159f20bc2
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 19:05:03 2011 +0200

    MML/Finder: Fix FindDTMsRotated.

commit 1fc33752e4
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 19:04:16 2011 +0200

    MML/Finder: FindDTMsRotated rework.

commit a621a6e8da
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 18:13:36 2011 +0200

    MML/Finder: FindDTMs rework done.

commit 0b592eef86
Merge: 56e01c6 aaafd6b
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 16:48:09 2011 +0200

    Merge branch 'master' into cts-rework

    Conflicts:
    	Units/MMLCore/finder.pas

commit 56e01c67fa
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 16:16:19 2011 +0200

    MML/Finder: CTS: Bitmap+Color functions done.

    Only DTM to go.

commit 464b90d42b
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Aug 1 13:58:49 2011 +0200

    MMLCore/finder: Small cleanup.

commit 2414f60c08
Merge: 55b0435 a20a31a
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jul 31 18:12:41 2011 +0200

    Merge branch 'master' into cts-rework

commit 55b0435a4e
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 20:27:54 2011 +0200

    Tests: Update BmpBench.

commit 013daccf07
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 20:09:31 2011 +0200

    MML/Core: Cleanup.

commit 6f32e21291
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 20:08:17 2011 +0200

    MML/Core: FindBitmapToleranceIn seems to work.

commit 3b939443e8
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 19:10:10 2011 +0200

    MML/Core: FindBitmapToleranceIn is nearly finished.

    Speed is nice, results are not accurate yet.
    I probably missed something when pre-loading the data.

commit 0422f0eb5a
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 15:53:48 2011 +0200

    MML/Core: Fixes for FindBitmapToleranceIn.

commit 65f4ae16ed
Merge: daff307 353d1f3
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 14:32:46 2011 +0200

    Merge branch 'master' into cts-rework

commit daff307f3d
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 13:46:10 2011 +0200

    Tests: Add BmpBench.

commit cdb89a1802
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 13:12:21 2011 +0200

    MMLCore: FindBitmapToleranceIn cts rewrite.

commit d0bd81c2e9
Merge: 3282636 da0de6e
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 30 00:15:50 2011 +0200

    Merge branch 'master' into cts-rework

commit 3282636178
Merge: 7c86003 a8cdf77
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jul 25 16:50:43 2011 +0200

    Merge branch 'master' into cts-rework

commit 7c8600311c
Merge: 153025f e0767cb
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jul 24 00:14:53 2011 +0200

    Merge branch 'master' into cts-rework

    Conflicts:
    	Doc/sphinx/conf.py
    	Doc/sphinx/libmml/intro.rst

commit 153025f080
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jul 17 19:51:16 2011 +0200

    libMML: Changed the indentation.

commit 8abd502580
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jul 17 19:37:33 2011 +0200

    Documentation: Bump version to 820.

commit 031654b3d1
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jul 17 19:36:21 2011 +0200

    Documentation: Initial libMML documentation.

commit f91c9ffb0e
Merge: f5c9690 989d077
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jul 7 12:00:58 2011 +0200

    Merge branch 'master' into cts-rework

commit f5c9690bee
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jul 7 11:59:15 2011 +0200

    Finder: More rework and cleanups.

commit 79021409d0
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 21:34:03 2011 +0200

    Finder: CTS 2 fix.

commit cda571dcb0
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 21:06:17 2011 +0200

    Finder: Remote tolerance param. Cleanups.

commit 733a8cbf32
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 20:39:44 2011 +0200

    Finder: More fixes. :-)

commit e6b005b61f
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 18:34:49 2011 +0200

    Finder: CTS-rework fixes.

commit 6f896b56a2
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 18:15:33 2011 +0200

    Finder: Start CTS rework.

commit a630399148
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 13:01:22 2011 +0200

    Small TODO update.

commit 0e6bf83a5c
Merge: f19fd6b f2873b1
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Wed Jul 6 12:59:09 2011 +0200

    Merge branch 'master' into cts-rework

commit f19fd6bf8d
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jul 3 20:42:14 2011 +0200

    Simba/Doc: Add Raymond to doc.

commit 451ab89db3
Merge: 37183f5 35026bc
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sat Jul 2 14:48:43 2011 +0200

    Merge branch 'master' into cts-rework

commit 37183f5fd0
Merge: cca7b05 6873e72
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Tue Jun 28 22:10:02 2011 +0200

    Merge branch 'master' into cts-rework

commit cca7b05213
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jun 16 17:03:14 2011 +0200

    Add CTS 3 to FindColorsTolerance.

    Conflicts:

    	Units/MMLCore/finder.pas

commit c837d9b960
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jun 16 16:33:25 2011 +0200

    CTS 3: Fix typo.

commit 52db461f84
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 6 16:06:17 2011 +0200

    CTS 3: Now implement the formula properly.

commit 7a0db25416
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Sun Jun 5 19:44:52 2011 +0200

    Add L*a*b CTS (3).

commit 2e1e786d0e
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jun 16 15:11:17 2011 +0200

    FindBitmapToleranceIn now works.

commit 58ea6021cd
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jun 16 14:26:20 2011 +0200

    CTS work. CTS 2 is still broken for bitmaps.

commit 91d952d33a
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Thu Jun 16 12:52:10 2011 +0200

    CTS cleanups.

commit d9836a251c
Merge: 5bf7d8b bfc3f86
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 13 20:44:08 2011 +0200

    Merge branch 'master' into cts-rework

commit 5bf7d8beea
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 13 20:38:00 2011 +0200

    Completed first CTS rework.

commit 7a412d1670
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 13 20:21:23 2011 +0200

    CTS: Cleanups.

commit 14474a84ab
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 13 18:16:59 2011 +0200

    CTS rework for FindColorsTolerance.

commit b87a123701
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 13 17:44:04 2011 +0200

    More cleanups to CTS.

commit 9415d08100
Author: Merlijn Wajer <merlijn@wizzup.org>
Date:   Mon Jun 13 17:41:06 2011 +0200

    Finder: Trying a different CTS approach.
2011-08-04 01:23:49 +02:00

37 lines
699 B
Plaintext

program new;
var
Bmp : integer;
x,y : integer;
w,h : integer;
t, i, c: integer;
begin
Bmp := createBitmap(15, 10);
FastDrawClear(bmp, clRed);
GetClientDimensions(w,h);
writeln(w);
writeln(h);
for c := 0 to 2 do
begin
writeln('cts: ' + inttostr(c));
setcolortolerancespeed(c);
t:=getsystemtime;
for i := 0 to 10 do
findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10);
writeln((getsystemtime-t) / 10.0);
if findBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,10) then
begin
writeln('found');
movemouse(x,y);
end;
end;
{if FindBitmapToleranceIn(bmp,x,y,0,0,w-1,h-1,300) then
begin
writeln('found');
MoveMouse(x,y);
end;}
end.