Revision ade1b7f9 scout/scoutsim/src/sim_frame.cpp

View differences:

scout/scoutsim/src/sim_frame.cpp
92 92
        /// @todo This should change.
93 93
        meter = scout_images[0].GetHeight();
94 94

  
95
        base_map_name = map_name;
96
        display_map_name = ros::package::getPath("scoutsim") + "/maps/" + map_name + ".bmp";
95
        map_base_name =  ros::package::getPath("scoutsim") + "/maps/" +
96
                           map_name + ".bmp";
97
        map_lines_name = ros::package::getPath("scoutsim") + "/maps/" +
98
                           map_name + "_lines.bmp";
99
        display_map_name = map_base_name;
100

  
101
        wxBitmap lines_bitmap;
102
        lines_bitmap.LoadFile(wxString::FromAscii(map_lines_name.c_str()));
103
        lines_image = lines_bitmap.ConvertToImage();
104

  
97 105
        clear();
98 106

  
99 107
        clear_srv = nh.advertiseService("clear",
......
227 235

  
228 236
    void SimFrame::showMap(wxCommandEvent& WXUNUSED(event))
229 237
    {
230
        display_map_name = ros::package::getPath("scoutsim") + "/maps/" +
231
                           base_map_name + ".bmp";
238
        display_map_name = map_base_name;
232 239
        clear();
233 240
    }
234 241

  
235 242
    void SimFrame::showLines(wxCommandEvent& WXUNUSED(event))
236 243
    {
237
        display_map_name = ros::package::getPath("scoutsim") + "/maps/" +
238
                           base_map_name + "_lines.bmp";
244
        display_map_name = map_lines_name;
239 245
        clear();
240 246
    }
241 247

  
......
298 304

  
299 305
        for (; it != end; ++it)
300 306
        {
301
            it->second->update(0.016, path_dc, path_image,
307
            it->second->update(0.016, path_dc, path_image, lines_image,
302 308
                               path_dc.GetBackground().GetColour(),
303 309
                               state);
304 310
        }

Also available in: Unified diff