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
29
namespace
Ultima {
30
namespace
Ultima8 {
31
32
typedef
Common::HashMap<Common::String, TreasureInfo, Common::IgnoreCase_Hash>
TreasureMap;
33
34
class
TreasureLoader
{
35
public
:
36
TreasureLoader
();
37
~TreasureLoader
();
38
40
void
loadDefaults
();
41
43
bool
parse
(
const
Common::String
&,
Common::Array<TreasureInfo>
&treasure)
const
;
44
45
private
:
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
Common::Array
Definition:
array.h:52
Common::HashMap< Common::String, TreasureInfo, Common::IgnoreCase_Hash >
Common::String
Definition:
str.h:59
Ultima::Ultima8::TreasureLoader
Definition:
treasure_loader.h:34
Ultima::Ultima8::TreasureLoader::parse
bool parse(const Common::String &, Common::Array< TreasureInfo > &treasure) const
parse treasure string into vector of TreasureInfo objects
Ultima::Ultima8::TreasureLoader::loadDefaults
void loadDefaults()
load defaults from 'game' ini section
Ultima::Ultima8::TreasureInfo
Definition:
treasure_info.h:31
engines
ultima
ultima8
games
treasure_loader.h
Generated on Sat Oct 24 2026 09:26:49 for ScummVM API documentation by
1.9.4