58 _engine(&engine), _console(&console), _version(&version) {
119 music =
ConfigMan.getBool(
"NWN_hasXP2") ?
"mus_x2theme" :
"mus_theme_main";
214 if (moduleDir.
empty())
243 std::vector<Common::UString> modules;
246 return !modules.empty();
250 static const char *
const kPremiumModules[] = {
251 "Neverwinter Nights - Infinite Dungeons.nwm",
252 "Neverwinter Nights - Kingmaker.nwm",
253 "Neverwinter Nights - Pirates of the Sword Coast.nwm",
254 "Neverwinter Nights - ShadowGuard.nwm",
255 "Neverwinter Nights - Witch's Wake.nwm",
256 "Neverwinter Nights - Wyvern Crown of Cormyr.nwm" 259 for (
size_t i = 0; i <
ARRAYSIZE(kPremiumModules); i++)
270 if (
ResMan.hasArchive(module +
".nwm")) {
275 if (
ResMan.hasArchive(module +
".mod")) {
#define ResMan
Shortcut for accessing the sound manager.
Engine class handling Neverwinter Nights.
Common::ScopedPtr< Functions > _functions
A class holding an UTF-8 string.
static UString getExtension(const UString &p)
Return a file name's extension.
The global config manager.
static void getCharacters(std::vector< Common::UString > &characters, bool local)
Return a list of local player characters.
static void getModules(std::vector< Common::UString > &modules)
Return a list of all modules.
Game(NWNEngine &engine, ::Engines::Console &console, const Version &version)
bool equalsIgnoreCase(const UString &str) const
std::list< UString >::const_iterator const_iterator
#define ARRAYSIZE(x)
Macro which determines the number of entries in a fixed size array.
Neverwinter Nights installation version detection.
An area in Neverwinter Nights, holding all objects and room tiles within, as well as general area pro...
void playMusic(const Common::UString &music="")
Overwrite all currently playing music.
uint32 run(uint32 startCode=kStartCodeNone)
Run the GUI.
void playAmbientMusic(Common::UString music="")
Play the specified music (or the area's default) as ambient music.
static bool hasModule(Common::UString &module)
Does this module exist?
The context needed to run a Neverwinter Nights module.
static void getPremiumModules(std::vector< Common::UString > &modules)
Return a list of all premium modules.
void disableCommand(const Common::UString &cmd, const Common::UString &reason="")
The context holding a Neverwinter Nights area.
Neverwinter Nights (debug) console.
void playMenuMusic(Common::UString music="")
#define ConfigMan
Shortcut for accessing the config manager.
Sound::ChannelHandle _menuMusic
The global events manager.
The global sound manager, handling all sound output.
bool empty() const
Is the string empty?
void mainMenu(bool playStartSound, bool showLegal)
#define SoundMan
Shortcut for accessing the sound manager.
const Version & getVersion() const
static bool hasPremiumModules()
Do we actually have any premium modules installed at all?
#define EventMan
Shortcut for accessing the events manager.
Sound::ChannelHandle playSound(const Common::UString &sound, Sound::SoundType soundType, bool loop, float volume, bool pitchVariance)
Play this sound resource.
void enableCommand(const Common::UString &cmd)
static UString getStem(const UString &p)
Return a file name's stem.
const_iterator begin() const
Return a const_iterator pointing to the beginning of the list.
bool addDirectory(const UString &directory, int recurseDepth=0)
Add a directory to the list.
Generic Aurora engines utility functions.
void stopAmbientMusic()
Stop the ambient music.
Common::ScopedPtr< Module > _module
The context handling the gameplay in Neverwinter Nights.
::Engines::Console * _console
static bool isPremiumModule(const Common::UString &module)
Is this module file (including extension) a premium module?
void stopMusic()
Force all currently playing music stopped.
static UString getFile(const UString &p)
Return a file name without its path.
Neverwinter Nights engine functions.
Module & getModule()
Return the module context.
virtual void hide()
Hide the GUI.
The global resource manager for Aurora resources.
Utility class for manipulating file paths.
const_iterator end() const
Return a const_iterator pointing past the end of the list.