/*
* @brief Single function for calling all resource managers to statically allocate memory
*/
void Init_All()
{
	float bgcolor[] = {1,1,1,1};
  Init_Graphics(
	"Conquest",
    SCREEN_WIDTH,
    SCREEN_HEIGHT,
    SCREEN_WIDTH,
    SCREEN_HEIGHT,
    bgcolor,
    0);
 
  srand(time(NULL));  //seed the random value at the start of the game
  sprite_initialize_system(1000); // allocates memory for all sprites
  entity_initialize_system();//allocate memory for all entities
  tile_init_system(); // allocate memory for tiles and generate map
  particle_em_init_system();
  player_init(); //creates player entity
  hud_init(); //loads hud sprites
//  structure_init_system();
  item_load_all(); //loads item imags into itemlist and allocates memory for new items
  inventory_init(); //allocates memory to store items
  InitMouse2(); // loads mouse sprite into mem
  

}
Example #2
0
void game_initialize_system()
{
	graphics_initialize_system("Mice Alert", SCREEN_WIDTH, SCREEN_HEIGHT, 0);
	sprite_initialize_system();
	entity_initialize_system();
	menu_initialize();
	mouse_initialize_self();
	sound_initialize_system();
	atexit(game_close_system);
}