xoreos  0.0.5
ltrfile.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos 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 xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 #ifndef AURORA_LTRFILE_H
26 #define AURORA_LTRFILE_H
27 
28 #include <vector>
29 
30 #include "src/common/ustring.h"
31 #include "src/common/scopedptr.h"
32 #include "src/common/readstream.h"
33 
34 #include "src/aurora/aurorafile.h"
35 
36 namespace Aurora {
37 
44 class LTRFile : public AuroraFile {
45 public:
46  LTRFile(const Common::UString &ltr);
48 
50  size_t getLetterCount() const;
51 
53  Common::UString generateRandomName(size_t maxLetters) const;
54 
55 private:
56  void load(Common::SeekableReadStream &stream);
57 
58  struct LetterSet {
62  };
63 
66 
70 };
71 
72 } // End of namespace Aurora
73 
74 #endif // AURORA_LTRFILE_H
A class holding an UTF-8 string.
Definition: ustring.h:48
Common::ScopedArray< float > mid
Definition: ltrfile.h:60
Common::ScopedArray< float > end
Definition: ltrfile.h:61
uint8_t uint8
Definition: types.h:200
A simple scoped smart pointer template.
Common::ScopedArray< Common::ScopedArray< LetterSet > > _tripleLetters
Definition: ltrfile.h:69
LTR File, which is used when generating player names.
Definition: ltrfile.h:44
Common::UString generateRandomName(size_t maxLetters) const
Generate a random name from the ltr file.
Definition: ltrfile.cpp:52
Base for BioWare&#39;s Aurora engine files.
LetterSet _singleLetters
Definition: ltrfile.h:67
LTRFile(const Common::UString &ltr)
Definition: ltrfile.cpp:39
Basic reading stream interfaces.
Unicode string handling.
Common::ScopedArray< float > start
Definition: ltrfile.h:59
Common::ScopedArray< char > _alphabet
Definition: ltrfile.h:64
Base class for most files found in games using BioWare&#39;s Aurora engine.
Definition: aurorafile.h:52
size_t getLetterCount() const
Get the letter count utilized by the ltr file.
Definition: ltrfile.cpp:48
void load(Common::SeekableReadStream &stream)
Definition: ltrfile.cpp:121
Interface for a seekable & readable data stream.
Definition: readstream.h:265
Common::ScopedArray< LetterSet > _doubleLetters
Definition: ltrfile.h:68
uint8 _letterCount
Definition: ltrfile.h:65