ScummVM API documentation
room.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 SUPERNOVA_ROOM_H
23 #define SUPERNOVA_ROOM_H
24 
25 #include "common/str.h"
26 
27 #include "supernova/msn_def.h"
28 
29 namespace Common {
30 class ReadStream;
31 class WriteStream;
32 }
33 
34 namespace Supernova {
35 
36 class GameManager1;
37 class SupernovaEngine;
38 
39 class Room {
40 public:
41  Room();
42 
43  bool hasSeen();
44  void setRoomSeen(bool seen);
45  int getFileNumber() const;
46  RoomId getId() const;
47  void setSectionVisible(uint section, bool visible);
48  bool isSectionVisible(uint index) const;
49  void removeSentence(int sentence, int number);
50  void removeSentenceByMask(int mask, int number);
51  void addSentence(int sentence, int number);
52  void addAllSentences(int number);
53  bool sentenceRemoved(int sentence, int number);
54  bool allSentencesRemoved(int maxSentence, int number);
55  Object *getObject(uint index);
56 
57  virtual ~Room();
58  virtual void animation();
59  virtual void onEntrance();
60  virtual bool interact(Action verb, Object &obj1, Object &obj2);
61  virtual bool serialize(Common::WriteStream *out);
62  virtual bool deserialize(Common::ReadStream *in, int version);
63 
64 protected:
65  int _fileNumber;
66  char _shown[kMaxSection];
67  byte _sentenceRemoved[kMaxDialog];
68  Object _objectState[kMaxObject];
69  RoomId _id;
70  SupernovaEngine *_vm;
71 
72 private:
73  bool _seen;
74 };
75 
76 }
77 #endif // SUPERNOVA_ROOM_H
Definition: supernova.h:61
Definition: stream.h:77
Definition: console.h:27
Definition: room.h:39
Definition: algorithm.h:29
Definition: stream.h:385
Definition: msn_def.h:210