File: level_list.h

package info (click to toggle)
aime 0.60.3-7
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 6,016 kB
  • ctags: 5,217
  • sloc: cpp: 77,611; ansic: 3,765; sh: 2,996; makefile: 234; sed: 93
file content (77 lines) | stat: -rw-r--r-- 1,739 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef _LEVEL_LIST_H
#define _LEVEL_LIST_H

#include "level.h"
#include "builder.h"
#include "player.h"
#include "errlog.h"
#include "object_list.h"

/******************************************
 ** Holds the level object
 ******************************************/

struct chain_link {
   Level      *the_level;
   chain_link *next_link;
};

class Level_Chain;

/********************************************************
 ** Maintains the list of level chains
 ********************************************************/

class Level_List {
 public:
	 int get_status();

   Level_List(ErrLog *error_log, Object_List *obj_dbase);
   ~Level_List();
   int   load_levels(ErrLog *error_log, Object_List *obj_dbase);
   int   add_level(Level *the_level);
   int   check_levels(Player *the_player);
   Level *get_level(char *the_chain, int the_lvl);
   int   show_chains(Player *the_player);
   int   show_levels(Player *the_player, char *the_chain);


 private:
	 int status;

   Level_Chain *the_list;
};


/********************************************************
 ** Maintains a level chain, such as Wizard level chain, 
 ** Warrior level chain, etc
 ********************************************************/

class Level_Chain {
 public:
   
   Level_Chain(char *the_name);
   ~Level_Chain();
   char *get_chain_name();
   void set_chain_name(char *the_name);
   int  add_level(Level *the_level);
   int check_chain(Player *the_player, int the_lvl);
   Level *get_level(int the_lvl);
   int show_levels(Player *the_player);
   int get_num_levels();

   Level_Chain *get_next_chain();
   void set_next_chain(Level_Chain *new_chain); 

 private:

   Strings     chain_name;
   chain_link  *the_chain;

   Level_Chain *next_chain;
};


#endif