summaryrefslogtreecommitdiffstats
path: root/crawl-ref/source/wiz-dump.h
blob: 3016b47fed36135151145a75a253b7102137db6e (plain) (blame)
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
/**
 * @file
 * @brief Wizmode character dump loading
**/

#ifndef WIZDUMP_H
#define WIZDUMP_H

class chardump_parser {
public:
    chardump_parser(const string &f) : filename(f), in_equipment(false) { }

    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);

    string filename;
    bool in_equipment;
};

void wizard_load_dump_file();

#endif