Some refactor of special node system

- Context type (town/out/scen) is now an enum
- Don't expose internals in the header
- Use a state struct to pass things around through the system
- Fix special AFFECT_DEADNESS case for default party selection
- Maybe other bits and pieces?
This commit is contained in:
2020-02-02 19:12:45 -05:00
parent 973b147a3d
commit 86d2574aed
14 changed files with 646 additions and 671 deletions

View File

@@ -89,10 +89,14 @@ public:
void writeTo(std::ostream& file, int n) const;
};
enum class eSpecCtxType {
SCEN, OUT, TOWN,
};
class cTimer {
public:
long time = 0;
short node_type = 0;
eSpecCtxType node_type = eSpecCtxType::SCEN;
short node = -1;
};
@@ -110,7 +114,7 @@ enum class eSpecCtx {
struct pending_special_type {
spec_num_t spec;
eSpecCtx mode;
unsigned short type; // 0 - scen, 1 - out, 2 - town
eSpecCtxType type;
location where;
long long trigger_time;
};