m_ModelTrans = new ssgTransform;
// Load the model
- m_Model = globals->get_model_loader()->load_model(m_sModelName);
+ m_Model = globals->get_model_loader()->load_model( globals->get_fg_root(),
+ m_sModelName,
+ globals->get_props(),
+ globals->get_sim_time_sec() );
m_Model->clrTraversalMaskBits( SSGTRAV_HOT );
// Add model to transform
#include <simgear/debug/logstream.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/math/sg_types.hxx>
-#include <simgear/misc/props.hxx>
#include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props.hxx>
#include <Main/fg_props.hxx>
#include <Main/globals.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/misc/exception.hxx>
#include <simgear/misc/sg_path.hxx>
-#include <simgear/misc/props.hxx>
-#include <simgear/misc/props_io.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/props/props_io.hxx>
#include <Main/globals.hxx>
#include <Main/fg_props.hxx>
#include <simgear/io/iochannel.hxx>
#include <simgear/math/sg_types.hxx>
#include <simgear/misc/commands.hxx>
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
#include <Main/fg_props.hxx>
#include <Main/globals.hxx>
// Populate the FGNetCtrls structure from the property tree.
void FGProps2NetCtrls( FGNetCtrls *net, bool net_byte_order ) {
int i;
- bool b;
SGPropertyNode * node;
SGPropertyNode * tempnode;
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/commands.hxx>
#include <simgear/misc/strutils.hxx>
-#include <simgear/misc/props.hxx>
-#include <simgear/misc/props_io.hxx>
+#include <simgear/props/props.hxx>
+#include <simgear/props/props_io.hxx>
#include STL_STRSTREAM
#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/compiler.h>
#include STL_STRING
# error This library requires C++
#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/compiler.h>
#include STL_STRING // Standard C++ string library
// Load model only on demand
if (!_models_loaded) {
for (unsigned int i = 0; i < _paths.size(); i++) {
- ssgEntity * entity = globals->get_model_loader()->load_model(_paths[i]);
+ ssgEntity * entity
+ = globals->get_model_loader()->load_model( globals->get_fg_root(),
+ _paths[i],
+ globals->get_props(),
+ globals->get_sim_time_sec());
if (entity != 0) {
// FIXME: this stuff can be handled
// in the XML wrapper as well (at least,
# error This library requires C++
#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
+#include <simgear/compiler.h>
+
+#include STL_STRING // Standard C++ string library
#include <plib/sg.h>
#include <plib/ssg.h>
-#include <simgear/compiler.h>
-#include <simgear/misc/props.hxx>
-
-#include STL_STRING // Standard C++ string library
+#include <simgear/props/props.hxx>
SG_USING_STD(string);
#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/compiler.h>
#include STL_STRING
#endif
-#ifdef HAVE_CONFIG_H
-# include <config.h>
-#endif
-
#include <simgear/compiler.h>
-#include <vector> // STL
#include STL_STRING
+#include <vector> // STL
#include <plib/sg.h>
#include <plib/ssg.h> // plib include
try
{
ssgEntity *obj_model =
- globals->get_model_loader()->load_model(dm->get_model_path());
+ globals->get_model_loader()->load_model( globals->get_fg_root(),
+ dm->get_model_path(),
+ globals->get_props(),
+ globals->get_sim_time_sec() );
if ( obj_model != NULL ) {
dm->get_obj_trans()->addKid( obj_model );
}
#include <simgear/compiler.h>
#include <simgear/math/point3d.hxx>
+#include <simgear/scene/model/location.hxx>
#include <queue>
# include <simgear/threads/SGQueue.hxx>
#endif // ENABLE_THREADS
-#include <Main/location.hxx>
-
#include "FGTileLoader.hxx"
#include "hitlist.hxx"
#include "newcache.hxx"
#pragma warning (disable: 4786)
#endif
-#include <simgear/misc/props.hxx>
-#include <simgear/misc/sg_path.hxx>
#include <simgear/debug/logstream.hxx>
#include <simgear/misc/exception.hxx>
#ifdef __BORLANDC__
# define exception c_exception
#endif
+#include <simgear/misc/sg_path.hxx>
+#include <simgear/props/props.hxx>
#include <Main/fg_props.hxx>
#include <string.h>
#include <simgear/debug/logstream.hxx>
+#include <simgear/props/condition.hxx>
#include <Main/fg_props.hxx>
_property = fgGetNode(node->getStringValue("property", ""), true);
SGPropertyNode *condition = node->getChild("condition");
if (condition != NULL)
- _condition = fgReadCondition(condition);
+ _condition = fgReadCondition(globals->get_props(), condition);
if (!_property && !_condition)
SG_LOG(SG_GENERAL, SG_WARN,
// If the state changes to false, stop playing.
//
if (_property)
- curr_value = _property->getDoubleValue();
+ curr_value = _property->getDoubleValue();
if ( // Lisp, anyone?
- (_condition && !_condition->test()) ||
- (!_condition && _property &&
- (
- !curr_value ||
- ( (_mode == FGSound::IN_TRANSIT) && (curr_value == _prev_value) )
- )
+ (_condition && !_condition->test()) ||
+ (!_condition && _property &&
+ (
+ !curr_value ||
+ ( (_mode == FGSound::IN_TRANSIT) && (curr_value == _prev_value) )
)
- )
+ )
+ )
{
-
- if ((_mode != FGSound::IN_TRANSIT) || (_stopping > MAX_TRANSIT_TIME)) {
-
- if (_sample->is_playing()) {
- SG_LOG(SG_GENERAL, SG_INFO, "Stopping audio after " << _dt_play
- << " sec: " << _name );
-
- _sample->stop( _mgr->get_scheduler() );
- }
-
- _active = false;
- _dt_stop += dt;
- _dt_play = 0.0;
-
-
- } else
- _stopping += dt;
-
- return;
-
+ if ((_mode != FGSound::IN_TRANSIT) || (_stopping > MAX_TRANSIT_TIME)) {
+ if (_sample->is_playing()) {
+ SG_LOG(SG_GENERAL, SG_INFO, "Stopping audio after " << _dt_play
+ << " sec: " << _name );
+
+ _sample->stop( _mgr->get_scheduler() );
+ }
+
+ _active = false;
+ _dt_stop += dt;
+ _dt_play = 0.0;
+ } else {
+ _stopping += dt;
+ }
+
+ return;
}
//
if (!_sample->is_playing()) {
_dt_stop += dt;
_dt_play = 0.0;
-
- } else
+ } else {
_dt_play += dt;
+ }
return;
}
#endif
#include <simgear/compiler.h>
+#include <simgear/props/condition.hxx>
+
#include <Main/fgfs.hxx>
#include <Main/globals.hxx>
SG_USING_STD(string);
SG_USING_STD(vector);
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
+
#include <Main/fgfs.hxx>
# error This library requires C++
#endif
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
+
#include <Main/fgfs.hxx>
# error This library requires C++
#endif
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
+
#include <Main/fgfs.hxx>
# error This library requires C++
#endif
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
+
#include <Main/fgfs.hxx>
#include <Main/fgfs.hxx>
#include <simgear/constants.h>
-#include <simgear/misc/props.hxx>
+#include <simgear/props/props.hxx>
#include "sphrintp.h"