ScummVM API documentation
module.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 PINK_MODULE_H
23
#define PINK_MODULE_H
24
25
#include "common/debug.h"
26
#include "common/hash-str.h"
27
28
#include "pink/archive.h"
29
#include "pink/objects/object.h"
30
#include "pink/objects/inventory.h"
31
32
namespace
Pink
{
33
34
class
ModuleProxy
:
public
NamedObject
{
35
public
:
36
ModuleProxy
();
37
ModuleProxy
(
const
Common::String
&name);
38
};
39
40
class
PinkEngine
;
41
class
GamePage
;
42
43
class
Module
:
public
NamedObject
{
44
public
:
45
Module
(
PinkEngine
*game,
const
Common::String
&name);
46
~
Module
()
override
;
47
48
void
loadState(
Archive
&archive);
49
void
saveState(
Archive
&archive);
50
51
void
load(
Archive
&archive)
override
;
52
void
init(
bool
isLoadingSave,
const
Common::String
&pageName);
53
void
changePage(
const
Common::String
&pageName);
54
55
PinkEngine
*getGame()
const
{
return
_game; }
56
InventoryMgr
*getInventoryMgr() {
return
&_invMgr; }
57
const
InventoryMgr
*getInventoryMgr()
const
{
return
&_invMgr; }
58
59
bool
checkValueOfVariable(
const
Common::String
&variable,
const
Common::String
&value)
const
;
60
void
setVariable(
Common::String
&variable,
Common::String
&value) { _variables[variable] = value; }
61
62
GamePage
*getPage() {
return
_page; }
63
const
GamePage
*getPage()
const
{
return
_page; }
64
65
friend
class
Console
;
66
67
private
:
68
GamePage
*findPage(
const
Common::String
&pageName)
const
;
69
70
PinkEngine
*_game;
71
GamePage
*_page;
72
Array<GamePage *>
_pages;
73
InventoryMgr
_invMgr;
74
StringMap
_variables;
75
};
76
77
78
}
// End of namespace Pink
79
80
#endif
Pink::Archive
Definition:
archive.h:39
Common::String
Definition:
str.h:59
Pink::ModuleProxy
Definition:
module.h:34
Pink::InventoryMgr
Definition:
inventory.h:48
Pink::Console
Definition:
console.h:31
Pink::PinkEngine
Definition:
pink.h:95
Pink::NamedObject
Definition:
object.h:40
Pink::Module
Definition:
module.h:43
Pink
Definition:
archive.h:35
Pink::StringMap
Definition:
utils.h:52
Pink::Array
Definition:
utils.h:30
Pink::GamePage
Definition:
game_page.h:34
engines
pink
objects
module.h
Generated on Fri Nov 22 2024 09:04:29 for ScummVM API documentation by
1.8.13