-
Notifications
You must be signed in to change notification settings - Fork 0
/
MwRandLList.h
99 lines (74 loc) · 3.13 KB
/
MwRandLList.h
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/*===========================================================================
*
* File: Mwrandllist.H
* Author: Dave Humphrey ([email protected])
* Created On: June 13, 2003
*
* Description
*
*=========================================================================*/
#ifndef __MWRANDLLIST_H
#define __MWRANDLLIST_H
/*===========================================================================
*
* Begin Required Includes
*
*=========================================================================*/
#include "mwrandcom.h"
/*===========================================================================
* End of Required Includes
*=========================================================================*/
/*===========================================================================
*
* Begin Type Definitions
*
*=========================================================================*/
/* The level list structure */
typedef struct {
TCHAR ID[MWESM_ID_MAXSIZE+1]; /* Level list ID */
int Number; /* Number of times to add the list */
} mwri_levellist_t;
/* Array of level list pointers */
typedef TPtrArray<mwri_levellist_t> CMwRandLListArray;
/*===========================================================================
* End of Type Definitions
*=========================================================================*/
/*===========================================================================
*
* Begin Class CMwRandLList Definition
*
* Holds the list of external level lists.
*
*=========================================================================*/
class CMwRandLList {
/*---------- Begin Private Class Members ----------------------*/
private:
CMwRandLListArray m_LevelLists; /* Array of level lists */
int m_MaxNumber;
long m_InputLine;
/*---------- Begin Protected Class Methods --------------------*/
protected:
/* Add a new level list to the end of the array */
bool AddLevelList (const TCHAR* pListID, const int Number);
/* Parses an input line to it's components */
bool ParseLine (TCHAR* pLineBuffer, TCHAR** ppVariable, TCHAR** ppListID, TCHAR** ppNumber);
/*---------- Begin Public Class Methods -----------------------*/
public:
/* Class Constructors/Destructors */
CMwRandLList();
virtual ~CMwRandLList() { Destroy(); }
virtual void Destroy (void);
/* Access class members */
mwri_levellist_t* GetLevelList (const int Index) { return (m_LevelLists.GetAt(Index)); }
int GetNumLists (void) { return (m_LevelLists.GetNumElements()); }
int GetMaxNumber (void) { return (m_MaxNumber); }
/* Input a level list data file */
bool Read (const TCHAR* pFilename);
};
/*===========================================================================
* End of Class CMwRandLList Definition
*=========================================================================*/
#endif
/*===========================================================================
* End of File Mwrandllist.H
*=========================================================================*/