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 »

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: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post 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!
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post by Lupin »

Now with normal pointer access and max. Framerate. Works good on hardware
Attachments
prc_test.zip
(12.9 KiB) Downloaded 1119 times
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post by zoranc »

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 »

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 1111 times
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post 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.
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

Post 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.
zoranc
Posts: 298
Joined: August 13th, 2010, 18:13
Contact:

Re: C compiler

Post 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.
Lupin
Team Pokémé
Posts: 94
Joined: January 10th, 2005, 13:06

Re: C compiler

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