C compiler

PM development, programming, hacking and all that fun stuff.
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 10th, 2011, 10:20

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 :)).

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 10th, 2011, 11:52

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!

Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 10th, 2011, 18:51

Now with normal pointer access and max. Framerate. Works good on hardware
Attachments
prc_test.zip
(12.9 KiB) Downloaded 394 times

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 10th, 2011, 20:22

Lupin wrote:Now with normal pointer access and max. Framerate. Works good on hardware
Yeah, it does. Thank you!

Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 11th, 2011, 19:53

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.
Attachments
prc_test.zip
(21.03 KiB) Downloaded 399 times

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 13th, 2011, 17:43

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.

Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 13th, 2011, 18:20

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.

zoranc
Posts: 297
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc » June 14th, 2011, 00:58

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.

Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin » June 14th, 2011, 01:59

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.
Attachments
prc_test.zip
(13.08 KiB) Downloaded 374 times

Post Reply