ScummVM API documentation
hotspotinfo.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
* Additional copyright for this file:
8
* Copyright (C) 1995-1997 Presto Studios, Inc.
9
*
10
* This program is free software: you can redistribute it and/or modify
11
* it under the terms of the GNU General Public License as published by
12
* the Free Software Foundation, either version 3 of the License, or
13
* (at your option) any later version.
14
*
15
* This program is distributed in the hope that it will be useful,
16
* but WITHOUT ANY WARRANTY; without even the implied warranty of
17
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18
* GNU General Public License for more details.
19
*
20
* You should have received a copy of the GNU General Public License
21
* along with this program. If not, see <http://www.gnu.org/licenses/>.
22
*
23
*/
24
25
#ifndef PEGASUS_NEIGHBORHOOD_HOTSPOTINFO_H
26
#define PEGASUS_NEIGHBORHOOD_HOTSPOTINFO_H
27
28
#include "common/array.h"
29
#include "common/endian.h"
30
31
#include "pegasus/constants.h"
32
33
namespace
Common
{
34
class
SeekableReadStream;
35
}
36
37
namespace
Pegasus
{
38
39
class
HotspotInfoTable
{
40
public
:
41
HotspotInfoTable
() {}
42
~
HotspotInfoTable
() {}
43
44
static
uint32 getResTag() {
return
MKTAG
(
'H'
,
'S'
,
'I'
,
'n'
); }
45
46
void
loadFromStream(
Common::SeekableReadStream
*stream);
47
void
clear();
48
49
struct
Entry
{
50
Entry
() { hotspotRoom = kNoRoomID; }
51
bool
isEmpty() {
return
hotspotRoom == kNoRoomID; }
52
53
HotSpotID hotspot;
54
HotSpotActivationID hotspotActivation;
55
// Location hot spot lives in:
56
RoomID hotspotRoom;
57
DirectionConstant hotspotDirection;
58
// Extra to play if this is a "play extra" hot spot.
59
ExtraID hotspotExtra;
60
// Item corresponding to this hot spot if it is an item-related hot spot.
61
ItemID hotspotItem;
62
};
63
64
Entry
findEntry(HotSpotID hotspot);
65
66
typedef
Common::Array<Entry>::iterator
iterator;
67
iterator begin() {
return
_entries.begin(); }
68
iterator end() {
return
_entries.end(); }
69
70
private
:
71
Common::Array<Entry>
_entries;
72
};
73
74
}
// End of namespace Pegasus
75
76
#endif
Common::Array< Entry >
Common::Array::iterator
T * iterator
Definition:
array.h:54
Common::SeekableReadStream
Definition:
stream.h:745
Pegasus::HotspotInfoTable
Definition:
hotspotinfo.h:39
Common
Definition:
algorithm.h:29
MKTAG
#define MKTAG(a0, a1, a2, a3)
Definition:
endian.h:188
Pegasus::HotspotInfoTable::Entry
Definition:
hotspotinfo.h:49
Pegasus
Definition:
ai_action.h:33
engines
pegasus
neighborhood
hotspotinfo.h
Generated on Sun Dec 22 2024 09:17:36 for ScummVM API documentation by
1.8.13