StratoscriptPreprocessor.cpp   StratoscriptPreprocessor.cpp 
skipping to change at line 17 skipping to change at line 17
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#ifdef ENABLE_STRATOSCRIPT_COMPAT #ifdef ENABLE_STRATOSCRIPT_COMPAT
#include "StelScriptMgr.hpp" #include "StelScriptMgr.hpp"
#include "StelFileMgr.hpp" #include "StelFileMgr.hpp"
#include <cmath> #include <cmath>
#include <QDebug> #include <QDebug>
skipping to change at line 118 skipping to change at line 118
line = "// untranslated stratoscript (date): " + line; line = "// untranslated stratoscript (date): " + line;
} }
else if (args.at(0) == "deselect") else if (args.at(0) == "deselect")
line = "core.selectObjectByName(\"\", false);"; line = "core.selectObjectByName(\"\", false);";
else if (args.at(0) == "flag") else if (args.at(0) == "flag")
{ {
if (args.at(1) == "atmosphere") if (args.at(1) == "atmosphere")
line = QString("LandscapeMgr.setFlagAtmosphe re(%1);").arg(strToBool(args.at(2))); line = QString("LandscapeMgr.setFlagAtmosphe re(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "azimuthal_grid") else if (args.at(1) == "azimuthal_grid")
line = QString("GridLinesMgr.setFlagAzimutha lGrid(%1);").arg(strToBool(args.at(2))); line = QString("GridLinesMgr.setFlagAzimutha lGrid(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "galactic_grid")
line = QString("GridLinesMgr.setFlagGalactic
Grid(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "cardinal_points") else if (args.at(1) == "cardinal_points")
line = QString("LandscapeMgr.setFlagCardinal sPoints(%1);").arg(strToBool(args.at(2))); line = QString("LandscapeMgr.setFlagCardinal sPoints(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "constellation_art") else if (args.at(1) == "constellation_art")
line = QString("ConstellationMgr.setFlagArt( %1);").arg(strToBool(args.at(2))); line = QString("ConstellationMgr.setFlagArt( %1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "constellation_boundaries") else if (args.at(1) == "constellation_boundaries")
line = QString("ConstellationMgr.setFlagBoun daries(%1);").arg(strToBool(args.at(2))); line = QString("ConstellationMgr.setFlagBoun daries(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "constellation_drawing" || ar gs.at(1) == "constellations") else if (args.at(1) == "constellation_drawing" || ar gs.at(1) == "constellations")
line = QString("ConstellationMgr.setFlagLine s(%1);").arg(strToBool(args.at(2))); line = QString("ConstellationMgr.setFlagLine s(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "constellation_names") else if (args.at(1) == "constellation_names")
line = QString("ConstellationMgr.setFlagLabe ls(%1);").arg(strToBool(args.at(2))); line = QString("ConstellationMgr.setFlagLabe ls(%1);").arg(strToBool(args.at(2)));
skipping to change at line 148 skipping to change at line 150
else if (args.at(1) == "gravity_labels") // TODO whe n in new script API else if (args.at(1) == "gravity_labels") // TODO whe n in new script API
line = "// untranslated stratoscropt (flag g ravity_labels): " + line; line = "// untranslated stratoscropt (flag g ravity_labels): " + line;
else if (args.at(1) == "moon_scaled") else if (args.at(1) == "moon_scaled")
line = QString("SolarSystem.setFlagMoonScale (%1);").arg(strToBool(args.at(2))); line = QString("SolarSystem.setFlagMoonScale (%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "landscape") else if (args.at(1) == "landscape")
line = QString("LandscapeMgr.setFlagLandscap e(%1);").arg(strToBool(args.at(2))); line = QString("LandscapeMgr.setFlagLandscap e(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "landscape_sets_location") else if (args.at(1) == "landscape_sets_location")
line = QString("LandscapeMgr.setFlagLandscap eSetsLocation(%1);").arg(strToBool(args.at(2))); line = QString("LandscapeMgr.setFlagLandscap eSetsLocation(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "meridian_line") else if (args.at(1) == "meridian_line")
line = QString("GridLinesMgr.setFlagMeridian Line(%1);").arg(strToBool(args.at(2))); line = QString("GridLinesMgr.setFlagMeridian Line(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "horizon_line")
line = QString("GridLinesMgr.setFlagHorizonL
ine(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "galactic_plane_line")
line = QString("GridLinesMgr.setFlagGalactic
PlaneLine(%1);").arg(strToBool(args.at(2)));
else if (args.at(1) == "milky_way") else if (args.at(1) == "milky_way")
line = QString("MilkyWay.setFlagShow(%1);"). arg(strToBool(args.at(2))); line = QString("MilkyWay.setFlagShow(%1);"). arg(strToBool(args.at(2)));
else if (args.at(1) == "nebulae") else if (args.at(1) == "nebulae")
line = QString("NebulaMgr.setFlagShow(%1);") .arg(strToBool(args.at(2))); line = QString("NebulaMgr.setFlagShow(%1);") .arg(strToBool(args.at(2)));
else if (args.at(1) == "nebula_names") else if (args.at(1) == "nebula_names")
line = QString("NebulaMgr.setFlagNames(%1);" ).arg(strToBool(args.at(2))); line = QString("NebulaMgr.setFlagNames(%1);" ).arg(strToBool(args.at(2)));
else if (args.at(1) == "night") // TODO when in new script API else if (args.at(1) == "night") // TODO when in new script API
line = "// untranslated stratoscropt (flag n ight): " + line; line = "// untranslated stratoscropt (flag n ight): " + line;
else if (args.at(1) == "object_trails") else if (args.at(1) == "object_trails")
line = QString("SolarSystem.setFlagTrails(%1 );").arg(strToBool(args.at(2))); line = QString("SolarSystem.setFlagTrails(%1 );").arg(strToBool(args.at(2)));
 End of changes. 3 change blocks. 
1 lines changed or deleted 10 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/