Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int AddIn_main(int isAppli, unsigned short OptionNum)
- {
- int i=1;
- unsigned short taille_file;
- unsigned int key;
- char x;
- char buffer[50];
- unsigned char* ID_note; // On crée un pointeur sur int
- unsigned char* ch;
- ch = user_select(ch);
- if(ch==NULL) return 1; // si ch est null on sort
- //sprintf(ch,"\\\\crd0\\%s",files[memory_user_select(files,memory_find("\\\\crd0\\*sav*",files,20),1,0)]);
- /* PrintMini(10,50,(const unsigned char *)ch,0);
- GetKey(&key); */
- ID_note = memory_load(ch);
- if(ID_note==NULL) ID_note=calloc(100,sizeof(short));
- edit_part(ID_note);
- while(1)
- {
- draw_part(ID_note, 10);
- Mini("edit", 0);
- Mini("save", 1);
- Mini("clear", 2);
- Mini("play", 5);
- GetKey(&key);
- switch(key)
- {
- case KEY_CTRL_EXIT : free(ID_note); return 1;
- case KEY_CTRL_F1 : edit_part(ID_note); break;
- case KEY_CTRL_F2 :
- {
- i=0;
- while(*(ID_note+i)); i+=2;
- memory_save(ch,ID_note,i); // c'est ici que ça devrait enregistrer et ça ne le fait pas
- break;
- }
- case KEY_CTRL_F3 :
- {
- for(i=0;*(ID_note+i);i++)
- {
- *(ID_note+i)=0;
- }
- edit_part(ID_note);
- break;
- }
- case KEY_CTRL_F6 :jouer_partition(ID_note); break;
- }
- }
- return 1;
- }
Advertisement
Add Comment
Please, Sign In to add comment