![]() |
Calamity Engine 1.0.0
A cross-platform 2D game engine written in C++ and SDL3.
|
#include "file.hpp"#include <iostream>#include <iomanip>#include "logger.hpp"#include "../services/services.hpp"Functions | |
| std::string | exportNodeTree (std::shared_ptr< Node > node) |
| std::string | exportWindow (std::shared_ptr< Window > window) |
| void | loadWindow (const std::string &jsonText, std::shared_ptr< Window > window) |
| void | loadNodeTree (const std::shared_ptr< Node > &parent, const std::string &jsonText) |
| std::string | parseFilePath (std::string path) |
| std::string exportNodeTree | ( | std::shared_ptr< Node > | node | ) |
This function is for exporting any node as a JSON file.
| std::string exportWindow | ( | std::shared_ptr< Window > | window | ) |
This function exports the root node of the provided window. You can think of the root node of a window as a "scene" system that other engines would have.
| void loadNodeTree | ( | const std::shared_ptr< Node > & | parent, |
| const std::string & | jsonText | ||
| ) |
This function is for loading a node tree from JSON text.
| void loadWindow | ( | const std::string & | jsonText, |
| std::shared_ptr< Window > | window | ||
| ) |
This function loads the root node of the provided window from the provided json text.
| std::string parseFilePath | ( | std::string | path | ) |
This function takes a path like "user://myfile.txt" or "res://myfile.txt" and returns the actual file path on the filesystem.