xoreos  0.0.5
console.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 ENGINES_WITCHER_CONSOLE_H
26 #define ENGINES_WITCHER_CONSOLE_H
27 
28 #include <vector>
29 
30 #include "src/common/types.h"
31 #include "src/common/ustring.h"
32 
34 
35 namespace Engines {
36 
37 namespace Witcher {
38 
39 class WitcherEngine;
40 
41 class Console : public ::Engines::Console {
42 public:
43  Console(WitcherEngine &engine);
44  ~Console();
45 
46 
47 private:
49 
50  // Caches
51  std::vector<Common::UString> _music;
52  std::vector<Common::UString> _campaigns;
53  std::vector<Common::UString> _modules;
54  std::vector<Common::UString> _areas;
55 
56  size_t _maxSizeMusic;
57 
58 
59  // Updating the caches
60  void updateCaches();
61  void updateMusic();
62  void updateCampaigns();
63  void updateModules();
64  void updateAreas();
65 
66  // The commands
67  void cmdListMusic (const CommandLine &cl);
68  void cmdStopMusic (const CommandLine &cl);
69  void cmdPlayMusic (const CommandLine &cl);
70  void cmdMove (const CommandLine &cl);
71  void cmdListAreas (const CommandLine &cl);
72  void cmdGotoArea (const CommandLine &cl);
73  void cmdListCampaigns(const CommandLine &cl);
74  void cmdLoadCampaign (const CommandLine &cl);
75  void cmdListModules (const CommandLine &cl);
76  void cmdLoadModule (const CommandLine &cl);
77 };
78 
79 } // End of namespace Witcher
80 
81 } // End of namespace Engines
82 
83 #endif // ENGINES_WITCHER_CONSOLE_H
void cmdStopMusic(const CommandLine &cl)
Definition: console.cpp:142
void cmdListMusic(const CommandLine &cl)
Definition: console.cpp:137
void cmdLoadModule(const CommandLine &cl)
Definition: console.cpp:230
void cmdPlayMusic(const CommandLine &cl)
Definition: console.cpp:146
std::vector< Common::UString > _music
All known music resources.
Definition: console.h:51
void cmdListAreas(const CommandLine &cl)
Definition: console.cpp:167
void cmdMove(const CommandLine &cl)
Definition: console.cpp:150
void cmdListModules(const CommandLine &cl)
Definition: console.cpp:217
Generic Aurora engines (debug) console.
Low-level type definitions to handle fixed width types portably.
std::vector< Common::UString > _campaigns
All known campaigns.
Definition: console.h:52
void cmdLoadCampaign(const CommandLine &cl)
Definition: console.cpp:199
void cmdGotoArea(const CommandLine &cl)
Definition: console.cpp:175
Unicode string handling.
Console(WitcherEngine &engine)
Definition: console.cpp:52
WitcherEngine * _engine
Definition: console.h:48
std::vector< Common::UString > _areas
All known areas in the current module.
Definition: console.h:54
std::vector< Common::UString > _modules
All known modules.
Definition: console.h:53
void cmdListCampaigns(const CommandLine &cl)
Definition: console.cpp:192