Bennu Game Development

English Forums => General => Topic started by: MisterN on March 20, 2011, 12:24:26 AM

Title: Program that converts .png to .map?
Post by: MisterN on March 20, 2011, 12:24:26 AM
I was wondering if there was a program that covnerts .png to .map? i saw something in the fenix engine itself but it did nothing. unless its there to actually convert them in-game. other than that, since the dreamcast can't do that. is there a program that will convert them beofre the game is compiled? im guessing the code would have to be different or would it be as easy as "bob.png" to "bob.map"?
Title: Re: Program that converts .png to .map?
Post by: Drumpi on March 20, 2011, 12:33:01 AM
You can use LOAD_PNG and SAVE_MAP for it (just don't forget to set the bpp on SET_MODE if you want 8, 16 or 32bits mode).
You can use GLOB to find all png files on a directory, too, if you need to convert massive files.

Also, i did a tool to change colors of several graphics (i dont remembre if it supports png, but it export to map, fpg and bmp). It's lost on my HD, so is faster if you look for CCOLOR or CAMBIA COLOR on this forum.
Title: Re: Program that converts .png to .map?
Post by: MisterN on March 20, 2011, 02:05:14 AM
none of the links work
Title: Re: Program that converts .png to .map?
Post by: Drumpi on March 20, 2011, 06:53:24 PM
OK, here it is:
Cambia_color (http://drumpi.se32.com/games/cambia_color.zip)

It's in Fenix, source code included, but i think I save MAP files byte by byte (not using SAVE_MAP).
If program crash, it's because sorting algorithm, just comment his line call.
Title: Re: Program that converts .png to .map?
Post by: MisterN on March 20, 2011, 08:57:22 PM
it wont load in windows 7 and when i go to test it in notepad++ it gives me an error that its not eh right version i replaced all the things in it with the newer fenix stuff that came with the fenix pack but it did nothing. hmmm......
Title: Re: Program that converts .png to .map?
Post by: Drumpi on March 21, 2011, 12:56:07 AM
I don't know, it's made on Fenix 083b, that's why it didn't works on W7.
But sourcecode is included, you can compile it. It must work on every Fenix version. If not, it must be checked, but for now i can't do that, sorry.
(The main file has .prg extension, use command line to compile it, and then, run it).
Title: Re: Program that converts .png to .map?
Post by: MisterN on March 21, 2011, 01:01:19 AM
oh it says it cant find a lista_fich.inc and i dont see it in the folder, i even checked the zip itself and its not there so hmmmm
Title: Re: Program that converts .png to .map?
Post by: Drumpi on March 21, 2011, 01:06:01 AM
Whops! Sorry, i miss it ^^U
Ok, it's added and uploaded, try again (insert coin before ;D).
Title: Re: Program that converts .png to .map?
Post by: MisterN on March 21, 2011, 01:16:00 AM
ok it works but i have no idea how to use it, i learned how to browse for files but i just see folders, i was in the same place as them .pngs but it did nothing. and there is no tutorial how to use it :S
Title: Re: Program that converts .png to .map?
Post by: Drumpi on March 21, 2011, 01:43:51 AM
Ok, a fast tutorial:

Click on a file to select it, you can check if it is selected because it is writen a bit more to right (if not, is not selected). You also can use "seleccionar todo" button to select all, or "invertir seleccion" to invert selection (selected becomes no-selected and no-selected becomes selected).
The yellow arrow indicates the graph that you are watching on background.

"Exportar a" indicates the output format. Press it some times until you get the output format you want (MAP).
Then press "exportar" and wait. Then press ESC and look for files with same name but with copy sufix.

If you want to change colors, select mode pressing "Sel. modo" (you can change color1 to color2, interchange color1 and color2, or change color 1 in color2, and color2 on color3).
You can select every color (over "sel. modo") in two ways:
-Pressing the black square, an using up/down to change color component, left/right to change its value, or enter to end selection.
-Pressing the "dropper" button to select a color from the background image (you can press the muse left button and move it to your chosen colour).

I think it's pretty simple, didn't it?
Title: Re: Program that converts .png to .map?
Post by: MisterN on March 21, 2011, 02:52:21 AM
yeah non of thats working because for some reason it crashes when i go to my documents (where my sprites are), i cant see any images. it just shows folders, nothing more.
Title: Re: Program that converts .png to .map?
Post by: MisterN on March 21, 2011, 02:54:09 AM
yeah...i dont want to make things difficult and time consuming, i want a program that turns on, converts em to map, and exits
Title: Re: Program that converts .png to .map?
Post by: Drumpi on March 21, 2011, 07:42:17 PM
Quote from: DoctorN on March 21, 2011, 02:52:21 AM
yeah non of thats working because for some reason it crashes when i go to my documents (where my sprites are), i cant see any images. it just shows folders, nothing more.

Quote from: Drumpi on March 20, 2011, 06:53:24 PM
If program crash, it's because sorting algorithm, just comment his line call.