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