mirror of
https://github.com/MaSzyna-EU07/maszyna.git
synced 2026-07-21 18:19:19 +02:00
Merge remote-tracking branch 'tmj/master' into sim
This commit is contained in:
32
simulation.h
32
simulation.h
@@ -14,6 +14,7 @@ http://mozilla.org/MPL/2.0/.
|
||||
#include "lua.h"
|
||||
#include "Event.h"
|
||||
#include "Train.h"
|
||||
#include "particles.h"
|
||||
|
||||
namespace simulation {
|
||||
|
||||
@@ -21,24 +22,19 @@ class state_manager {
|
||||
|
||||
public:
|
||||
// methods
|
||||
void
|
||||
init_scripting_interface();
|
||||
// legacy method, calculates changes in simulation state over specified time
|
||||
void
|
||||
update( double Deltatime, int Iterationcount );
|
||||
void
|
||||
update_clocks();
|
||||
// starts deserialization from specified file, returns context pointer on success, throws otherwise
|
||||
std::shared_ptr<deserializer_state>
|
||||
deserialize_begin(std::string const &Scenariofile);
|
||||
// continues deserialization for given context, amount limited by time, returns true if needs to be called again
|
||||
bool
|
||||
deserialize_continue(std::shared_ptr<deserializer_state> state);
|
||||
// stores class data in specified file, in legacy (text) format
|
||||
void
|
||||
export_as_text( std::string const &Scenariofile ) const;
|
||||
// process input commands
|
||||
void
|
||||
process_commands();
|
||||
// create model from node string
|
||||
update_scripting_interface();
|
||||
// process input commands
|
||||
void
|
||||
process_commands();
|
||||
// create model from node string
|
||||
TAnimModel *
|
||||
create_model(const std::string &src, const std::string &name, const glm::dvec3 &position);
|
||||
// create eventlauncher from node string
|
||||
@@ -50,10 +46,22 @@ public:
|
||||
// delete TEventLauncher instance
|
||||
void
|
||||
delete_eventlauncher(TEventLauncher *launcher);
|
||||
// starts deserialization from specified file, returns context pointer on success, throws otherwise
|
||||
std::shared_ptr<deserializer_state>
|
||||
deserialize_begin(std::string const &Scenariofile);
|
||||
// continues deserialization for given context, amount limited by time, returns true if needs to be called again
|
||||
bool
|
||||
deserialize_continue(std::shared_ptr<deserializer_state> state);
|
||||
// stores class data in specified file, in legacy (text) format
|
||||
void
|
||||
export_as_text( std::string const &Scenariofile ) const;
|
||||
|
||||
private:
|
||||
// members
|
||||
state_serializer m_serializer;
|
||||
struct {
|
||||
std::shared_ptr<TMemCell> weather, time, date;
|
||||
} m_scriptinginterface;
|
||||
};
|
||||
|
||||
// passes specified sound to all vehicles within range as a radio message broadcasted on specified channel
|
||||
|
||||
Reference in New Issue
Block a user