27 #include <boost/bind.hpp> 47 10314 , 5557 , 5558 , 5559, 5560,
48 40041 , 40042 , 40043 ,
49 100777, 100778, 100779
53 "Prelude" ,
"Chapter1" ,
"Chapter2" ,
"Chapter3",
"Chapter4",
54 "XP1-Chapter 1",
"XP1-Interlude",
"XP1-Chapter 2",
55 "XP2_Chapter1" ,
"XP2_Chapter2" ,
"XP2_Chapter3" 64 _engine(&engine), _maxSizeMusic(0) {
67 "Usage: exitmodule\nExit the module, returning to the main menu");
69 "Usage: listcampaigns\nList all original campaign modules");
71 "Usage: loadcampaign\nLoad a original campaign modules, " 72 "replacing the currently running module");
74 "Usage: listmodules\nList all modules");
76 "Usage: loadmodule <module>\nLoads a module, " 77 "replacing the currently running one");
79 "Usage: listareas\nList all areas in the current module");
81 "Usage: gotoarea <area>\nMove to a specific area");
83 "Usage: listmusic\nList all available music resources");
85 "Usage: stopmusic\nStop the currently playing music resource");
87 "Usage: playmusic [<music>]\nPlay the specified music resource. " 88 "If none was specified, play the default area music.");
110 for (
int i = 0; i < 5; i++) {
121 for (
int i = 5; i < 8; i++) {
133 for (
int i = 8; i < 11; i++) {
160 std::list<Aurora::ResourceManager::ResourceID> music;
163 for (std::list<Aurora::ResourceManager::ResourceID>::const_iterator m = music.begin();
164 m != music.end(); ++m) {
166 _music.push_back(m->name);
216 for (std::vector<Common::UString>::iterator m =
_modules.begin(); m !=
_modules.end(); ++m) {
217 if (m->equalsIgnoreCase(cl.
args)) {
232 for (std::vector<Common::UString>::const_iterator a = areas.begin(); a != areas.end(); ++a)
244 const std::vector<Common::UString> &areas = module.
getIFO().
getAreas();
245 for (std::vector<Common::UString>::const_iterator a = areas.begin(); a != areas.end(); ++a)
246 if (a->equalsIgnoreCase(cl.
args)) {
#define ResMan
Shortcut for accessing the sound manager.
std::vector< Common::UString > _campaigns
All known campaigns modules.
void cmdListMusic(const CommandLine &cl)
#define TalkMan
Shortcut for accessing the talk manager.
Engine class handling Neverwinter Nights.
A class holding an UTF-8 string.
void cmdLoadModule(const CommandLine &cl)
The global config manager.
static void getModules(std::vector< Common::UString > &modules)
Return a list of all modules.
void cmdPlayMusic(const CommandLine &cl)
void truncate(const iterator &it)
Game & getGame()
Return the context running the actual game.
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
void movePC(const Common::UString &area)
Move the player character to this area.
void exit()
Exit the currently running module.
void cmdListCampaigns(const CommandLine &cl)
void playMusic(const Common::UString &music="")
Overwrite all currently playing music.
iterator findFirst(uint32 c) const
static const char *const kCampaignModules[]
The context needed to run a Neverwinter Nights module.
void load(const Common::UString &module)
Load a module.
The context holding a Neverwinter Nights area.
const char * c_str() const
Return the (utf8 encoded) string data.
Neverwinter Nights (debug) console.
void cmdListAreas(const CommandLine &cl)
#define ConfigMan
Shortcut for accessing the config manager.
Basic Aurora graphics types.
Utility templates and functions.
void cmdExitModule(const CommandLine &cl)
const Aurora::IFOFile & getIFO() const
Return the IFO of the currently loaded module.
std::vector< Common::UString > _music
All known music resources.
const char * kSystemFontMono
Identifier used for the monospaced system font.
void cmdLoadCampaign(const CommandLine &cl)
const std::vector< Common::UString > & getAreas() const
Return the list of areas in the module.
void printList(const std::vector< Common::UString > &list, size_t maxSize=0)
bool empty() const
Is the string empty?
void cmdStopMusic(const CommandLine &cl)
CampaignMap _campaignModules
Mapping campaign module file -> campaign module name.
static const uint32 kCampaignNames[]
The global talk manager for Aurora strings.
void cmdListModules(const CommandLine &cl)
void printf(const char *s,...) GCC_PRINTF(2
void print(const Common::UString &line)
Generic Aurora engines utility functions.
virtual void updateCaches()
void printCommandHelp(const Common::UString &cmd)
The context handling the gameplay in Neverwinter Nights.
Console(NWNEngine &engine)
void setArguments(const Common::UString &cmd, const std::vector< Common::UString > &args)
void stopMusic()
Force all currently playing music stopped.
void cmdGotoArea(const CommandLine &cl)
Module & getModule()
Return the module context.
bool registerCommand(const Common::UString &cmd, const CommandCallback &callback, const Common::UString &help)
std::vector< Common::UString > _modules
All known modules.
The global resource manager for Aurora resources.
const Common::UString & getName()
Return the area's localized name.
Audio, MP3 with extra header.