Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- char tytul[]= {' ',' ',' ',' ',' ','P','R','E','S','J','A',' ',' ',' ',' ',' ',
- ' ',' ',' ',' ',' ',' ','C','Z','A','S','U',' ',' ',' ',' ',' '
- };
- char menu[]= {'N','O','W','A',' ','N','A','J','.',' ','T','W','R','C','Y'
- ,'G','R','A',' ',' ','W','Y','N','I','K',' ','O','P','I','S'
- };
- char tworcy[]= {'K','.',' ','M','I','E','R','Z','W','I','N','S','K','I',' ',
- ' ','K','.',' ','L','E','N','C','Z','E','W','S','K','I',' ',' ',' '
- };
- char wypisz[]= {'W','Y','N','I','K','='};
- char opis[]= {'B','u','t','t','o','n',' ','1','-','l','e','f','t',' ','2','-','r','i','g','h','t',' ','3','-','d','o',
- 'w','n','/','u','p'
- };
- int up=0; //czy ludzikiem tam gdzie byczek
- int k=0; //
- int tr=300; //trudnosc gry
- P2DIR |= BIT1 ; // STATUS LED
- P1DIR |=BIT5+BIT6;
- P1OUT|=BIT5+BIT6;
- WDTCTL=WDTPW+ WDTHOLD; // zatrzymanie WDT
- int zycia=3;
- int yyy=1; //nie wchodzil po przegraniu do if dlatego trzeba bylo dodac nowa zmienna
- int tworcy_pom=0;
- int opis_pom=1;
- int wynik_pom=0;
- InitPortsLcd(); // inicjalizacja portów
- InitLCD(); // inicjalizacja LCD
- clearDisplay(); // czyszczenie LCD
- SEND_CMD(CG_RAM_ADDR);
- int m;
- for(m=0; m<24; m++)
- {
- SEND_CHAR(customChar[m]);
- }
- P4DIR =0x00;
- int ccc=0; //ciagle wyswietlal menu dlatego trzeba byl ododac pomocnicza
- int wys;
- int szer;
- int punkty=0;
- int xlabel=0; //obsluga zderzen
- int xlabel2=0; //obdluga zdarzen
- int up2=0;
- xlabel2=6;
- up2=0;
- unsigned int timer;
- while(1)
- {
- if(((P4IN&BIT7)==0 || ccc==1) && yyy==1) //tworzenie menu
- {
- clearDisplay();
- ccc=0;
- opis_pom=0;
- yyy=0;
- int i;
- for(i=0; i<16; i++)
- {
- SEND_CHAR(tytul[i]);
- }
- SEND_CMD(DD_RAM_ADDR2);
- for(i=16; i<32; i++)
- {
- SEND_CHAR(tytul[i]);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement