mariodon / psp-taikoclone

Automatically exported from code.google.com/p/psp-taikoclone
2 stars 0 forks source link

can't display 4-bit texture properly #12

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
i use oslLoadImageFile to load a 4-bit paletted png file.(with or with out 
transparency.)

it seems that some colors are missing, and transparency info is also missing.

TODO:
    check oslib-mod\Special\oslLoadImageFilePNG.c

Original issue reported on code.google.com by delgupqi...@gmail.com on 23 Jun 2012 at 8:37

GoogleCodeExporter commented 9 years ago
I use GIMP to generate 4-bit / 8-bit indexed image.
be careful not to use Interlaced-data-order to save the image, seems like png 
loader in oslib-mod do not support this.

also, oslib-mod is missing transparency support for indexed image.

(colorkey is supported?)

Original comment by delgupqi...@gmail.com on 29 Jun 2012 at 3:12

GoogleCodeExporter commented 9 years ago
there's a bug in oslib/oslib-mod that deals with paletted png file.

when i use gimp to save a png file with x color ( x less than 8), in function 
oslSetTexutre, sceGuClutLoad will be used to change a palette(if neccesary).

void    sceGuClutLoad (int num_blocks, const void *cbp)

oslib-mod will pass 0 to sceGuClutLoad, thus not load clut correctly.

============================================

add alpha support for paletted image.

there are num_trans alpha values.

all ok!! 

paletted images can be displayed correctly now~~~cheers(not submitted yet, due 
to my bad network at home.)

Original comment by delgupqi...@gmail.com on 2 Jul 2012 at 9:38