MCPcopy Create free account
hub / github.com/WolfireGames/overgrowth / DumpState

Method DumpState

Source/Main/scenegraph.cpp:2878–2895  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2876}
2877
2878void SceneGraph::DumpState() {
2879 std::ofstream output;
2880 char dump_path[kPathSize];
2881 GetScenGraphDumpPath(dump_path, kPathSize);
2882
2883 my_ofstream_open(output, dump_path);
2884
2885 if (output.is_open()) {
2886 LOGI << "Dumping all objects in scenegraph into " << dump_path << std::endl;
2887 for (auto& object : objects_) {
2888 if (output.good()) {
2889 output << "[" << object->GetID() << "]: \"" << CStringFromEntityType(object->GetType()) << "\" " << object->GetName() << std::endl;
2890 }
2891 }
2892 } else {
2893 LOGE << "Failed at opening " << dump_path << " for dumping. " << std::endl;
2894 }
2895}
2896
2897void SceneGraph::GetParticleShaderNames(std::map<std::string, int>& preload_shaders) {
2898 Path p = FindFilePath("Data/shader_preload.xml", kDataPaths, true);

Callers 2

DumpScenegraphStateFunction · 0.80
DrawSettingsImGuiFunction · 0.80

Calls 6

GetScenGraphDumpPathFunction · 0.85
my_ofstream_openFunction · 0.85
CStringFromEntityTypeFunction · 0.85
GetIDMethod · 0.45
GetTypeMethod · 0.45
GetNameMethod · 0.45

Tested by

no test coverage detected