[quote author=Mekanaizer link=board=homebrew;num=1108983656;start=15#26 date=02/25/05 at 06:27:54]Hi, GPF
Look for code lines like this:
...
if( ! (buffer = SDL_SetVideoMode(320, 200, 32, SDL_SWSURFACE)) Â*)
...
if you see 16 or 8 change it to 32 like the code line above.
in all my alpha-blending examples 32 (color deep) works best, 16 may work too but it need extra work in the code for DC (or some PC gfx-cards)
-Mekanaizer-[/quote]
Unfortunetly its not that easy since Im using OpenGL , the problem is in the texture loading Also. Since it uses png I have to be able to load the pngs with png_to_img using PNG_FULL_ALPHA, PNG_MASK_ALPHA(which i think is broken) and PNG_NONE_ALPHA and then load those textures using
glKosTex2D(GL_ARGB4444_TWID, img.w, img.h, txaddr);
or
glKosTex2D(GL_ARGB1555_TWID, img.w, img.h, txaddr);
or
glKosTex2D(GL_RGB565_TWID, img.w, img.h, txaddr);
In the original code, it load the graphics up as an SDL_image and then converts them to what ever the background is setup for RGB or RGBA etc.
I have written a custon png loader so I can get the #of channels, rowstride and w,h before i load them so I can perhaps select the correct loading method.
but once I am actually displaying the bouncing star or what every it on the screen.
I think I have to set it up differently. Again my OpenGL skill or nil so i dont know how to set up transperancy when I render the image.
I think it has something to do with this call
glColor4f(1.0, 1.0, 1.0, 1.0);
Other biggest problem , is that I can't play more than one mod file, attempting to retry or selecting another song blows up in the KGLX displaylist code, I think its related to the fact that there is no gldeletelist function and when it goes to create more its running out of available displaylists. but I could be wrong.
Troy
Bookmarks