Exemple #1
0
RallyX::RallyX()
{
	resources.display = NULL;
	resources.event_queue = NULL;
	resources.font = NULL;
	_bitmaps.out_of_bounds = NULL;
	_bitmaps.road = NULL;
	resources.timer = NULL;
	_bitmaps.wall = NULL;
	setup_allegro();
	Load_map("map_level_1.txt");

	tiled_map1 = _game_map.get_map();

	run_game();
}
Exemple #2
0
int main (void) {
  /* initialize the game. */
  setup_allegro (MODE, WIDTH, HEIGHT, 16);
  setup_bmps();
  setup_player();
  scrollx = 0;
  scrolly = 0;
  
  currentmap = (MAP*)malloc (sizeof (MAP));
  currentmap->initflag = 1;
  currentmap->idnumber = TCA_13;
    
  map_handler();

  while (!key[KEY_ESC]) {
    get_input();
    move_player();
    scroll_window();
    animate_player();
    map_event_handler();
    map_handler();
    draw_player();
    blit (scrollbmp, bufferbmp, scrollx, scrolly, 0, 0, WIDTH-1, HEIGHT-1);
    print_scroll_debug_messages();
    print_player_debug_messages();

    acquire_screen();
    blit (bufferbmp, screen, 0, 0, 0, 0, WIDTH-1, HEIGHT-1);
    release_screen();

    rest (20);
  }
  destroy_bmps();
  allegro_exit();
  return 0;
}