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
11  * modify it under the terms of the GNU General Public License
12  * as published by the Free Software Foundation; either version 2
13  * of the License, or (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, write to the Free Software
22  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
23  *
24  */
25 
26 #ifndef PEGASUS_NEIGHBORHOOD_ZOOM_H
27 #define PEGASUS_NEIGHBORHOOD_ZOOM_H
28 
29 #include "common/array.h"
30 #include "common/endian.h"
31 
32 #include "pegasus/constants.h"
33 
34 namespace Common {
35 	class SeekableReadStream;
36 }
37 
38 namespace Pegasus {
39 
40 class ZoomTable {
41 public:
ZoomTable()42 	ZoomTable() {}
~ZoomTable()43 	~ZoomTable() {}
44 
getResTag()45 	static uint32 getResTag() { return MKTAG('Z', 'o', 'o', 'm'); }
46 
47 	void loadFromStream(Common::SeekableReadStream *stream);
48 	void clear();
49 
50 	struct Entry {
51 		Entry();
52 		void clear();
isEmptyEntry53 		bool isEmpty() { return movieStart == 0xffffffff; }
54 
55 		HotSpotID hotspot;
56 		TimeValue movieStart;
57 		TimeValue movieEnd;
58 		RoomID	room;
59 		DirectionConstant direction;
60 	};
61 
62 	Entry findEntry(HotSpotID hotspot);
63 
64 private:
65 	Common::Array<Entry> _entries;
66 };
67 
68 } // End of namespace Pegasus
69 
70 #endif
71