je vous fais confiance pour ne pas utiliser ma source.... on sait jamais... merci
#include <tigcclib.h>
void _main(void)
{
SCR_RECT ECRAN = {{0, 0, 159,99}} ;
int APDTIM = OSTimerCurVal(APD_TIMER);
short key;
int REPKE, REPK, y = 14;
void *Vscreen1 = malloc(3840);
PortSet(Vscreen1, 239, 127);
ST_busy(3);
DrawLine (0, 93, 160, 93, A_NORMAL) ;
ST_helpMsg("Protools 1.0 developpé par Vodoo93");
ScrRectFill(&(SCR_RECT){{0, 10, 8, 93}}, &ECRAN ,A_NORMAL) ;
ScrRectFill(&(SCR_RECT){{0, 0, 160, 10}}, &ECRAN ,A_NORMAL) ;
FontSetSys(F_4x6);
DrawStr (10, 3, "--------ProTools 1.0 by Vodoo93--------", A_REVERSE);
DrawStr (10, 15, "1-Reset calculatrice /!\ \0", A_REVERSE);
DrawStr (10, 25, "2-Activer Break (active ON)", A_NORMAL);
DrawStr (10, 35, "3-Desactiver Break (desactive ON)", A_NORMAL);
DrawStr (10, 45, "4-APD", A_NORMAL);
DrawStr (10, 55, "5-Reglage du contraste", A_NORMAL);
DrawStr (10, 65, "*6-Clavier", A_NORMAL);
DrawStr (10, 73, "* = indisponible \0", A_REVERSE);
DrawStr (10, 86, "9-Credits", A_NORMAL);
ClrScr();
memcpy(LCD_MEM, Vscreen1, 3840);
MyLabel:
debut:
MyLabel1:
if (y < 10)
{
y = 85;
}
else if (y == 74)
{
y = 85;
}
else if (y ==75)
{
y = 64;
}
else if (y > 86)
{
y = 14;
}
ScrRectFill(&(SCR_RECT){{9, y, 160., y+6}}, &ECRAN ,A_XOR) ;
key = ngetchx();
if (key == KEY_DOWN)
{
y = y+10;
goto debut;
}
else if (key == KEY_UP)
{
y = y-10;
goto debut;
}
else if( key == 13)
{
if (y == 14 )
{
OSReset();
}
else if (y == 24 )
{
OSClearBreak() ;
OSEnableBreak() ;
OSSetSR(0x0000) ;
goto MyLabel;
}
else if (y == 34 )
{
OSClearBreak() ;
OSDisableBreak() ;
OSSetSR(0x0700) ;
goto MyLabel;
}
else if (y == 44 )
{
APDTIM = APDTIM/20;
clrscr();
printf("Valeur actuelle de l'APD:%i", APDTIM);
printf("\nValeur de l'APD:");
scanf("%i", &APDTIM);
printf("\nAPD reglé a:%i", APDTIM);
printf("seconde(s)");
ngetchx();
OSFreeTimer(APD_TIMER) ;
OSRegisterTimer(APD_TIMER, 20*APDTIM) ;
goto MyLabel;
}
else if (y == 54 )
{
clrscr();
printf("Appuyez sur + pour augmenter le contraste.\nAppuyez sur - pour diminuer le contraste.");
MyLabel2:
key = ngetchx();
if (key == 45)
{
OSContrastUp() ;
goto MyLabel2;
}
else if (key == 43)
{
OSContrastDn() ;
goto MyLabel2;
}
else if (key == 264)
{
goto MyLabel;
}
else
{
goto MyLabel2;
}
}
else if (y == 64 )
{
goto MyLabel;
MyLabel4:
clrscr();
printf("Reglage du clavier\nappuyez sur + pour accelerer le clavier\nappuyez sur - pour ralentir le clavier\nappuyez sur 0 pour les valeurs par defaut");
DrawLine (0, 25, 160, 25, A_NORMAL) ;
MyLabel3:
ST_helpMsg("Appuyez sur une touche...");
key = ngetchx();
if (key == 45)
{
REPKE = REPKE + 10;
REPK = REPK + 50;
DrawStr (150, 80, "-", A_REPLACE);
OSInitBetweenKeyDelay (REPKE);
OSInitKeyInitDelay (REPK);
goto MyLabel3;
}
else if (key == 43)
{
REPKE = REPKE - 10;
REPK = REPK - 50;
DrawStr (150, 80, "+", A_REPLACE);
if (REPKE <8)
{
DrawStr (10, 50, "Pour l'instant la limite est 8", A_REPLACE);
DrawStr (10, 60, "Consultez:progti89.ifrance.com", A_REPLACE);
REPKE = 8;
ngetchx();
goto MyLabel4;
}
else
{
OSInitBetweenKeyDelay (REPKE);
OSInitKeyInitDelay (REPK);
}
goto MyLabel3;
}
else if (key == 48)
{
OSInitBetweenKeyDelay (48);
OSInitKeyInitDelay (336);
REPKE = 48;
goto MyLabel3;
}
else if (key == 264)
{
goto MyLabel;
}
else
{
goto MyLabel3;
}
}
else if (y == 85 )
{
clrscr();
FontSetSys(F_4x6);
ST_busy(3);
ScrRectFill(&(SCR_RECT){{0, 10, 8, 93}}, &ECRAN ,A_NORMAL) ;
ScrRectFill(&(SCR_RECT){{0, 93, 160, 100}}, &ECRAN ,A_NORMAL) ;
ScrRectFill(&(SCR_RECT){{0, 0, 160, 10}}, &ECRAN ,A_NORMAL) ;
ScrRectFill(&(SCR_RECT){{150, 0, 160, 93}}, &ECRAN ,A_NORMAL) ;
FontSetSys(F_4x6);
DrawStr (10, 3, "--------------CREDITS--------------", A_REVERSE);
DrawStr (10, 15, "Protools 1.0 developpe par Vodoo93", A_NORMAL);
DrawStr (10, 25, "Mail: lepiranas1@hotmail.com", A_NORMAL);
DrawStr (10, 35, "Site: progti89.ifrance.com", A_NORMAL);
DrawStr (10, 45, "Consultez les mises a jour regulieres", A_NORMAL);
DrawStr (10, 55, "et les programmes basic.", A_NORMAL);
DrawStr (10, 63, "Remerciements:", A_NORMAL);
DrawStr (10, 70, "euh....bah a moi, mon PC et ma TI", A_NORMAL);
DrawStr (10, 76, "sans qui je ne serais pas la...;)", A_NORMAL);
DrawStr (10, 85, "Developpe en C avec TIGCC et VTI", A_NORMAL);
ngetchx();
goto MyLabel;
}
else if (key == 264)
{
}
else
{
goto MyLabel1;
}
}
else if (key == 264)
{
free(Vscreen1);
}
else
{
goto debut;
}
}
vodoo93
I still believe in your eyes;
I just don't care what you have done in your life.
Baby i'll always be here by your side;
Don't leave me waiting too long, please come by!
I, still believe in your eyes;
There is no choice, I belong to your life.
Because I will live to love you someday;
You'll be my baby and we'll fly away