Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int AddIn_main(int isAppli, unsigned short OptionNum)
- {
- // double length=1.0; // a 60 batt/minute
- //double freq=440;
- int i=0;
- unsigned short taille_file;
- unsigned int key;
- char x;
- char buffer[50];
- short* ID_note; // On crée un pointeur sur int
- char **files = memory_alloc(20);
- char ch[25];
- x = memory_find("\\\\fls0\\*cff*",files,20);
- x = memory_user_select(files,x,1,0);
- sprintf(ch,"\\\\fls0\\%s",files[x]);
- //sprintf(ch,"\\\\crd0\\%s",files[memory_user_select(files,memory_find("\\\\crd0\\*sav*",files,20),1,0)]);
- ID_note = memory_load(ch);
- if(ID_note==NULL) ID_note=malloc(100*sizeof(short));
- /* while(*(data+taille_file)) taille_file++;
- for(i=0;i<taille_file;i++)
- *(ID_note+i)=*(data+i); */
- edit_part(ID_note);
- while(1)
- {
- draw_part(ID_note, 0);
- Mini("edit", 0);
- //Mini("save", 1);
- Mini("clear", 2);
- Mini("play", 5);
- GetKey(&key);
- switch(key)
- {
- case KEY_CTRL_EXIT : free(ID_note); memory_free(files,20); return 1;
- case KEY_CTRL_F1 : edit_part(ID_note); break;
- case KEY_CTRL_F2 : memory_save(ch,ID_note,i); Sleep(100); 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