ScummVM API documentation
fixed_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 #ifndef SHERLOCK_FIXED_TEXT_H
23 #define SHERLOCK_FIXED_TEXT_H
24 
25 #include "common/scummsys.h"
26 #include "common/language.h"
27 
28 namespace Sherlock {
29 
30 #define FIXED(MSG) _vm->_fixedText->getText(kFixedText_##MSG)
31 
32 enum FixedTextActionId {
33  kFixedTextAction_Invalid = -1,
34  kFixedTextAction_Open = 0,
35  kFixedTextAction_Close,
36  kFixedTextAction_Move,
37  kFixedTextAction_Pick,
38  kFixedTextAction_Use
39 };
40 
41 enum FixedJournalTextId {
42  // Holmes asked/said...
43  kFixedJournalText_HolmesAskedMe = 0,
44  kFixedJournalText_HolmesAskedTheInspector,
45  kFixedJournalText_HolmesAskedPerson,
46  kFixedJournalText_HolmesSaidToMe,
47  kFixedJournalText_HolmesSaidToTheInspector,
48  kFixedJournalText_HolmesSaidToPerson,
49  // I asked/said
50  kFixedJournalText_IReplied,
51  kFixedJournalText_TheReplyWas,
52  // Holmes/I/The Inspector/Person asked/said (without "Then" prefix)
53  kFixedJournalText_HolmesAsked,
54  kFixedJournalText_HolmesSaid,
55  kFixedJournalText_IAsked,
56  kFixedJournalText_ISaid,
57  kFixedJournalText_TheInspectorAsked,
58  kFixedJournalText_TheInspectorSaid,
59  kFixedJournalText_PersonAsked,
60  kFixedJournalText_PersonSaid,
61  // Then Holmes/I/The Inspector/Person asked/said
62  kFixedJournalText_ThenHolmesAsked,
63  kFixedJournalText_ThenHolmesSaid,
64  kFixedJournalText_ThenIAsked,
65  kFixedJournalText_ThenISaid,
66  kFixedJournalText_ThenTheInspectorAsked,
67  kFixedJournalText_ThenTheInspectorSaid,
68  kFixedJournalText_ThenPersonAsked,
69  kFixedJournalText_ThenPersonSaid
70 };
71 
72 class SherlockEngine;
73 
74 class FixedText {
75 protected:
76  SherlockEngine *_vm;
77 
79 public:
80  static FixedText *init(SherlockEngine *vm);
81  virtual ~FixedText() {}
82 
86  virtual const char *getText(int fixedTextId) = 0;
87 
91  virtual const Common::String getActionMessage(FixedTextActionId actionId, int messageIndex) = 0;
92 
96  const char *getJournalText(int fixedJournalTextId);
97 
101  const char *getObjectPickedUpText();
102 
103 private:
104  const char *const *_fixedJournalTextArray;
105  const char *_fixedObjectPickedUpText;
106 };
107 
108 } // End of namespace Sherlock
109 
110 #endif
Definition: fixed_text.h:74
virtual const char * getText(int fixedTextId)=0
Definition: str.h:59
Definition: animation.h:29
const char * getJournalText(int fixedJournalTextId)
const char * getObjectPickedUpText()
Definition: sherlock.h:76
virtual const Common::String getActionMessage(FixedTextActionId actionId, int messageIndex)=0