goldenXcode / grafx2

Automatically exported from code.google.com/p/grafx2
0 stars 0 forks source link

Broken global background checker for C64 multicolor saver #524

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The global background checker for C64 multicolor pictures seems to just look 
for the color that is most used, this doesn't work well for a lot of pictures, 
resulting in corrupted saved images. Try saving a complicated c64 multicolor 
picture and reloading it.

The global background color is the one that is shared by all char blocks 
containing 4 colors.

I attempted a new global color checker based on the C64-test Lua script by 
Dawnbringer. It has worked well on everything I've thrown at it so far.

I'm attaching a patch for miscfileformats.c in 2.4 2035.

Original issue reported on code.google.com by mikeri...@gmail.com on 27 Dec 2012 at 11:23

Attachments:

GoogleCodeExporter commented 9 years ago
Applied a reworked version using bitfields in r2043. Tell us if it works, I 
didn't test it !

Original comment by pulkoma...@gmail.com on 29 Dec 2012 at 7:03

GoogleCodeExporter commented 9 years ago
I noticed now that since the background checker is before the 4 colors per char 
checker, the saver will give a global color error even if there is more than 4 
colors in a char. From a user friendlyness perspective, it would probably make 
sense to add a checker for =<4 colors per char in the background checker, so if 
the user has 5 or more cols in a char block he/she will be notified of that 
instead of getting a global color error message.

I will be able to fix it myself after January 2nd, but am not able too right 
now. It shuold be simple enough. Just a if (used > 4) error msg should do it.

Original comment by mikeri...@gmail.com on 29 Dec 2012 at 8:19