le module mélodie est propre, ajout d'un makefile provisoire
This commit is contained in:
parent
150b3e3769
commit
33e4ec7e4a
|
@ -18,4 +18,7 @@ documentation/latex/refman.toc
|
|||
sources/motifs/.motifs.c.swp
|
||||
sources/motifs/.motifs.h.swp
|
||||
sources/motifs/motifs.o
|
||||
sources/melodie/melodie.o
|
||||
sources/melodie/melodie.o
|
||||
sources/.main.c.swp
|
||||
sources/melodie/.melodie.c.swp
|
||||
sources/melodie/.melodie.h.swp
|
|
@ -0,0 +1,14 @@
|
|||
ponytracker : main.o motifs.o melodie.o
|
||||
gcc -Wall main.o motifs.o melodie.o -o ponytracker
|
||||
|
||||
main.o : main.c
|
||||
gcc -Wall -c main.c
|
||||
|
||||
motifs.o : motifs/motifs.c motifs/motifs.h
|
||||
gcc -Wall -c motifs/motifs.c
|
||||
|
||||
melodie.o : motifs/melodie.c motifs/melodie.h
|
||||
gcc -Wall -c melodie/melodie.c
|
||||
|
||||
clean :
|
||||
rm -f *.o
|
|
@ -16,21 +16,21 @@ void definirCourant(int i){
|
|||
courant = i;
|
||||
}
|
||||
|
||||
void ajouterMotifVirtuel(){
|
||||
for (int i = taille; i > courant; i--) {
|
||||
void ajouterMotifVirtuel(Motif* melodie[], int ind, Motif* m){
|
||||
for (int i = taille; i > ind; i--) {
|
||||
melodie[i] = melodie[i-1];
|
||||
}
|
||||
taille++;
|
||||
melodie[courant] = liste;
|
||||
melodie[ind] = m;
|
||||
}
|
||||
|
||||
void definirMotifVirtuel(Motif* m){
|
||||
melodie[courant] = m;
|
||||
void definirMotifVirtuel(Motif* melodie[], int ind, Motif* m){
|
||||
melodie[ind] = m;
|
||||
}
|
||||
|
||||
void supprimerMotifVirtuel(){
|
||||
void supprimerMotifVirtuel(Motif* melodie[], int ind){
|
||||
taille--;
|
||||
for (int i = courant; i < taille; i--) {
|
||||
for (int i = ind; i < taille; i--) {
|
||||
melodie[i] = melodie[i+1];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,10 +5,6 @@
|
|||
#include <stdio.h>
|
||||
#include "../motifs/motifs.h"
|
||||
|
||||
#define MAX_PATTERNS 256
|
||||
|
||||
Motif* melodie[MAX_PATTERNS] = {NULL};
|
||||
|
||||
int courant = 0;
|
||||
|
||||
int taille = 0;
|
||||
|
@ -23,10 +19,10 @@ void afficherMotifActuel();
|
|||
|
||||
void definirCourant(int i);
|
||||
|
||||
void ajouterMotifVirtuel();
|
||||
void ajouterMotifVirtuel(Motif* melodie[], int ind, Motif* m);
|
||||
|
||||
void definirMotifVirtuel(Motif* m);
|
||||
void definirMotifVirtuel(Motif* melodie[], int ind, Motif* m);
|
||||
|
||||
void supprimerMotifVirtuel();
|
||||
void supprimerMotifVirtuel(Motif* melodie[], int ind);
|
||||
|
||||
#endif
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue