-florian66-

test123456789

May 9th, 2015
266
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 1.23 KB | None | 0 0
  1. int AddIn_main(int isAppli, unsigned short OptionNum)
  2. {
  3.      
  4.         int i=1;
  5.         unsigned short taille_file;
  6.         unsigned int key;
  7.         char x;
  8.         char buffer[50];
  9.         unsigned char* ID_note; // On crée un pointeur sur int
  10.         unsigned char* ch;
  11.  
  12.    
  13. ch = user_select(ch);
  14. if(ch==NULL) return 1; // si ch est null on  sort
  15. //sprintf(ch,"\\\\crd0\\%s",files[memory_user_select(files,memory_find("\\\\crd0\\*sav*",files,20),1,0)]);
  16. /* PrintMini(10,50,(const unsigned char *)ch,0);
  17. GetKey(&key); */
  18. ID_note = memory_load(ch);
  19.  
  20.  
  21. if(ID_note==NULL) ID_note=calloc(100,sizeof(short));
  22.  
  23.  
  24. edit_part(ID_note);
  25.  
  26.  
  27. while(1)
  28. {
  29.    
  30.  
  31.     draw_part(ID_note, 10);
  32.  
  33.     Mini("edit", 0);
  34.     Mini("save", 1);
  35.     Mini("clear", 2);
  36.     Mini("play", 5);
  37.    
  38.  
  39.     GetKey(&key);
  40.    
  41.     switch(key)
  42.     {
  43.     case KEY_CTRL_EXIT : free(ID_note); return 1;
  44.     case KEY_CTRL_F1 : edit_part(ID_note); break;
  45.     case KEY_CTRL_F2 :
  46.         {
  47.         i=0;
  48.         while(*(ID_note+i)); i+=2;
  49.         memory_save(ch,ID_note,i); // c'est ici que ça devrait enregistrer et ça ne le fait pas
  50.         break;
  51.         }
  52.     case KEY_CTRL_F3 :
  53.         {
  54.         for(i=0;*(ID_note+i);i++)
  55.             {
  56.             *(ID_note+i)=0;
  57.             }
  58.             edit_part(ID_note);
  59.             break;
  60.         }
  61.     case KEY_CTRL_F6 :jouer_partition(ID_note); break;
  62.     }
  63.  
  64. }
  65. return 1;      
  66. }
Advertisement
Add Comment
Please, Sign In to add comment