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 8 * modify it under the terms of the GNU General Public License 9 * as published by the Free Software Foundation; either version 2 10 * of the License, or (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, write to the Free Software 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. 20 * 21 */ 22 23 #ifndef ILLUSIONS_GRAPHICS_H 24 #define ILLUSIONS_GRAPHICS_H 25 26 #include "common/array.h" 27 #include "common/rect.h" 28 #include "common/stream.h" 29 30 namespace Illusions { 31 32 struct WidthHeight { 33 int16 _width, _height; 34 void load(Common::SeekableReadStream &stream); 35 WidthHeightWidthHeight36 WidthHeight() : _width(0), _height(0) {} 37 }; 38 39 struct SurfInfo { 40 uint32 _pixelSize; 41 WidthHeight _dimensions; 42 void load(Common::SeekableReadStream &stream); 43 }; 44 45 struct WRect { 46 Common::Point _topLeft; 47 Common::Point _bottomRight; 48 }; 49 50 struct RGB { 51 byte r, g, b; 52 }; 53 54 struct NamedPoint { 55 uint32 _namedPointId; 56 Common::Point _pt; 57 void load(Common::SeekableReadStream &stream); 58 }; 59 60 class NamedPoints { 61 public: 62 bool findNamedPoint(uint32 namedPointId, Common::Point &pt); 63 void load(uint count, Common::SeekableReadStream &stream); 64 protected: 65 typedef Common::Array<NamedPoint> Items; 66 typedef Items::iterator ItemsIterator; 67 Items _namedPoints; 68 }; 69 70 void loadPoint(Common::SeekableReadStream &stream, Common::Point &pt); 71 72 } // End of namespace Illusions 73 74 #endif // ILLUSIONS_GRAPHICS_H 75