ScummVM API documentation
treasure_loader.h
1/* ScummVM - Graphic Adventure Engine
2 *
3 * ScummVM is the legal property of its developers, whose names
4 * are too numerous to list here. Please refer to the COPYRIGHT
5 * file distributed with this source distribution.
6 *
7 * This program is free software: you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation, either version 3 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program. If not, see <http://www.gnu.org/licenses/>.
19 *
20 */
21
22#ifndef ULTIMA8_GAMES_TREASURELOADER_H
23#define ULTIMA8_GAMES_TREASURELOADER_H
24
25#include "common/hash-str.h"
26#include "common/hashmap.h"
27#include "ultima/ultima8/world/actors/treasure_info.h"
28
29namespace Ultima {
30namespace Ultima8 {
31
33
35public:
38
41
43 bool parse(const Common::String &, Common::Array<TreasureInfo> &treasure) const;
44
45private:
46 TreasureMap _defaultTreasure;
47
48 bool internalParse(const Common::String &desc, TreasureInfo &ti, bool loadingDefault) const;
49
50 bool parseUInt32Vector(const Common::String &val, Common::Array<uint32> &vec) const;
51 bool parseUIntRange(const Common::String &val, unsigned int &min, unsigned int &max) const;
52 bool parseDouble(const Common::String &val, double &d) const;
53 bool parseInt(const Common::String &val, int &i) const;
54};
55
56} // End of namespace Ultima8
57} // End of namespace Ultima
58
59#endif
Definition: array.h:52
Definition: str.h:59
Definition: treasure_loader.h:34
bool parse(const Common::String &, Common::Array< TreasureInfo > &treasure) const
parse treasure string into vector of TreasureInfo objects
void loadDefaults()
load defaults from 'game' ini section
Definition: treasure_info.h:31