From eb103fec101bac54e16df0c72fb2a85ee45e5723 Mon Sep 17 00:00:00 2001 From: Jesse Luehrs Date: Fri, 15 Aug 2014 00:21:17 -0400 Subject: split dump file loading out to a separate file (and class) --- crawl-ref/source/wiz-dump.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 crawl-ref/source/wiz-dump.h (limited to 'crawl-ref/source/wiz-dump.h') diff --git a/crawl-ref/source/wiz-dump.h b/crawl-ref/source/wiz-dump.h new file mode 100644 index 0000000000..3ab44a6e9b --- /dev/null +++ b/crawl-ref/source/wiz-dump.h @@ -0,0 +1,32 @@ +/** + * @file + * @brief Wizmode character dump loading +**/ + +#ifndef WIZDUMP_H +#define WIZDUMP_H + +class chardump_parser { +public: + chardump_parser(const string &f) : filename(f) { } + + bool parse(); + +private: + bool _parse_from_file(const string &full_filename); + + void _modify_character(const string &line); + + bool _check_skill(const vector &tokens); + bool _check_stats1(const vector &tokens); + bool _check_stats2(const vector &tokens); + bool _check_stats3(const vector &tokens); + bool _check_char(const vector &tokens); + bool _check_equipment(const vector &tokens, bool in_equipment); + + string filename; +}; + +void wizard_load_dump_file(); + +#endif -- cgit v1.2.3-54-g00ecf