summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/wiz-dump.h
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2014-08-15 00:21:17 -0400
committerJesse Luehrs <doy@tozt.net>2014-08-15 00:30:19 -0400
commiteb103fec101bac54e16df0c72fb2a85ee45e5723 (patch)
tree1f9bd1a8953a3fbe3de0d25871545ce7ca8a948b /crawl-ref/source/wiz-dump.h
parent6e25fd0e675c04a54b57fd05d1961e108bd139c5 (diff)
downloadcrawl-ref-eb103fec101bac54e16df0c72fb2a85ee45e5723.tar.gz
crawl-ref-eb103fec101bac54e16df0c72fb2a85ee45e5723.zip
split dump file loading out to a separate file (and class)
Diffstat (limited to 'crawl-ref/source/wiz-dump.h')
-rw-r--r--crawl-ref/source/wiz-dump.h32
1 files changed, 32 insertions, 0 deletions
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<string> &tokens);
+ bool _check_stats1(const vector<string> &tokens);
+ bool _check_stats2(const vector<string> &tokens);
+ bool _check_stats3(const vector<string> &tokens);
+ bool _check_char(const vector<string> &tokens);
+ bool _check_equipment(const vector<string> &tokens, bool in_equipment);
+
+ string filename;
+};
+
+void wizard_load_dump_file();
+
+#endif