David-Vandensteen / neocore

Library & toolchain for Neo Geo CD develop. with C language
29 stars 3 forks source link

Graphic conversion issue. #80

Closed NeoGeoFreak2004 closed 1 year ago

NeoGeoFreak2004 commented 1 year ago

Hey, so anyways i was trying to convert a png file into a sprite using the buildchar program. but when i try to convert the sprite into a png, it gives me an error. the error says: Invalid character in the given encoding. Line 1, position 1. Idk what this means so can you try to figure out what's causing the issue to pop up?

David-Vandensteen commented 1 year ago

Sure, give me the png.

NeoGeoFreak2004 commented 1 year ago

01 here is the file that i tried to convert with the buildchar program.

David-Vandensteen commented 1 year ago

Hi, Your file have some tiles with overload colors. I paste the content of the documentation about file format spécification to build with buildchar:

About input files format: Picture files used in chardata.xml must be PNG format, 32bppArgb. Define transparency by pink color (#ff00ff), or simply use transparency. Size must be multiples of 16. About colors: There is no limits color wise, as long as each tile is transparency + 15 colors max, you can use pics with hundreds of colors. If your file is rejected for using too many colors per tile, erroneous tiles will be shown in a reject.png file

David-Vandensteen commented 1 year ago

Hi,

Here is a way to solve the problem.. Update Neocore to version 1.0.4 from the master or release/1.0.4 branch Delete the build directory if it exists Compile the hello sample for example (so that the kit installs and compiles the lib) go to the samples\issue_80 folder mak Normally you should get a sprite reject type error Run the fix-background.bat script mak run

David-Vandensteen commented 1 year ago

Fixed on v1.0.4