ScummVM API documentation
context.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 ULTIMA4_GAME_CONTEXT_H
23
#define ULTIMA4_GAME_CONTEXT_H
24
25
#include "ultima/ultima4/map/location.h"
26
#include "ultima/ultima4/game/aura.h"
27
#include "ultima/ultima4/game/names.h"
28
#include "ultima/ultima4/game/person.h"
29
#include "ultima/ultima4/game/script.h"
30
#include "ultima/ultima4/core/types.h"
31
#include "ultima/ultima4/filesys/savegame.h"
32
#include "ultima/shared/std/containers.h"
33
34
namespace
Ultima
{
35
namespace
Ultima4 {
36
37
class
Object;
38
class
Party;
39
class
Person;
40
class
Script;
41
class
StatsArea;
42
43
enum
TransportContext {
44
TRANSPORT_FOOT = 0x1,
45
TRANSPORT_HORSE = 0x2,
46
TRANSPORT_SHIP = 0x4,
47
TRANSPORT_BALLOON = 0x8,
48
TRANSPORT_FOOT_OR_HORSE = TRANSPORT_FOOT | TRANSPORT_HORSE,
49
TRANSPORT_ANY = 0xffff
50
};
51
55
class
Context
:
public
Script::Provider
{
56
public
:
57
Context
();
58
~
Context
();
59
63
void
reset
();
64
65
StatsArea
*_stats;
66
Aura
*_aura;
67
Party
*_party;
68
Location
*_location;
69
int
_line, _col;
70
int
_moonPhase;
71
int
_windDirection;
72
int
_windCounter;
73
bool
_windLock;
74
int
_horseSpeed;
75
int
_opacity;
76
TransportContext _transportContext;
77
uint32 _lastCommandTime;
78
Object
*_lastShip;
79
public
:
83
Common::String
translate
(
Std::vector<Common::String>
&parts)
override
{
84
if
(parts.
size
() == 1) {
85
if
(parts[0] ==
"wind"
)
86
return
getDirectionName(static_cast<Direction>(_windDirection));
87
}
88
return
""
;
89
}
90
};
91
92
extern
Context
*g_context;
93
94
}
// End of namespace Ultima4
95
}
// End of namespace Ultima
96
97
#endif
Ultima::Ultima4::Context
Definition:
context.h:55
Common::String
Definition:
str.h:59
Ultima::Ultima4::Context::translate
Common::String translate(Std::vector< Common::String > &parts) override
Definition:
context.h:83
Ultima::Ultima4::StatsArea
Definition:
stats.h:65
Ultima::Ultima4::Script::Provider
Definition:
script.h:55
Ultima
Definition:
detection.h:27
Ultima::Ultima4::Party
Definition:
player.h:285
Ultima::Ultima4::Object
Definition:
object.h:42
Ultima::Ultima4::Location
Definition:
location.h:49
Ultima::Ultima4::Aura
Definition:
aura.h:33
Common::Array::size
size_type size() const
Definition:
array.h:315
Ultima::Ultima4::Context::reset
void reset()
Ultima::Std::vector< Common::String >
engines
ultima
ultima4
game
context.h
Generated on Sat Nov 23 2024 09:11:20 for ScummVM API documentation by
1.8.13