… | |
… | |
26 | #define LIVING_H |
26 | #define LIVING_H |
27 | |
27 | |
28 | #include <cassert> |
28 | #include <cassert> |
29 | |
29 | |
30 | #include <util.h> |
30 | #include <util.h> |
|
|
31 | |
|
|
32 | //+GPL |
31 | |
33 | |
32 | // corresponds to some arrays in common/living.C |
34 | // corresponds to some arrays in common/living.C |
33 | enum { |
35 | enum { |
34 | STR, |
36 | STR, |
35 | DEX, |
37 | DEX, |
… | |
… | |
83 | sint16 ACC (RW, maxsp); /* Max spell points. */ |
85 | sint16 ACC (RW, maxsp); /* Max spell points. */ |
84 | |
86 | |
85 | sint16 ACC (RW, grace); /* Grace. Used to invoke clerical prayers. */ |
87 | sint16 ACC (RW, grace); /* Grace. Used to invoke clerical prayers. */ |
86 | sint16 ACC (RW, maxgrace); /* Grace. Used to invoke clerical prayers. */ |
88 | sint16 ACC (RW, maxgrace); /* Grace. Used to invoke clerical prayers. */ |
87 | |
89 | |
|
|
90 | //-GPL |
|
|
91 | |
88 | // this method enforces field ordering and should not normally result in |
92 | // this method enforces field ordering and should not normally result in |
89 | // any code being generated. strictly speaking, c++ compilers may reorder |
93 | // any code being generated. strictly speaking, C++ compilers may reorder |
90 | // stat fields, so check for it and declare those compilers unsupported. |
94 | // stat fields, so check for it and declare those compilers unsupported. |
91 | void check_ordering () const |
95 | void check_ordering () const |
92 | { |
96 | { |
93 | assert ((sint8 *)&Str - (sint8 *)&Str == STR); |
97 | assert ((sint8 *)&Str - (sint8 *)&Str == STR); |
94 | assert ((sint8 *)&Dex - (sint8 *)&Str == DEX); |
98 | assert ((sint8 *)&Dex - (sint8 *)&Str == DEX); |