ScummVM API documentation
title_engine.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 TITANIC_TITLE_ENGINE_H
23 #define TITANIC_TITLE_ENGINE_H
24 
25 #include "common/stream.h"
26 #include "titanic/support/string.h"
27 #include "titanic/true_talk/script_handler.h"
28 #include "titanic/true_talk/tt_response.h"
29 #include "titanic/true_talk/tt_script_base.h"
30 #include "titanic/true_talk/tt_title_script.h"
31 
32 namespace Titanic {
33 
34 class CTitleEngine;
35 
36 class CTitleStream : public SimpleFile {
37 public:
38  CTitleStream() : SimpleFile() {}
39 };
40 
41 class CTitleEngine {
42 public:
43  CScriptHandler *_scriptHandler;
44  TTscriptBase *_script;
45 public:
46  CTitleEngine();
47  virtual ~CTitleEngine();
48 
52  virtual void setup(int val1, VocabMode vocabMode = VOCAB_MODE_NONE);
53 
57  virtual int setResponse(TTscriptBase *script, TTresponse *response) { return SS_4; }
58 
62  virtual SimpleFile *open(const CString &name) = 0;
63 };
64 
65 class STtitleEngine : public CTitleEngine {
66 private:
68  const TTresponse *_responseP;
69 public:
70  Common::Array<uint> _indexes;
71  Common::Array<byte> _data;
72 public:
73  STtitleEngine();
74  ~STtitleEngine() override;
75 
76  void reset();
77 
81  void setup(int val1, VocabMode vocabMode = VOCAB_MODE_NONE) override;
82 
86  int setResponse(TTscriptBase *script, TTresponse *response) override;
87 
91  SimpleFile *open(const CString &name) override;
92 };
93 
94 } // End of namespace Titanic
95 
96 #endif /* TITANIC_TITLE_ENGINE_H */
Definition: stream.h:745
Definition: simple_file.h:49
Definition: tt_response.h:30
virtual int setResponse(TTscriptBase *script, TTresponse *response)
Definition: title_engine.h:57
Definition: title_engine.h:36
Definition: title_engine.h:41
Definition: arm.h:30
Definition: string.h:40
virtual void open(Common::SeekableReadStream *stream)
Definition: script_handler.h:36
Definition: title_engine.h:65
Definition: tt_script_base.h:38