ScummVM API documentation
file.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 PINK_FILE_H
23 #define PINK_FILE_H
24 
25 #include "common/file.h"
26 
27 namespace Pink {
28 
30  void load(Common::File &file);
31 
32  char name[16];
33  uint32 objectsOffset;
34  //uint32 objectsCount; never used
35  uint32 resourcesOffset;
36  uint32 resourcesCount;
37 };
38 
40  void load(Common::File &file);
41 
42  char name[16];
43  uint32 offset;
44  uint32 size;
45  bool inBro;
46 };
47 
48 class PinkEngine;
49 class Object;
50 
51 class OrbFile : public Common::File {
52 public:
53  OrbFile();
54  ~OrbFile() override;
55  bool open(const Common::Path &name) override;
56 
57 public:
58  void loadGame(PinkEngine *game);
59  void loadObject(Object *obj, const Common::String &name);
60  void loadObject(Object *obj, ObjectDescription *objDesc);
61 
62  ResourceDescription *createResDescTable(ObjectDescription *objDesc);
63 
64  ObjectDescription *getObjDesc(const char *name);
65  uint32 getTimestamp() { return _timestamp; }
66 
67 private:
68  void seekToObject(const char *name);
69 
70 private:
71  ObjectDescription *_table;
72  uint32 _tableSize;
73  uint32 _timestamp;
74 };
75 
76 class BroFile : public Common::File {
77 public:
78  BroFile() : _timestamp(0) {}
79  bool open(const Common::Path &name) override;
80  uint32 getTimestamp() { return _timestamp; }
81 
82 private:
83  uint32 _timestamp;
84 };
85 
86 } // End of namespace Pink
87 
88 #endif
Definition: str.h:59
Definition: pink.h:95
Definition: path.h:52
Definition: file.h:51
Definition: object.h:31
Definition: file.h:39
Definition: file.h:76
Definition: archive.h:35
Definition: file.h:47
Definition: file.h:29