How about this:
int clr_to = 0xFFFF;
int clr_from = 0x0000;
int screensize = 320*240;
for(int i = screensize; i>0; i--) {
if(((unsigned short*)surface->pixels)[i] == clr_from) ((unsigned short*)surface->pixels)[i] = clr_to;
}
Not tested..
If all you want to do is play mods, try using mikmod directly. SDL_mixer uses it internally anyway. I only got choppy sound with SDL_mixer but module playing with mikmod works fine :)
There is a good example in mikmod documentation.
The error message means that the linker does not know where to find the library, so you need to add -lpng. Also, using a Makefile would make thing a lot easier.
Actually I meant editing the files and fixing the directories defined in them..
Seems your makefile is missing some libraries for the linker. -lSDL, -lSDLmain etc.
The problem is caused by libpthread.so and libc.so in /sysroot/usr/lib. The files are in plain text. Just fix the paths (remove em). This is not a problem when building static binaries since those files are not used.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.