Quote:
bool gfx_loadpalette()
{
gfx_freepalette();
SDL_Surface * palette = IMG_Load(convertPathCP("gfx/packs/palette.bmp", gamegraphicspacklist.current_name()));
if ( palette == NULL )
{
printf("Couldn't load color palette: %s\n", SDL_GetError());
return false;
}
THis is important because all we need to do is when an item/this/that/etc is triggered, we order whatever to Load graphics
ANother way of looking at this is
Quote:
bool gfx_loaditem()
{
gfx_item7();
SDL_Surface * item = IMG_Load(convertPathCP("Get line X from Txt document", gamegraphicspacklist.current_name()));
if ( palette == NULL )
{
printf("Couldn't load graphis: %s\n", SDL_GetError());
return false;
}
However, this (probably obviously) needs some fine tuning.
But, its a start.