ScummVM API documentation
string_manager.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 ZVISION_STRING_MANAGER_H
23 #define ZVISION_STRING_MANAGER_H
24 
25 #include "zvision/text/truetype_font.h"
26 
27 namespace Graphics {
28 class FontManager;
29 }
30 
31 namespace ZVision {
32 
33 class ZVision;
34 
36 public:
37  StringManager(ZVision *engine);
38  ~StringManager();
39 
40 public:
41  enum {
42  ZVISION_STR_SAVEEXIST = 23,
43  ZVISION_STR_SAVED = 4,
44  ZVISION_STR_SAVEEMPTY = 21,
45  ZVISION_STR_EXITPROMT = 6
46  };
47 
48 private:
49  enum {
50  NUM_TEXT_LINES = 56 // Max number of lines in a .str file. We hardcode this number because we know ZNem uses 42 strings and ZGI uses 56
51  };
52 
53 private:
54  ZVision *_engine;
55  Common::String _lines[NUM_TEXT_LINES];
56 
57 public:
58  void initialize(ZVisionGameId gameId);
59  const Common::String getTextLine(uint stringNumber);
60 
61 private:
62  void loadStrFile(const Common::Path &fileName);
63 };
64 
65 } // End of namespace ZVision
66 
67 #endif
Definition: str.h:59
Definition: path.h:52
Definition: clock.h:29
Definition: string_manager.h:35
Definition: formatinfo.h:28