#include <msp/gltk/label.h>
#include <msp/strings/formatter.h>
#include <msp/strings/lexicalcast.h>
#include <msp/gltk/label.h>
#include <msp/strings/formatter.h>
#include <msp/strings/lexicalcast.h>
for(map<unsigned, LocoType *>::const_iterator i=locos.begin(); i!=locos.end(); ++i, ++n)
{
drp_type->append(format("%d %s", i->second->get_article_number(), i->second->get_name()));
for(map<unsigned, LocoType *>::const_iterator i=locos.begin(); i!=locos.end(); ++i, ++n)
{
drp_type->append(format("%d %s", i->second->get_article_number(), i->second->get_name()));
advance(i, drp_type->get_selected_index());
unsigned addr = lexical_cast<unsigned>(ent_addr->get_text());
advance(i, drp_type->get_selected_index());
unsigned addr = lexical_cast<unsigned>(ent_addr->get_text());
- Locomotive *loco = new Locomotive(*i->second, engineer.get_control(), addr);
- train = new Train(engineer.get_traffic_manager(), *loco);
+ train = new Train(engineer.get_layout(), *i->second, addr);