ScummVM API documentation
objectman.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 // this is the object manager. our equivalent to protocol.c and coredata.c
23 
24 #ifndef SWORD1_OBJECTMAN_H
25 #define SWORD1_OBJECTMAN_H
26 
27 #include "sword1/resman.h"
28 #include "sword1/sworddefs.h"
29 #include "sword1/object.h"
30 
31 namespace Sword1 {
32 
33 class ObjectMan {
34 public:
35  ObjectMan(ResMan *pResourceMan);
36  ~ObjectMan();
37  void initialize();
38 
39  Object *fetchObject(uint32 id);
40  uint32 fetchNoObjects(int section);
41  bool sectionAlive(uint16 section);
42  void megaEntering(uint16 section);
43  void megaLeaving(uint16 section, int id);
44 
45  uint8 fnCheckForTextLine(uint32 textId);
46  char *lockText(uint32 textId);
47  void unlockText(uint32 textId);
48  uint32 lastTextNumber(int section);
49 
50  void closeSection(uint32 screen);
51 
52  void saveLiveList(uint16 *dest); // for loading/saving
53  void loadLiveList(uint16 *src);
54 
55  void mainLoopPatch();
56 
57 private:
58  char *lockText(uint32 textId, uint8 language);
59  void unlockText(uint32 textId, uint8 language);
60 
61  ResMan *_resMan;
62  static const uint32 _objectList[TOTAL_SECTIONS]; //a table of pointers to object files
63  static const uint32 _textList[TOTAL_SECTIONS][7]; //a table of pointers to text files
64  uint16 _liveList[TOTAL_SECTIONS]; //which sections are active
65  uint8 *_cptData[TOTAL_SECTIONS];
66  static char _missingSubTitleStr[];
67  static const char *const _translationId2950145[7]; //translation for textId 2950145 (missing from cluster file for some languages)
68  static const char *const _translationId8455194[7]; //translation for textId 8455194 (missing in the demo)
69  static const char *const _translationId8455195[7]; //translation for textId 8455195 (missing in the demo)
70  static const char *const _translationId8455196[7]; //translation for textId 8455196 (missing in the demo)
71  static const char *const _translationId8455197[7]; //translation for textId 8455197 (missing in the demo)
72  static const char *const _translationId8455198[7]; //translation for textId 8455198 (missing in the demo)
73  static const char *const _translationId8455199[7]; //translation for textId 8455199 (missing in the demo)
74  static const char *const _translationId8455200[7]; //translation for textId 8455200 (missing in the demo)
75  static const char *const _translationId8455201[7]; //translation for textId 8455201 (missing in the demo)
76  static const char *const _translationId8455202[7]; //translation for textId 8455202 (missing in the demo)
77  static const char *const _translationId8455203[7]; //translation for textId 8455203 (missing in the demo)
78  static const char *const _translationId8455204[7]; //translation for textId 8455204 (missing in the demo)
79  static const char *const _translationId8455205[7]; //translation for textId 8455205 (missing in the demo)
80  static const char *const _translationId6488080[7]; //translation for textId 6488081 (missing in the demo)
81  static const char *const _translationId6488081[7]; //translation for textId 6488081 (missing in the demo)
82  static const char *const _translationId6488082[7]; //translation for textId 6488082 (missing in the demo)
83  static const char *const _translationId6488083[7]; //translation for textId 6488083 (missing in the demo)
84 };
85 
86 } // End of namespace Sword1
87 
88 #endif //OBJECTMAN_H
Definition: object.h:62
Definition: resman.h:65
Definition: animation.h:38
Definition: objectman.h:33