Page 6 of 6

Re: C compiler

Posted: June 10th, 2011, 10:20
by Lupin
wow zoranc, i am just impressed! Very nice job. I wouldn't think you could fix it so fast. Looks like that problem kept you up late, hope you still got enough sleep :D

Very very nice... Yeah bigger projects shouldn't be much of a problem now (until you need more than 64kb :)).

Re: C compiler

Posted: June 10th, 2011, 11:52
by zoranc
Not enough sleep again but red bull fixes things. Glad you like it. Hope that compiler converges towards more stable state.

We desperately need a regression test suite with a PM emulator in it... Especially if I decide to do optimisation of the generated code.

Looking at the TODO list I don't intend to do any major changes soon, so let the bug hunting season start. Thanks for your reports Lupin!

Re: C compiler

Posted: June 10th, 2011, 18:51
by Lupin
Now with normal pointer access and max. Framerate. Works good on hardware

Re: C compiler

Posted: June 10th, 2011, 20:22
by zoranc
Lupin wrote:Now with normal pointer access and max. Framerate. Works good on hardware
Yeah, it does. Thank you!

Re: C compiler

Posted: June 11th, 2011, 19:53
by Lupin
Updated the example a little bit and included a new tool img2sprite. It takes any image format (image formats with alpha channel should be used, e.g. gif or png) and converts it to sprites. It can also take animated gifs.

See the example. The img2sprite code is included and it should be possible to compile it in non-Windows OSes as well.

Re: C compiler

Posted: June 13th, 2011, 17:43
by zoranc
Your tool works very nice! If we had the same thing for the tiles too... ;-) No transparency needed for them thought. One more small wish if you can add additional option for enabling or disabling of the getchar() at the end of the execution, because I use it from the command-line.

Re: C compiler

Posted: June 13th, 2011, 18:20
by Lupin
i will work on the tool to add tile support. Should be ready this evening. It will also support conversion for 6 color images.

The getchar() was just there for debugging... it's already removed in the version that can be found in tools section.

Re: C compiler

Posted: June 14th, 2011, 00:58
by zoranc
Very useful tool! Saved me a lot of codding.

One more recommendation make please a binary distribution too, or put the required DLLs in the source package.

Re: C compiler

Posted: June 14th, 2011, 01:59
by Lupin
img2sprite is now img2pm. It can convert sprites and tiles to 2-6 shades. The algorithm for more than 3 shades should also work with sprites, but i have no idea how you'd display them on PM :-)

Find the new converter in the tools section:
http://www.pokemon-mini.net/development/tools/img2pm/

Attached is the updated prc_test example.