X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Flibr2c2%2Ftracktype.cpp;h=3be1ecb364e8631a84ac216960bc154a82277510;hb=8b7d4054b05002d82338775ac9b4ee764a8560e4;hp=23c636c6d1cd1689d4a809c7fb23f3929f27c6b7;hpb=e75f12451201fb6540ad2155e8796c2b5aee8d4c;p=r2c2.git diff --git a/source/libr2c2/tracktype.cpp b/source/libr2c2/tracktype.cpp index 23c636c..3be1ecb 100644 --- a/source/libr2c2/tracktype.cpp +++ b/source/libr2c2/tracktype.cpp @@ -7,7 +7,7 @@ using namespace Msp; namespace R2C2 { TrackType::TrackType(const ArticleNumber &an): - art_nr(an), + ObjectType(an), state_bits(0), autofit_preference(1) { } @@ -69,7 +69,7 @@ TrackPoint TrackType::get_point(unsigned epi, unsigned path, float d) const unsigned part_ep = 0; for(vector::const_iterator i=parts.begin(); i!=parts.end(); ++i) { - if((endpoints[epi].paths&(1<get_path()!=path) + if(endpoints[epi].has_path(path) && i->get_path()!=path) continue; unsigned n_part_eps = (i->is_dead_end() ? 1 : 2); @@ -192,11 +192,10 @@ TrackType::Endpoint::Endpoint(float x, float y, float d, unsigned p): TrackType::Loader::Loader(TrackType &t): - Msp::DataFile::ObjectLoader(t), + DataFile::DerivedObjectLoader(t), state_bits_set(false) { add("autofit_preference", &TrackType::autofit_preference); - add("description", &TrackType::description); add("object", &TrackType::object); add("state_bits", &Loader::state_bits); add("part", &Loader::part);