41 lines
735 B
C
41 lines
735 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <graph.h>
|
|
#include "graph_sup.h"
|
|
|
|
struct block_ {
|
|
char* value;
|
|
struct block_* next;
|
|
};
|
|
|
|
typedef struct block_ block;
|
|
typedef block* list;
|
|
|
|
int main(int argc, char * argv[]) {
|
|
InitialiserGraphique();
|
|
CreerFenetre(100, 100, 800, 200);
|
|
|
|
block violet = {"purple", NULL};
|
|
block indigo = {"indigo", &violet};
|
|
block bleu = {"blue", &indigo};
|
|
block vert = {"green", &bleu};
|
|
block jaune = {"yellow", &vert};
|
|
block orange = {"orange", &jaune};
|
|
block rouge = {"red", &orange};
|
|
|
|
violet.next = &rouge;
|
|
|
|
list l = &rouge;
|
|
|
|
while(1) {
|
|
if (DrawNextFrame()) {
|
|
SetColorN(l->value);
|
|
EcrireTexte(200, 50, argv[1], 2);
|
|
l = l->next;
|
|
}
|
|
}
|
|
FermerGraphique();
|
|
return EXIT_SUCCESS;
|
|
}
|
|
|