ScummVM API documentation
text.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 /*
23  * Based on
24  * WebVenture (c) 2010, Sean Kasun
25  * https://github.com/mrkite/webventure, http://seancode.com/webventure/
26  *
27  * Used with explicit permission from the author
28  */
29 
30 #ifndef MACVENTURE_TEXT_H
31 #define MACVENTURE_TEXT_H
32 
33 #include "macventure/macventure.h"
34 #include "macventure/hufflists.h"
35 
36 namespace MacVenture {
37 typedef uint32 ObjID;
38 class MacVentureEngine;
39 
40 class TextAsset {
41 public:
42  TextAsset(MacVentureEngine *engine, ObjID objid, ObjID source, ObjID target, Container *container, bool isOld, const HuffmanLists *huffman);
43  ~TextAsset() {}
44 
45  const Common::String *decode() {
46  return &_decoded;
47  }
48 
49 private:
50  void decodeOld();
51  void decodeHuffman();
52 
53  Common::String getNoun(ObjID id);
54 
55 private:
56  MacVentureEngine *_engine;
57 
58  Container *_container;
59  ObjID _id;
60  ObjID _targetObj;
61  ObjID _sourceObj;
62  const HuffmanLists *_huffman;
63  bool _isOld;
64 
65  Common::String _decoded;
66 
67 };
68 
69 } // End of namespace MacVenture
70 
71 #endif
Definition: str.h:59
Definition: container.h:48
Definition: hufflists.h:36
Definition: macventure.h:185
Definition: container.h:38
Definition: text.h:40