X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fengineer%2Fengineer.cpp;h=90cb8eb7007fbb9ab08e62924888e42f546d6680;hb=cb222b6df855da4196a331c5b9859750c4321fa0;hp=7e13f7b50471ad61261f43a8cfa7608ede759a9d;hpb=62ce775d9af8f3321dbdebd6243b551fbbb0b976;p=r2c2.git diff --git a/source/engineer/engineer.cpp b/source/engineer/engineer.cpp index 7e13f7b..90cb8eb 100644 --- a/source/engineer/engineer.cpp +++ b/source/engineer/engineer.cpp @@ -1,6 +1,6 @@ /* $Id$ -This file is part of the MSP Märklin suite +This file is part of R²C² Copyright © 2006-2010 Mikkosoft Productions, Mikko Rasa Distributed under the GPL */ @@ -12,6 +12,7 @@ Distributed under the GPL #include #include #include +#include #include #include #include @@ -25,8 +26,8 @@ Distributed under the GPL #include #include #include -#include "libmarklin/driver.h" -#include "libmarklin/tracktype.h" +#include "libr2c2/driver.h" +#include "libr2c2/tracktype.h" #include "3d/path.h" #include "3d/track.h" #include "3d/vehicle.h" @@ -37,7 +38,7 @@ Distributed under the GPL #include "trainview.h" using namespace std; -using namespace Marklin; +using namespace R2C2; using namespace Msp; Application::RegApp Engineer::reg; @@ -61,7 +62,7 @@ Engineer::Engineer(int argc, char **argv): window.set_title("Railroad Engineer"); window.signal_close.connect(sigc::bind(sigc::mem_fun(this, &Engineer::exit), 0)); - DataFile::load(ui_res, "marklin.res"); + DataFile::load(ui_res, "r2c2.res"); root = new GLtk::Root(ui_res, window); root->signal_button_press.connect(sigc::mem_fun(this, &Engineer::button_press)); root->signal_pointer_motion.connect(sigc::mem_fun(this, &Engineer::pointer_motion)); @@ -131,7 +132,10 @@ Engineer::~Engineer() layout.get_driver().flush(); if(!options.simulate) - layout.save_trains(options.state_fn); + { + layout.save_dynamic(options.state_fn+".tmp"); + FS::rename(options.state_fn+".tmp", options.state_fn); + } delete overlay; delete root;