Beispiel #1
0
void _claro_tb_stock_init()
{
	stock_imgs = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, val_free);
	object_addhandler(claro, "destroy", stock_free);
	
	int i;
	for(i = 0;i < NUM_STOCK_ITEMS;i++)
	{	
		image_t * img = image_load_inline_png( claro, stock_raw_[i].img, stock_raw_[i].len);
		g_hash_table_insert(stock_imgs, (void*)stock_raw_[i].id, (void*)img);
	}
}
Beispiel #2
0
void claro_stock_init()
{
	stock_imgs = hashtable_create(NUM_STOCK_ITEMS,
		str_hash, str_equal, NULL, val_free);
	object_addhandler(claro, "destroy", stock_free);
	
	int i;
	for(i = 0;i < NUM_STOCK_ITEMS;i++)
	{	
		image_t * img = image_load_inline_png( claro, stock_raw_[i].img, stock_raw_[i].len);
		hashtable_insert(stock_imgs, (void*)stock_raw_[i].id, img, FALSE);
	}
}