Program that converts .png to .map?

Started by MisterN, March 20, 2011, 12:24:26 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

MisterN

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"?
werg

Drumpi

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.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

MisterN

werg

Drumpi

OK, here it is:
Cambia_color

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.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

MisterN

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......
werg

Drumpi

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).
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

MisterN

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
werg

Drumpi

Whops! Sorry, i miss it ^^U
Ok, it's added and uploaded, try again (insert coin before ;D).
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

MisterN

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
werg

Drumpi

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?
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)

MisterN

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.
werg

MisterN

yeah...i dont want to make things difficult and time consuming, i want a program that turns on, converts em to map, and exits
werg

Drumpi

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.
Hala, como con 1001 procesos sólo va a 9 FPS, vamos a meterle 32 veces más, a ver si revienta.
(Drumpi epic moment)