FHannes Posted April 4, 2012 Share Posted April 4, 2012 Heh, I've been coding like a mad man, here it is, already, 3.33 Beta. This beta contains the long awaited firewall rules editor, as well as a new library system with improved support for legacy libraries. A new library architecture will also be introduced before the build is pushed to RC. Regular: http://svn.scar-divi.com/scar/ Portable: http://svn.scar-divi.com/scar_portable/ Setup instructions: http://forums.scar-divi.com/showthread.php?505-Downloading-SCAR-Divi-Prerelease Changelog: Bugfixes: - Memory leak in client system - Bug in client system with multi-monitor setups - FindColorSkipCoords(Tolerance) failed when a TPA with duplicate coordinates was entered - Types were not exported correctly from plugins - Functions updated/improved and ported to new framework: * FindColorSkipBox(Array)(Tolerance) - ScriptFile and TimeRunning did not function correctly when used with ThreadSafeCall - LoadDebugBitmap always returned False Tweaks: - Improved firewall system + now powered by SQLite3 rather than XML - New library system - Legacy libraries now support OnLoadLib and OnUnloadLib callbacks - Legacy libraries once again receive all previously included functions though SetFunctions except for those removed from SCAR - BitmapAssigned and CreateBitmap now export to legacy libraries New: - procedure SortTPAByRow(var TPA: TPointArray); - procedure TPAExtractCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended); - procedure TPAFilterCircle(var TPA: TPointArray; const Center: TPoint; const Radius: Extended); - Firewall rules editor - function CreateBitmap(const Width, Height, Color: Integer): Integer; Removed: - FindColorComp - TColorComp - MakeScreenPath Happy testing! ~Freddy Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 5, 2012 Share Posted April 5, 2012 (edited) Freddy, if I send you a script could look at it and tell me WTF is going on? Basically I create a small global bitmap using BitmapFromString at script startup, then later in the script create a second larger bitmap local to the procedure it's in using CreateBitmap. When I draw that second bitmap onto the smart canvas I see...The first bitmap? which is never used anywhere (yet) other than create it at script startup and destroy it at script end. Tried creating a scaled down script to demo the problem, and of course it worked fine. I'm left scratching my head exclaiming WTH!!! Edit: Got a simplied script that shows the issue:[sCAR]program New; var Logo: Integer; procedure Test; var Bitmap: Integer; begin Bitmap := CreateBitmap(200, 50, 15245824); try FastSetP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Tx4d9rM3ZfT426yGJUbvMpjXAvC7Qv3WR3jrG2KtipPXvnw4q0nprT4r6f1KJ3FIWSYHIkDIRRT+HAILOZoLSf+HqUJHHLx0cPKx93tJQkxzZn7qlPj+XsDCwI9cyk2+aDjQQ51sT6tKdHD/x4VvTiZ1TwBlVMQMoJycRz2XifWjRsBPVDYiZwPRPkJ/2oQWdAkVcPf2mvLGw9nXx+X2RRHKNqz+bapLiLe6M5Mcy8zZ5sX+eCUI/ynYFtOQd6anNedzcLXneLR54p+O80Mq5eMKqSvJXyBme4Q3q1dLYQjUaNRv3nz+a0/wMcDv1J'); try Test; finally FreeBitmap(Logo); end; end. [/sCAR] Runtime Error Line 12 Coordinate outside bitmap bounds(40,40) is outside a 100x50 bitmap? It is outside the bounds of the 1st bitmap, which is what appears to be going on here. Edited April 5, 2012 by Bixby Sayz Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 5, 2012 Author Share Posted April 5, 2012 Not sure what to tell you... That script runs fine for me... Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 5, 2012 Share Posted April 5, 2012 Interesting. I'll try it on a couple other machines. Worst case I revert to using BitmapFromString to create it then fill it with background color. Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 5, 2012 Author Share Posted April 5, 2012 Interesting. I'll try it on a couple other machines. Worst case I revert to using BitmapFromString to create it then fill it with background color. I'm still not able to reproduce your problem, I've checked the code and there's nothing that could account for the things you're describing... Quote Link to comment Share on other sites More sharing options...
Bixby Sayz Posted April 5, 2012 Share Posted April 5, 2012 Guess my machines are just wonky. Tried in on my Win 7 Ultimate x64 laptop and a xp virtual machine with the same results. Gonna try it on a fresh install when I get chance later. Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 7, 2012 Author Share Posted April 7, 2012 Guess my machines are just wonky. Tried in on my Win 7 Ultimate x64 laptop and a xp virtual machine with the same results. Gonna try it on a fresh install when I get chance later. Are there any particular steps to reproducing the issue with that script? Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted April 13, 2012 Share Posted April 13, 2012 When is this version going to pushed to release? =) Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 13, 2012 Author Share Posted April 13, 2012 When is this version going to pushed to release? =) RC should be released within a week tops, final should be released soon after that, I'm making some changes to the roadmap. Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted April 13, 2012 Share Posted April 13, 2012 Sweet, it has felt like forever since there has been a release =p. Im sure your like me though exams around every corner. lol. Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 13, 2012 Author Share Posted April 13, 2012 Sweet, it has felt like forever since there has been a release =p. Im sure your like me though exams around every corner. lol. Forever? The last release was like 2 weeks ago at most, before that it was like 6 weeks Normally I'm on a monthly release schedule... Quote Link to comment Share on other sites More sharing options...
shadowrecon Posted April 14, 2012 Share Posted April 14, 2012 Forever? The last release was like 2 weeks ago at most, before that it was like 6 weeks Normally I'm on a monthly release schedule... Keyword was "Felt" =p lol. Im sure you have a plan i just keep getting tired of not being able to double click a script and open it =p Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted April 14, 2012 Share Posted April 14, 2012 the new beta brick my scripts again please look again at if (FindColorCircleTolerance(xf, yf, npcminimap, x, y, abstand, npcminimaptolerance)=true) it works with the alpha very good but now it dont find the color ^^ and i know that u have changed that a little ^^...... it cant find this color npcminimap:= 39423; but the color is correckt checkt 2 times with the alpha it returns the color with the color picker and the same by the beta greetings Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 14, 2012 Author Share Posted April 14, 2012 (edited) Keyword was "Felt" =p lol. Im sure you have a plan i just keep getting tired of not being able to double click a script and open it =p Why don't you just associate SCAR files in the tools menu? the new beta brick my scripts again please look again at if (FindColorCircleTolerance(xf, yf, npcminimap, x, y, abstand, npcminimaptolerance)=true) it works with the alpha very good but now it dont find the color ^^ and i know that u have changed that a little ^^...... it cant find this color npcminimap:= 39423; but the color is correckt checkt 2 times with the alpha it returns the color with the color picker and the same by the beta greetings Are you using the latest revision (#310)? FindColorCircle doesn't seem to contain any (more) bugs and the function it's based on passes all tests in my testing framework... EDIT: I tested FindColorCircle, it's exactly the same as the tolerance version except for hos it compares colors obviously... And I had it dump the search bitmap and color every pixel it checked in red, and it found the color it was searching for perfectly and the search area looks good as well... Edited April 14, 2012 by Freddy Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted April 14, 2012 Share Posted April 14, 2012 load again svn update right now ...... dont find the color ..... svn update 310 scar help/about 3.33.00 same script work with 3.33 alpha testet 2 min ago ^^ Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 14, 2012 Author Share Posted April 14, 2012 Are you sure FindColorCircleTolerance is the problem? Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted April 14, 2012 Share Posted April 14, 2012 .......dont find exact that color .... it is a color at the minnimap from that line normaly it find that color at the minimap click to center works with the alpha and not with the beta and it is a mainfunction so it runs a lot of times in the mainloop ..... do you remeber that there was a problem with the tolerance ? may be that is the problem ?!? Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 14, 2012 Author Share Posted April 14, 2012 All tolerance algorithms are tested and work like they did in previous versions... Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted April 15, 2012 Share Posted April 15, 2012 (edited) something have to be diffrent is the right version uploadet? ...... belive it cant find the color something is wrong see output and code [scar] function ship: boolean; var colors1 : TPointArray; ziehlwahlcounteri, maxziehlwahl : integer; begin result:=false; gamemessages; maxziehlwahl:=4; if (Findcolortolerance(x,y,meinschiff,mmx1,mmy1,mmx2,mmy2,meinschiff_tolerance)=true)then begin if (FindColorsSpiralTolerance(x, y, colors1, npcminimap, mmx1,mmy1,mmx2,mmy2, npcminimaptolerance)=false)then begin writeln('no npcs found at Minimap'); if (checkmove=true) then drive; end else begin writeln('foundddddddddd npcs at Minimap'); terminatescript; for i := 0 to High(Colors1) do begin result:=true; double_x:=High(Colors1); ........... ............[/scar] output alpha checkpointfightboss keinen boss gefindet!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! farben auf Minimap erkannt - bin wohl am leben keine gamemessage gefunden foundddddddddd npcs at Minimap Stopped execution (3606,3976 ms) output beta .... checkpointfightboss keinen boss gefindet!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! farben auf Minimap erkannt - bin wohl am leben keine gamemessage gefunden no npcs found at Minimap function checkmove started and the script dont stop at beta .... so there is a diffrent exact at this function point between alpha and beta ------- lalalala ..... i see FindColorsSpiralTolerance...... i told u the wrong funktion ..... crap sorry ... now the color circle seems to work for me to (check)....... sorry that i waste your time ...... and look at this funktion FindColorsSpiralTolerance Edited April 15, 2012 by opiumhautopium1 Quote Link to comment Share on other sites More sharing options...
FHannes Posted April 15, 2012 Author Share Posted April 15, 2012 I figured it must've been another function. I did modify FindColorsSpiralTolerance to integrate it into the new tolerance framework because currently there are doubles of every tolerance algorithm for old and new code. The FindColorsSpiralTolerance function however is an old leftover from kaitnieks which I haven't had the chance to rewrite yet, I'll do that now as I've just started writing new spiral functions for the new colorfinding framework. Once that's done I'll post in here when a new copy is available. There's very little chance of the function working incorrectly after that. ---------- Post added at 05:17 PM ---------- Previous post was at 04:37 PM ---------- I've uploaded a new copy with a new FindColorsSpiralTolerance function. Quote Link to comment Share on other sites More sharing options...
opiumhautopium1 Posted April 15, 2012 Share Posted April 15, 2012 test and work ^^ thx a lot freddy ^^ Quote Link to comment Share on other sites More sharing options...