Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "fxlib.h"
- char *int2str(char *c, int n) //écrit un nombre dans une chaine
- {
- int i = 0, l = 0;
- if(n==0)
- {
- c[0] = '0';
- c[1] = 0;
- }
- else
- {
- for(i=n ; i ; i/=10)
- l++;
- c[l] = 0;
- for(i=n ; i ; i/=10)
- c[--l] = i%10+'0';
- }
- return c;
- }
- int AddIn_main(int isAppli, unsigned short OptionNum)
- {
- int n;
- char c[3];
- n = 0;
- while(IsKeyDown(KEY_CTRL_EXE))
- {
- }
- while(IsKeyUp(KEY_CTRL_EXE))
- {
- if(IsKeyDown(KEY_CTRL_UP))
- {
- if(n != 9)
- {
- n++;
- }
- }
- if(IsKeyDown(KEY_CTRL_DOWN))
- {
- if(n != 0)
- {
- n--;
- }
- }
- Locate(1,1);
- Print(int2str(c,n));
- Bdisp_PutDisp_DD;
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement