#include "control/codecontroller.h"
#include "control/joystickkeyboardcontroller.h"
#include "main.h"
+#include "file_system.h"
#include "gameconfig.h"
#include "gettext.h"
-// the engine will be run with a lofical framerate of 64fps.
-// We choose 64fps here because it is a power of 2, so 1/64 gives an "even"
+// the engine will be run with a logical framerate of 64fps.
+// We chose 64fps here because it is a power of 2, so 1/64 gives an "even"
// binary fraction...
static const float LOGICAL_FPS = 64.0;
current_ = this;
game_pause = false;
+ music_playing = false;
fps_fps = 0;
context = new DrawingContext();
if(mode == ST_GL_PLAY || mode == ST_GL_LOAD_LEVEL_FILE)
levelintro();
- currentsector->play_music(LEVEL_MUSIC);
+ if (!music_playing)
+ {
+ currentsector->play_music(LEVEL_MUSIC);
+ music_playing = true;
+ }
if(capture_file != "")
record_demo(capture_file);
void
GameSession::levelintro()
{
- sound_manager->halt_music();
+ //sound_manager->halt_music();
char str[60];
reset_pos = pos;
}
+std::string
+GameSession::get_working_directory()
+{
+ return FileSystem::dirname(levelfile);
+}
+
void
GameSession::display_info_box(const std::string& text)
{
std::string title;
std::stringstream stream;
stream << slot;
- slotfile = user_dir + "/save/slot" + stream.str() + ".stsg";
+ slotfile = "save/slot" + stream.str() + ".stsg";
try {
lisp::Parser parser;
std::stringstream stream;
stream << slot;
- std::string slotfile = user_dir + "/save/slot" + stream.str() + ".stsg";
+ std::string slotfile = "save/slot" + stream.str() + ".stsg";
fadeout(256);
DrawingContext context;