From abef02fd386b214a0d6a6f7afb1d282baeb3bacc Mon Sep 17 00:00:00 2001 From: Raymond Date: Thu, 22 Oct 2009 18:24:20 +0000 Subject: [PATCH] I herd u like test scripts? git-svn-id: http://www.villavu.com/repositories/merlijn/mufasa@150 3f818213-9676-44b0-a9b4-5e4c4e03d09d --- Tests/PS/DeformedTest.mufa | 21 +++++++++++++++++++++ Tests/PS/IncludeTest.mufa | 6 ++++++ 2 files changed, 27 insertions(+) create mode 100644 Tests/PS/DeformedTest.mufa create mode 100644 Tests/PS/IncludeTest.mufa diff --git a/Tests/PS/DeformedTest.mufa b/Tests/PS/DeformedTest.mufa new file mode 100644 index 0000000..0d3ff6d --- /dev/null +++ b/Tests/PS/DeformedTest.mufa @@ -0,0 +1,21 @@ +program New; +//Scar manual -> you have to pick x1,y1,x2,y2 yourself. (It's at the first bitmapa +var + Deformed ,x,y: integer; + ThaTime : integer; + i : integer; + acc : extended; +begin + Deformed := BitmapFromString(25, 24, 'beNrN1UEKwCAMBMDtb/oO' + + 'r/0//U1pISCiYUnCIpU9eRgihgTg525HD6pnRKZIkKAWEYJmjXI1F' + + 'VV2IhQavpzX02M3XHOdEZmSoohj5bmUW3CWMi3rkDf+k1q1AiX/QS' + + '21aqRFuRNssP2TQTv6suDmNVFcXi/8Qvf1'); + //Doing this same code in scar will result in invalid results, since + //fast replacedolor didn't work alright, atleast for me. + FastReplaceColor(Deformed,clblack,clwhite); + FastReplaceColor(deformed,82647,clblack); + ThaTime := GetSystemTime; + FindDeformedBitmapToleranceIn(Deformed, x, y, 119, 538, 213, 613, 70, 10, True, acc); + Writeln(inttostr(GetSystemTime - ThaTime)); + Writeln(floattostr(acc)); +end. diff --git a/Tests/PS/IncludeTest.mufa b/Tests/PS/IncludeTest.mufa new file mode 100644 index 0000000..8e9c926 --- /dev/null +++ b/Tests/PS/IncludeTest.mufa @@ -0,0 +1,6 @@ +program new; +{.include test.mufa} +begin + Writeln(TestStr); + Writeln(inttostr(MultiPly(500,-20))); +end.