1 /* $Id: stage-list.h,v 1.4 2005/07/01 19:19:10 oohara Exp $ */
2 
3 #ifndef __DANGEN_STAGE_LIST_H__
4 #define __DANGEN_STAGE_LIST_H__
5 
6 struct _stage_plan
7 {
8   int stage_id;
9   const char *name;
10   int difficulty;
11 };
12 typedef struct _stage_plan stage_plan;
13 
14 struct _stage_list
15 {
16   /* number of stage_plan */
17   int n;
18   stage_plan **p;
19 };
20 typedef struct _stage_list stage_list;
21 
22 /* total number of stage plans (excluding the tutorial) */
23 #define NUMBER_PLAN 20
24 
25 /* stage difficulty */
26 #define PLAN_TUTORIAL 0
27 #define PLAN_EASIEST 1
28 #define PLAN_VERY_EASY 2
29 #define PLAN_EASY 3
30 #define PLAN_NORMAL 4
31 #define PLAN_HARD 5
32 #define PLAN_VERY_HARD 6
33 #define PLAN_HARDEST 7
34 
35 stage_plan *stage_plan_new(int stage_id);
36 void stage_plan_delete(stage_plan *p);
37 stage_list *stage_list_new(int (*match_func)(stage_plan *, void *),
38                            void *data);
39 void stage_list_delete(stage_list *p);
40 const char *stage_difficulty_string(int n);
41 int stage_compare(const void *a, const void *b);
42 
43 #endif /* not __DANGEN_STAGE_LIST_H__ */
44