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 NEVERHOOD_STATICDATA_H 24 #define NEVERHOOD_STATICDATA_H 25 26 #include "common/array.h" 27 #include "common/hashmap.h" 28 #include "neverhood/neverhood.h" 29 #include "neverhood/graphics.h" 30 31 namespace Neverhood { 32 33 struct HitRect { 34 NRect rect; 35 uint16 type; 36 }; 37 38 typedef Common::Array<HitRect> HitRectList; 39 40 struct SubRectItem { 41 NRect rect; 42 uint32 messageListId; 43 }; 44 45 struct RectItem { 46 NRect rect; 47 Common::Array<SubRectItem> subRects; 48 }; 49 50 typedef Common::Array<RectItem> RectList; 51 52 struct MessageItem { 53 uint32 messageNum; 54 uint32 messageValue; 55 }; 56 57 typedef Common::Array<MessageItem> MessageList; 58 59 struct NavigationItem { 60 uint32 fileHash; 61 uint32 leftSmackerFileHash; 62 uint32 rightSmackerFileHash; 63 uint32 middleSmackerFileHash; 64 byte interactive; 65 byte middleFlag; 66 uint32 mouseCursorFileHash; 67 }; 68 69 typedef Common::Array<NavigationItem> NavigationList; 70 71 struct HallOfRecordsInfo { 72 uint32 bgFilename1; 73 uint32 bgFilename2; 74 uint32 txFilename; 75 uint32 bgFilename3; 76 byte xPosIndex; 77 byte count; 78 }; 79 80 struct TrackInfo { 81 uint32 id; 82 uint32 bgFilename; 83 uint32 bgShadowFilename; 84 uint32 dataResourceFilename; 85 uint32 trackPointsName; 86 uint32 rectListName; 87 uint32 exPaletteFilename2; 88 uint32 exPaletteFilename1; 89 uint32 mouseCursorFilename; 90 int16 which1; 91 int16 which2; 92 }; 93 94 class StaticData { 95 public: 96 StaticData(); 97 ~StaticData(); 98 void load(const char *filename); 99 HitRectList *getHitRectList(uint32 id); 100 RectList *getRectList(uint32 id); 101 MessageList *getMessageList(uint32 id); 102 NavigationList *getNavigationList(uint32 id); 103 HallOfRecordsInfo *getHallOfRecordsInfoItem(uint32 id); 104 TrackInfo *getTrackInfo(uint32 id); 105 protected: 106 Common::HashMap<uint32, HitRectList*> _hitRectLists; 107 Common::HashMap<uint32, RectList*> _rectLists; 108 Common::HashMap<uint32, MessageList*> _messageLists; 109 Common::HashMap<uint32, NavigationList*> _navigationLists; 110 Common::HashMap<uint32, HallOfRecordsInfo*> _hallOfRecordsInfoItems; 111 Common::HashMap<uint32, TrackInfo*> _trackInfoItems; 112 }; 113 114 } // End of namespace Neverhood 115 116 #endif /* NEVERHOOD_STATICDATA_H */ 117