]> git.tdb.fi Git - r2c2.git/commitdiff
Give filename to GLtk::Resources constructor
authorMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 14:25:20 +0000 (16:25 +0200)
committerMikko Rasa <tdb@tdb.fi>
Thu, 17 Jan 2013 14:25:20 +0000 (16:25 +0200)
This is required to load external files correctly.

source/engineer/engineer.cpp

index 365fee0d6333d02c65875c518fcb7fe1042bf9a5..c396b5ea2491c04c7d1f4489823ce6ef5747fd95 100644 (file)
@@ -37,6 +37,7 @@ Engineer::Engineer(int argc, char **argv):
        window(options.screen_w, options.screen_h, options.fullscreen),
        keyboard(window),
        mouse(window),
+       ui_res("r2c2.res"),
        layout(catalogue, (options.driver.empty() ? 0 : Driver::create(options.driver))),
        layout_3d(layout),
        server(0),
@@ -51,7 +52,6 @@ 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, "r2c2.res");
        root = new GLtk::Root(ui_res, window);
        mouse.signal_button_press.connect(sigc::mem_fun(this, &Engineer::button_press));
        mouse.signal_axis_motion.connect(sigc::mem_fun(this, &Engineer::axis_motion));