示例#1
0
/*
* LoadResources: Load all resources into a newly allocated table.
*   Return True on success, False iff no resource files found.
*/
Bool LoadResources(void)
{
	Bool rsc_loaded, rsb_loaded;
	
	/* Initialize new table */
	t = table_create(TABLE_SIZE);
	
	ignore_duplicates = True;
	// Load combined rscs, then normal rscs
	rsb_loaded = LoadRscFilesSorted(rsb_spec);
	rsc_loaded = LoadRscFiles(rsc_spec);
	
	// Built-in resources for About box
	RscAddCallback("", ABOUT_RSC, "aarmor.bgf");
	RscAddCallback("", ABOUT_RSC1, "c1.bgf");
	RscAddCallback("", ABOUT_RSC2, "c2.bgf");
	RscAddCallback("", ABOUT_RSC3, "c3.bgf");
	RscAddCallback("", LAGBOXICON_RSC, "ilagbox.bgf");
	RscAddCallback("", LAGBOXNAME_RSC, "Latency");
	
	ignore_duplicates = False;
	
	if (!rsb_loaded && !rsc_loaded)
	{
		debug(("Couldn't load any resources!\n"));
		return False;
	}
	
	return True;
}
示例#2
0
void ChangeResource(ID res, char *value)
{
   debug(("Got new resource %d, value = %s\n", res, value));
   RscAddCallback("", res, 0, value);
}