-
Notifications
You must be signed in to change notification settings - Fork 0
/
CHARISMA.HXX
60 lines (52 loc) · 1.95 KB
/
CHARISMA.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
/* ========================================================================
Copyright (c) 1990,1996 Synergistic Software
All Rights Reserved
========================================================================
Filename: CHARISMA.HXX - Structure to access Charisma Table Information
Author: Gary Powell
======================================================================== */
#ifndef _CHARISMA_HXX
#define _CHARISMA_HXX
/* ------------------------------------------------------------------------
Sub Includes
------------------------------------------------------------------------ */
#if !defined(_TYPEDEFS_H)
#include "typedefs.h"
#endif
/* ------------------------------------------------------------------------
Defines and Compile Flags
------------------------------------------------------------------------ */
// HUNGARIAN NOTE: All values are of type long unless specified. So if
// is doesn't start with a capital letter, the lower case should be a
// prefix. 'u' means Ulong.
class CHARISMA {
public:
class CHARISMA_ITEM {
public:
friend class CHARISMA;
CHARISMA_ITEM(SBYTE sbMaxNumOfHenchmen, SBYTE sbLoyalityBase, SBYTE sbReactionAdjustment)
{
this->sbMaxNumOfHenchmen = sbMaxNumOfHenchmen;
this->sbLoyalityBase = sbLoyalityBase;
this->sbReactionAdjustment = sbReactionAdjustment;
}
private:
SBYTE sbMaxNumOfHenchmen;
SBYTE sbLoyalityBase;
SBYTE sbReactionAdjustment;
};
static const SBYTE mfGetMaxHenchmen(const SBYTE /* sbCharisma */ );
static const SBYTE mfGetReactionAdjustment(const SBYTE /* sbCharisma */ );
private:
static const CHARISMA_ITEM pCharismaTable[];
};
typedef CHARISMA *PTR_CHARISMA;
inline const SBYTE CHARISMA::mfGetMaxHenchmen(const SBYTE sbCharisma )
{
return pCharismaTable[sbCharisma].sbMaxNumOfHenchmen;
}
inline const SBYTE CHARISMA::mfGetReactionAdjustment(const SBYTE sbCharisma )
{
return pCharismaTable[sbCharisma].sbReactionAdjustment;
}
#endif // _CHARISMA_HXX