ScummVM API documentation
randomhat.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
* MIT License:
21
*
22
* Copyright (c) 2009 Alexei Svitkine, Eugene Sandulenko
23
*
24
* Permission is hereby granted, free of charge, to any person
25
* obtaining a copy of this software and associated documentation
26
* files (the "Software"), to deal in the Software without
27
* restriction, including without limitation the rights to use,
28
* copy, modify, merge, publish, distribute, sublicense, and/or sell
29
* copies of the Software, and to permit persons to whom the
30
* Software is furnished to do so, subject to the following
31
* conditions:
32
*
33
* The above copyright notice and this permission notice shall be
34
* included in all copies or substantial portions of the Software.
35
*
36
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
37
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
38
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
39
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
40
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
41
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
42
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
43
* OTHER DEALINGS IN THE SOFTWARE.
44
*
45
*/
46
47
#ifndef WAGE_RANDOMHAT_H
48
#define WAGE_RANDOMHAT_H
49
50
namespace
Wage
{
51
52
enum
{
53
kTokWeapons = -400,
54
kTokMagic = -300,
55
kTokRun = -200,
56
kTokOffer = -100,
57
kTokNone = -100000
58
};
59
60
class
RandomHat
{
61
public
:
62
RandomHat
(
Common::RandomSource
*rnd) : _rnd(rnd) {}
63
64
void
addTokens(
int
type,
int
count);
65
int
drawToken();
66
67
private
:
68
Common::RandomSource
*_rnd;
69
Common::HashMap<int, int>
_tokens;
70
71
int
countTokens();
72
};
73
74
}
// End of namespace Wage
75
76
#endif
Common::RandomSource
Definition:
random.h:44
Common::HashMap< int, int >
Wage
Definition:
debugger.h:28
Wage::RandomHat
Definition:
randomhat.h:60
engines
wage
randomhat.h
Generated on Fri Nov 22 2024 09:27:50 for ScummVM API documentation by
1.8.13