-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathAPPEAR.HXX
99 lines (88 loc) · 2.68 KB
/
APPEAR.HXX
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
/* ========================================================================
Copyright (c) 1997 Synergistic Software
All Rights Reserved
========================================================================
Filename: APPEARANCE.HXX - Collection of appearance types
Author: John Conley (copied from ARMOR.HXX by Gary Powell)
======================================================================== */
#ifndef _APPEARANCE_HXX
#define _APPEARANCE_HXX
/* ------------------------------------------------------------------------
Sub Includes
------------------------------------------------------------------------ */
#include "typedefs.h"
// #include "playrace.hxx"
// #include "weapon.hxx"
#include "strenum.h"
#include "thingtyp.h"
/* ------------------------------------------------------------------------
Defines and Compile Flags
------------------------------------------------------------------------ */
class APPEARANCE_INFO {
public:
typedef enum {
FIRST_APPEARANCE = 0,
CH_LORD_FEMALE_1,
CH_LORD_FEMALE_2,
CH_LORD_FEMALE_3,
CH_LORD_MALE_1,
CH_LORD_MALE_2,
CH_LORD_MALE_3,
CH_LORD_MALE_4,
CH_LORD_MALE_5,
CH_LORD_MALE_6,
CH_LORD_MALE_7,
CH_GUILDER_MALE_1,
CH_GUILDER_MALE_2,
CH_GUILDER_FEMALE,
CH_PRIEST_MALE_1,
CH_PRIEST_MALE_2,
CH_PRIEST_FEMALE_1,
CH_WIZARD_FEMALE_1,
CH_WIZARD_FEMALE_2,
CH_WIZARD_MALE_1,
CH_WIZARD_MALE_2,
CH_WIZARD_MALE_4,
CH_WIZARD_MALE_3,
CH_DWARF_GUARD,
CH_DWARF_LORD_1,
CH_DWARF_LORD_3,
CH_DWARF_LORD_2,
CH_ELF_LORD_1,
CH_ELF_LORD_2,
CH_ELF_LADY_LORD,
CH_GOBLIN_LORD_1,
CH_GOBLIN_QUEEN,
CH_GNOLL_1,
CH_GORGON,
CH_MANSLAYER,
CH_SPIDER_KING,
// Insert new items above this line!
APPEARANCE_MAX_INDEX
} TYPE;
class APPEARANCE_ITEM {
public:
friend class APPEARANCE_INFO;
private:
THINGTYPE fGameType; // index to game_ttypes array
};
static char const * const mfGetName (const TYPE);
static const THINGTYPE mfGetType (const TYPE);
static TYPE IndexFromType (THINGTYPE iType);
private:
static const APPEARANCE_ITEM fpAppearanceInfoTable[];
};
typedef APPEARANCE_INFO *PTR_APPEARANCE_INFO;
// Get the index to the game type array for this appearance (so we can
// get the name of the art file).
inline const THINGTYPE APPEARANCE_INFO::mfGetType (
const APPEARANCE_INFO::TYPE AppearanceType)
{
if (AppearanceType < FIRST_APPEARANCE || AppearanceType >= APPEARANCE_MAX_INDEX)
// error--keep running by returning first one
return fpAppearanceInfoTable[FIRST_APPEARANCE].fGameType;
else
return fpAppearanceInfoTable[AppearanceType].fGameType;
}
#endif // _APPEARANCE_HXX