If your pages have always the format "page#.bmp", you can do it programmatically like this:

Code:
void loadPage (PANEL* p, int index)
{
	if (p != NULL)
	{
		if (p->bmap != NULL) {
			bmap_purge(p->bmap);
			p->bmap = NULL;
		}
		
		char filename [256];
		sprintf(filename, "page%d.bmp", index);
		
		p->bmap = bmap_create(filename);
	}
}



The interpretation of

Code:
BMAP* b = "helloworld.tga";



is a Lite-C custom feature and does not work for arrays. If you want to achieve that, you could do the following:

Code:
#define NUM_BMAPS 10
BMAP* bmapArray [NUM_BMAPS];

void bmapArray_startup ()
{
	int i;
	for (i = 0; i < NUM_BMAPS; i++)
	{
		char filename [256];
		sprintf(filename, "page%d.bmp", i);
		
		bmapArray[i] = bmap_create(filename);
	}
}



to fill the array on game startup (_startup functions are always call on engine startup!).

If you want to have an array of strings, you could do the following with a TEXT object:

Code:
TEXT* pageFilenames = {
  string ("page0.bmp", "page1.bmp", "page2.bmp", "page3.bmp");
}



and access it with e.g.

Code:
(pageFilenames->pstring)[1] ( == "page1.bmp")



I hope you get the idea wink

Last edited by HeelX; 03/04/14 19:07.