Luminosity is set to 128(standard luminosity)
When i change luminosity from 128 to for example 255 then it show white but problem is everything is little brighter than it should be.
This is what i do:
1.Save image as s X1/A1 R5 G5 B5 BMP in gimp. 2.Convert BMP/png to TIM(via bmp2tim,img2tim,timtool,it doesn't matter,i got the same result)(I tried 4bpp,8bpp,16bpp,again same result).
3.Set TIM position.
4.Set CLUT position(tried without making clut and it doesnt affect result).
Code
Code: Select all
void upload_sprite(GsImage *image,GsSprite *sprite,const char *path) {
FILE *f = fopen(path,"rb");
fseek(f,0,SEEK_END);
int fsize = ftell(f);
fseek(f,0,SEEK_SET);
fread(data_buffer,sizeof(char),fsize,f);
fclose(f);
GsImageFromTim(image,data_buffer);
GsUploadImage(image);
GsSpriteFromImage(sprite,image,1);
}
Code: Select all
void Pluge() {
GsImage image1,image2;
GsSprite sprite1,sprite2;
upload_sprite(&image1,&sprite1,"cdrom:\\pluge1.TIM;1");
upload_sprite(&image2,&sprite2,"cdrom:\\pluge2.TIM;1");
sprite1.x = 0; sprite1.y = 0;
sprite1.w = 160; sprite1.h = 240;
sprite1.r = sprite1.g = sprite1.b = 128;
sprite1.attribute = COLORMODE(COLORMODE_16BPP);
sprite2.x = 160; sprite2.y = 0;
sprite2.w = 160; sprite2.h = 240;
sprite2.r = sprite2.g = sprite2.b = 128;
sprite2.attribute = COLORMODE(COLORMODE_16BPP);
while(1) {
if(display_is_old) {
dbuf=!dbuf;
GsSetDispEnvSimple(0, dbuf ? 0 : 256);
GsSetDrawEnvSimple(0, dbuf ? 256 : 0, 320, 240);
GsSortCls(0,0,0);
GsSortSprite(&sprite1);
GsSortSprite(&sprite2);
GsDrawList();
while(GsIsDrawing());
display_is_old = 0;
}
}
}
http://www.mediafire.com/file/085ta56sl ... utclut.tim