From: Mikko Rasa Date: Sat, 6 Jul 2013 18:49:21 +0000 (+0300) Subject: Remove deprecated datafile statement aliases X-Git-Url: http://git.tdb.fi/?a=commitdiff_plain;h=e72050508512570d3cb1bcce768b155a71fe05e5;p=r2c2.git Remove deprecated datafile statement aliases --- diff --git a/locos.dat b/locos.dat index 55813b5..cb097cd 100644 --- a/locos.dat +++ b/locos.dat @@ -1,7 +1,7 @@ scale 1 87; gauge 16.5; -vehicle 39230 +vehicle \39230 { name "BR 23"; locomotive true; @@ -238,7 +238,7 @@ vehicle \29530-01 }; }; -vehicle 36850 +vehicle \36850 { name "BR 185"; locomotive true; @@ -298,7 +298,7 @@ vehicle \37225-02 }; }; -vehicle 39410 +vehicle \39410 { name "BR E 41"; locomotive true; diff --git a/source/libr2c2/catalogue.cpp b/source/libr2c2/catalogue.cpp index 0d62d72..ec3e95a 100644 --- a/source/libr2c2/catalogue.cpp +++ b/source/libr2c2/catalogue.cpp @@ -75,11 +75,9 @@ Catalogue::Loader::Loader(Catalogue &c): add("rail_profile", &Loader::rail_profile); add("scale", &Loader::scale); add("signal", &Loader::signal); - add("track", static_cast(&Loader::track)); - add("track", static_cast(&Loader::track)); + add("track", &Loader::track); add("track_technique", &Catalogue::track_technique); - add("vehicle", static_cast(&Loader::vehicle)); - add("vehicle", static_cast(&Loader::vehicle)); + add("vehicle", &Loader::vehicle); } void Catalogue::Loader::ballast_profile() @@ -120,11 +118,6 @@ void Catalogue::Loader::signal(ArticleNumber art_nr) obj.add_signal(*sig.release()); } -void Catalogue::Loader::track(unsigned art_nr) -{ - track(ArticleNumber(art_nr)); -} - void Catalogue::Loader::track(ArticleNumber art_nr) { if(obj.tracks.count(art_nr)) @@ -135,11 +128,6 @@ void Catalogue::Loader::track(ArticleNumber art_nr) obj.add_track(*trk.release()); } -void Catalogue::Loader::vehicle(unsigned art_nr) -{ - vehicle(ArticleNumber(art_nr)); -} - void Catalogue::Loader::vehicle(ArticleNumber art_nr) { if(obj.vehicles.count(art_nr)) diff --git a/source/libr2c2/catalogue.h b/source/libr2c2/catalogue.h index d1829af..12ee006 100644 --- a/source/libr2c2/catalogue.h +++ b/source/libr2c2/catalogue.h @@ -27,9 +27,7 @@ public: void rail_profile(); void scale(float, float); void signal(ArticleNumber); - void track(unsigned); void track(ArticleNumber); - void vehicle(unsigned); void vehicle(ArticleNumber); }; diff --git a/source/libr2c2/layout.cpp b/source/libr2c2/layout.cpp index 46a43a8..4086323 100644 --- a/source/libr2c2/layout.cpp +++ b/source/libr2c2/layout.cpp @@ -503,17 +503,12 @@ Layout::Loader::Loader(Layout &l): new_tracks(false) { add("base", &Layout::base); - add("route", static_cast(&Loader::route)); + add("route", &Loader::route); add("signal", &Loader::signal); - add("track", static_cast(&Loader::track)); - add("train", static_cast(&Loader::train)); + add("track", &Loader::track); + add("train", &Loader::train); add("turnout", &Loader::turnout); add("zone", &Loader::zone); - - // Deprecated aliases - add("route", static_cast(&Loader::route)); - add("track", static_cast(&Loader::track)); - add("train", static_cast(&Loader::train)); } void Layout::Loader::route() @@ -522,24 +517,12 @@ void Layout::Loader::route() load_sub(*rte); } -void Layout::Loader::route(const string &n) -{ - Route *rte = new Route(obj); - rte->set_name(n); - load_sub(*rte); -} - void Layout::Loader::signal(ArticleNumber art_nr) { Signal *sig = new Signal(obj, obj.catalogue.get_signal(art_nr)); load_sub(*sig); } -void Layout::Loader::track(unsigned art_nr) -{ - track(ArticleNumber(art_nr)); -} - void Layout::Loader::track(ArticleNumber art_nr) { Track *trk = new Track(obj, obj.catalogue.get_track(art_nr)); @@ -551,11 +534,6 @@ void Layout::Loader::track(ArticleNumber art_nr) trk->link_to(**i); } -void Layout::Loader::train(unsigned art_nr, unsigned addr, const std::string &proto) -{ - train(ArticleNumber(art_nr), addr, proto); -} - void Layout::Loader::train(ArticleNumber art_nr, unsigned addr, const std::string &proto) { Train *trn = new Train(obj, obj.catalogue.get_vehicle(art_nr), addr, proto); diff --git a/source/libr2c2/layout.h b/source/libr2c2/layout.h index 7c61c4f..6725a23 100644 --- a/source/libr2c2/layout.h +++ b/source/libr2c2/layout.h @@ -36,11 +36,8 @@ public: Loader(Layout &); private: void route(); - void route(const std::string &); void signal(ArticleNumber); - void track(unsigned); void track(ArticleNumber); - void train(unsigned, unsigned, const std::string &); void train(ArticleNumber, unsigned, const std::string &); void turnout(unsigned, unsigned); void zone(); diff --git a/tracks.dat b/tracks.dat index 33f53ab..d7fa39c 100644 --- a/tracks.dat +++ b/tracks.dat @@ -29,7 +29,7 @@ track_technique "track.technique"; // Straight -track 24064 +track \24064 { description "Straight, 64.3mm (R3-R4-R5)"; part @@ -38,7 +38,7 @@ track 24064 }; }; -track 24071 +track \24071 { description "Straight, 70.8mm (for slim turnouts)"; part @@ -48,7 +48,7 @@ track 24071 autofit_preference 0; }; -track 24077 +track \24077 { description "Straight, 77.5mm (R1-R2-R3)"; part @@ -58,7 +58,7 @@ track 24077 autofit_preference 2; }; -track 24094 +track \24094 { description "Straight, 94.2mm"; part @@ -68,7 +68,7 @@ track 24094 autofit_preference 2; }; -track 24172 +track \24172 { description "Straight, 171.7mm"; part @@ -78,7 +78,7 @@ track 24172 autofit_preference 2; }; -track 24188 +track \24188 { description "Straight, 188.3mm (turnout length)"; part @@ -88,7 +88,7 @@ track 24188 autofit_preference 2; }; -track 24229 +track \24229 { description "Straight, 229.3mm"; part @@ -97,7 +97,7 @@ track 24229 }; }; -track 24236 +track \24236 { description "Straight, 236.1mm (slim turnout length)"; part @@ -106,7 +106,7 @@ track 24236 }; }; -track 24360 +track \24360 { description "Straight, 360mm"; part @@ -117,7 +117,7 @@ track 24360 // Curves, R1 -track 24107 +track \24107 { description "Curve, R1 = 360mm, 7.5°"; part @@ -127,7 +127,7 @@ track 24107 }; }; -track 24115 +track \24115 { description "Curve, R1 = 360mm, 15°"; part @@ -137,7 +137,7 @@ track 24115 }; }; -track 24130 +track \24130 { description "Curve, R1 = 360mm, 30°"; part @@ -149,7 +149,7 @@ track 24130 // Curves, R2 -track 24206 +track \24206 { description "Curve, R2 = 437.5mm, 5.7° (turnout to 30°)"; part @@ -159,7 +159,7 @@ track 24206 }; }; -track 24207 +track \24207 { description "Curve, R2 = 437.5mm, 7.5°"; part @@ -169,7 +169,7 @@ track 24207 }; }; -track 24215 +track \24215 { description "Curve, R2 = 437.5mm, 15°"; part @@ -179,7 +179,7 @@ track 24215 }; }; -track 24224 +track \24224 { description "Curve, R2 = 437.5mm, 24.3° (turnout)"; part @@ -189,7 +189,7 @@ track 24224 }; }; -track 24230 +track \24230 { description "Curve, R2 = 437.5mm, 30°"; part @@ -201,7 +201,7 @@ track 24230 // Curves, R3 -track 24330 +track \24330 { description "Curve, R3 = 515mm, 30°"; part @@ -213,7 +213,7 @@ track 24330 // Curves, R4 -track 24430 +track \24430 { description "Curve, R4 = 579.3mm, 30°"; part @@ -225,7 +225,7 @@ track 24430 // Curves, R5 -track 24530 +track \24530 { description "Curve, R5 = 643.6mm, 30°"; part @@ -237,7 +237,7 @@ track 24530 // Curves, slim turnout -track 24912 +track \24912 { description "Curve, R = 1114.6mm, 12.1° (slim turnout)"; part @@ -249,7 +249,7 @@ track 24912 // Curved turnouts, R1 -track 24671 +track \24671 { description "Curved turnout, left"; part @@ -272,7 +272,7 @@ track 24671 }; }; -track 24672 +track \24672 { description "Curved turnout, right"; part @@ -297,7 +297,7 @@ track 24672 // Turnouts, R2 -track 24611 +track \24611 { description "Turnout, left"; part @@ -313,7 +313,7 @@ track 24611 }; }; -track 24612 +track \24612 { description "Turnout, right"; part @@ -329,7 +329,7 @@ track 24612 }; }; -track 24630 +track \24630 { description "Turnout, 3-way"; part @@ -351,7 +351,7 @@ track 24630 }; }; -track 24624 +track \24624 { description "Turnout, double slip"; state_bits 1; @@ -383,7 +383,7 @@ track 24624 // Slim turnouts -track 24711 +track \24711 { description "Slim turnout, left"; part @@ -399,7 +399,7 @@ track 24711 }; }; -track 24712 +track \24712 { description "Slim turnout, right"; part @@ -417,7 +417,7 @@ track 24712 // Crossings -track 24640 +track \24640 { description "Crossing, 24.3°"; part @@ -431,7 +431,7 @@ track 24640 }; }; -track 24649 +track \24649 { description "Crossing, 48.6°"; part @@ -445,7 +445,7 @@ track 24649 }; }; -track 24740 +track \24740 { description "Slim crossing, 12.1°"; part @@ -461,7 +461,7 @@ track 24740 // Specials -track 24977 +track \24977 { description "Bumper"; object "bumper.object"; @@ -493,167 +493,167 @@ signal \7039 layout { - track 24115 + track \24115 { position 0.0806517 0.139002 0; rotation 2.22529; }; - track 24612 + track \24612 { position -0.310086 -0.38055 0; rotation 1.5708; }; - track 24172 + track \24172 { position -0.232565 -0.0797749 0; rotation 1.5708; }; - track 24611 + track \24611 { position -0.387608 -0.380475 0; rotation 1.5708; }; - track 24130 + track \24130 { position 0.155044 -0.08015 0; rotation 1.5708; }; - track 24230 + track \24230 { position 0.232566 -0.0802249 0; rotation 1.5708; }; - track 24107 + track \24107 { position -0.0249545 0.231617 0; rotation 2.61799; }; - track 24224 + track \24224 { position -0.465131 -0.38055 0; rotation 1.5708; }; - track 24330 + track \24330 { position 0.310088 -0.0803 0; rotation 1.5708; }; - track 24215 + track \24215 { position 0.142158 0.186105 0; rotation 2.2253; }; - track 24207 + track \24207 { position 0.0138165 0.298658 0; rotation 2.61799; }; - track 24711 + track \24711 { position 0.374455 -0.381008 0; rotation 1.5708; }; - track 24530 + track \24530 { position 0.438821 -0.0809179 0; rotation 1.5708; }; - track 24430 + track \24430 { position 0.374455 -0.080609 0; rotation 1.5708; }; - track 24630 + track \24630 { position -0.19005 -0.380551 0; rotation 1.5708; }; - track 24712 + track \24712 { position 0.438821 -0.381316 0; rotation 1.5708; }; - track 24624 + track \24624 { position -0.0775215 -0.380625 0; rotation 1.5708; }; - track 24640 + track \24640 { position -0.232565 0.185972 0; rotation 1.5708; }; - track 24671 + track \24671 { position 0.0775225 -0.380624 0; rotation 1.5708; }; - track 24977 + track \24977 { position -0.465131 0.186196 0; rotation 1.5708; }; - track 24672 + track \24672 { position 0.155044 -0.380699 0; rotation 1.5708; }; - track 24649 + track \24649 { position -0.348827 0.194312 0; rotation 1.99491; }; - track 24064 + track \24064 { position 0.0775223 -0.080075 0; rotation 1.5708; }; - track 24077 + track \24077 { position -0.0775215 -0.079925 0; rotation 1.5708; }; - track 24229 + track \24229 { position -0.387609 -0.079626 0; rotation 1.5708; }; - track 24071 + track \24071 { position 2.56295e-07 -0.0799999 0; rotation 1.5708; }; - track 24094 + track \24094 { position -0.155042 -0.07985 0; rotation 1.5708; }; - track 24188 + track \24188 { position -0.310087 -0.0797 0; rotation 1.5708; }; - track 24236 + track \24236 { position -0.465131 -0.0795509 0; rotation 1.5708; }; - track 24912 + track \24912 { position 0.310088 -0.380699 0; rotation 1.5708; }; - track 24206 + track \24206 { position -0.446223 -0.161726 0; rotation 2.0944; }; - track 24740 + track \24740 { position -0.112537 0.138174 0; rotation 1.5708; }; - track 24360 + track \24360 { position -0.542646 -0.0794758 0; rotation 1.5708; diff --git a/wagons.dat b/wagons.dat index f6200b4..fab49a4 100644 --- a/wagons.dat +++ b/wagons.dat @@ -1,7 +1,7 @@ scale 1 87; gauge 16.5; -vehicle 46274 +vehicle \46274 { name "Saar Railroad Gmhs 54"; @@ -41,7 +41,7 @@ vehicle \29820-02b }; }; -vehicle 4442 +vehicle \4442 { name "Z"; @@ -79,7 +79,7 @@ vehicle \29859b }; }; -vehicle 100004 +vehicle \100004 { name "Omm 52"; @@ -93,7 +93,7 @@ vehicle 100004 axle { position -31; wheel_diameter 10; }; }; -vehicle 47001 +vehicle \47001 { name "Rs 684"; @@ -119,7 +119,7 @@ vehicle 47001 }; }; -vehicle 48943 +vehicle \48943 { name "BTr 10"; @@ -133,7 +133,7 @@ vehicle 48943 axle { position -23; wheel_diameter 10; }; }; -vehicle 43222 +vehicle \43222 { name "B4üw 38 \"Schürzenwagen\""; @@ -181,7 +181,7 @@ vehicle \39230b }; }; -vehicle 43800 +vehicle \43800 { name "B4nzb 64 \"Silberling\""; @@ -208,7 +208,7 @@ vehicle 43800 }; }; -vehicle 47072 +vehicle \47072 { name "Sgns 691"; @@ -234,7 +234,7 @@ vehicle 47072 }; }; -vehicle 4624 +vehicle \4624 { name "Fals-u 176"; @@ -260,7 +260,7 @@ vehicle 4624 }; }; -vehicle 4423 +vehicle \4423 { name "Kklm 505"; @@ -274,7 +274,7 @@ vehicle 4423 axle { position -31; wheel_diameter 10; }; }; -vehicle 4410 +vehicle \4410 { name "Gs 210"; @@ -288,7 +288,7 @@ vehicle 4410 axle { position -31; wheel_diameter 10; }; }; -vehicle 46977 +vehicle \46977 { name "Rlmmso 56"; @@ -302,7 +302,7 @@ vehicle 46977 axle { position -46; wheel_diameter 10; }; }; -vehicle 4699 +vehicle \4699 { name "Pwg 14"; @@ -316,7 +316,7 @@ vehicle 4699 axle { position -25; wheel_diameter 10; }; }; -vehicle 46717 +vehicle \46717 { name "Railway crane"; @@ -331,7 +331,7 @@ vehicle 46717 axle { position -21.5; wheel_diameter 10; }; }; -vehicle 4690 +vehicle \4690 { name "Eaos 106";