Topic: AutoRect v0.1 (Brickset tool for automating brk creation tasks)

AutoRect v0.1 (Brickset tool for automating brk creation tasks)
"Save time" yikes

DOWNLOAD
For Windows only
http://sourceforge.net/projects/lainz00 … z/download

Screenshot: http://opensnc.sourceforge.net/wiki/images/b/b3/Autorect_01.PNG

Input: http://opensnc.sourceforge.net/wiki/images/a/ab/Autorect_Test_image.png

Output:

brick 0
{ 
    sprite
    {
        source_file     images/test.png
        source_rect     2 2 169 167
        frame_size      169 167
    }
}
brick 1
{ 
    sprite
    {
        source_file     images/test.png
        source_rect     381 4 169 167
        frame_size      169 167
    }
}
brick 2
{ 
    sprite
    {
        source_file     images/test.png
        source_rect     202 7 169 167
        frame_size      169 167
    }
}
brick 3
{ 
    sprite
    {
        source_file     images/test.png
        source_rect     313 190 169 167
        frame_size      169 167
    }
}
brick 4
{ 
    sprite
    {
        source_file     images/test.png
        source_rect     96 191 169 167
        frame_size      169 167
    }
}

How it works: Open a png file with these conditions:

1) Each sprite MUST HAVE 4 black pixels rgb(0,0,0) in each corner (top-left,top-right,bottom-left,bottom-right) see test image.
2) Enjoy! The program create all the stuff!...
3) Not all! Then you must save the text to a brk file and edit with some other program like JBlocks http://opensnc.sourceforge.net/forum/vi … hp?id=1683 to add all the other stuff.

If after loading the image nothing is shown:
- You've provided an invalid image.
- Don't forget any black pixel and don't add black pixels between them.
- The rectangles doesn't have to be one up the other.

Open the Task Manager and close the process 'autorect.exe', else it will continue wasting memory....

Last edited by lainz (2014-02-08 02:52:01)

Re: AutoRect v0.1 (Brickset tool for automating brk creation tasks)

Cool. I saw some sofwtare able to do something like this. I thought to include it on my app, but at the end I decided not to do.  I don't know if this will work with JBlocks, I have to prove; because it assumes that the type and behavior are defined.
You simply can change the writing file code to include this, and define all the blocks as obstacle and default.  Also I can change my reading code, but I think that's more difficult xD

Which language did you use to code that? Maybe if you provide the source we can try to compile it for Linux.

Piece of cake...!

Re: AutoRect v0.1 (Brickset tool for automating brk creation tasks)

Well I say it in your post it works smile

Is Object Pascal, Lazarus FPC SVN with BGRABitmap SVN. Basically installing it on linux you will lost a day smile

Last edited by lainz (2014-02-08 13:52:32)