-
Notifications
You must be signed in to change notification settings - Fork 0
/
APPEAR.CPP
100 lines (85 loc) · 2.76 KB
/
APPEAR.CPP
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
100
/* ========================================================================
Copyright (c) 1990,1995 Synergistic Software
All Rights Reserved
========================================================================
Filename: APPEAR.CPP
Author: John Conley (copied from ARMOR.CPP by Gary Powell)
========================================================================
======================================================================== */
/* ------------------------------------------------------------------------
Includes
------------------------------------------------------------------------ */
#include <string.h>
#include "appear.hxx"
/* ------------------------------------------------------------------------
Notes
------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------
Defines and Compile Flags
------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------
Macros
------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------
Prototypes
------------------------------------------------------------------------ */
/* ------------------------------------------------------------------------
Global Variables
------------------------------------------------------------------------ */
#if 01
const APPEARANCE_INFO::APPEARANCE_ITEM APPEARANCE_INFO::fpAppearanceInfoTable[]
= {
// THINGTYPE
LORD_FEMALE_1,
LORD_FEMALE_2,
LORD_FEMALE_3,
LORD_MALE_1,
LORD_MALE_2,
LORD_MALE_3,
LORD_MALE_4,
LORD_MALE_5,
LORD_MALE_6,
LORD_MALE_7,
GUILDER_MALE_1,
GUILDER_MALE_2,
GUILDER_FEMALE,
PRIEST_MALE_1,
PRIEST_MALE_2,
PRIEST_FEMALE_1,
WIZARD_FEMALE_1,
WIZARD_FEMALE_2,
WIZARD_MALE_1,
WIZARD_MALE_2,
WIZARD_MALE_4,
WIZARD_MALE_3,
DWARF_GUARD,
DWARF_LORD_1,
DWARF_LORD_3,
DWARF_LORD_2,
ELF_LORD_1,
ELF_LORD_2,
ELF_LADY_LORD,
GOBLIN_LORD_1,
GOBLIN_QUEEN,
GNOLL_1,
GORGON,
MANSLAYER,
SPIDER_KING,
};
static APPEARANCE_INFO::TYPE APPEARANCE_INFO::IndexFromType (THINGTYPE iType)
{
// Given a THINGTYPE, return the index of the corresponding appearance item.
LONG iAppearance;
for (iAppearance = FIRST_APPEARANCE; iAppearance < APPEARANCE_MAX_INDEX; iAppearance++)
{
if (fpAppearanceInfoTable[iAppearance].fGameType == iType)
return (APPEARANCE_INFO::TYPE) iAppearance;
}
// If search fails, return the first item instead of crashing.
#if defined (_DEBUG)
// Put a debug report here if desired.
#endif
return FIRST_APPEARANCE;
}
#endif