Пример #1
0
void ram(void) {
	while(1) {
		if (!screen_intro()){
      setTextColor(0xff,0x00);
      return;
    }
		game.rokets = 3;
		game.level = 1;
		game.score = 0;
		init_game();
		screen_level();
		while (game.rokets>=0) {
			////checkISP();
			lcdFill(0x00);
			check_end();
			move_ufo();
			move_shot();
			move_shots();
			move_player();
			move_enemy();
			draw_score();
			draw_ufo();
			draw_bunker();
			draw_player();
			draw_enemy();
			draw_shots();
			//        draw_status();
			lcdDisplay();
			delayms(12);
		}
		if (!screen_gameover())
      setTextColor(0xff,0x00);
      return;
	}
}
Пример #2
0
void ram(void){
	bool again = true;
    FIL file;
	menuflags|=(MENU_JUSTONCE|MENU_BIG);
	screen_intro();
	while (again) {
        color_set = false;

        if( f_open(&file, "yell0w", FA_OPEN_EXISTING|FA_READ) == 0 ){
            yellow();
            color_set = true;
        }

        if( f_open(&file, "green", FA_OPEN_EXISTING|FA_READ) == 0 ){
            yellow();
            color_set = true;
        }

		while (!color_set) {	
			handleMenu(&submenu_color);
		}

		privacy_set = false;
		while (!privacy_set) {	
			handleMenu(&submenu_privacy);
		}

    	input("Nickname?", GLOBAL(nickname), 32, 127, MAXNICK-1);
		getInputWaitRelease();
		again = screen_overview();
	}
	menuflags&= (~(MENU_JUSTONCE|MENU_BIG));
	writeFile("nick.cfg",GLOBAL(nickname),strlen(GLOBAL(nickname)));
	saveConfig();
}
Пример #3
0
void ram(void){
	while(1) {
    if (!screen_intro())
     return;
    init_game();
    while(game.ships > 0){
      game.ticks++;
      lcdFill(0);
      conrtols();
      draw_game();
      lcdDisplay();
      delayms_queue_plus(12,0);
      if(game.shot_delay > 0){
        game.shot_delay--;
      }
    }
    draw_splash();
	}
}