Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose some state manipulation functions to gateway #68

Merged
merged 1 commit into from
Aug 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions gamelink_single.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -30033,6 +30033,20 @@ namespace gateway
void SetGameVector4(const string& label, const float* ptr);
void SetGameVector4WithComponents(const string& label, float x, float y, float z, float w);

// Low level set game access. Sets a serializable array to the json path.
template<typename T>
void UpdateGameStatePathWithArray(const string& path, const T* begin, const T* end)
{
Base.UpdateStateWithArray(gamelink::StateTarget::Channel, path, begin, end);
}

// Low level set game access. Sets an serializable object to the json path.
template<typename T>
void UpdateGameStatePathWithObject(const string& path, const T& obj)
{
Base.UpdateStateWithObject(gamelink::StateTarget::Channel, path, obj);
}

RequestID SetGameMetadata(GameMetadata Meta);

string GetProjectionSandboxURL(const string& projection, int major, int minor, int patch) const;
Expand Down
14 changes: 14 additions & 0 deletions include/gateway.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,20 @@ namespace gateway
void SetGameVector4(const string& label, const float* ptr);
void SetGameVector4WithComponents(const string& label, float x, float y, float z, float w);

// Low level set game access. Sets a serializable array to the json path.
template<typename T>
void UpdateGameStatePathWithArray(const string& path, const T* begin, const T* end)
{
Base.UpdateStateWithArray(gamelink::StateTarget::Channel, gamelink::Operation::Add, path, begin, end);
}

// Low level set game access. Sets an serializable object to the json path.
template<typename T>
void UpdateGameStatePathWithObject(const string& path, const T& obj)
{
Base.UpdateStateWithObject(gamelink::StateTarget::Channel, gamelink::Operation::Add, path, obj);
}

RequestID SetGameMetadata(GameMetadata Meta);

string GetProjectionSandboxURL(const string& projection, int major, int minor, int patch) const;
Expand Down
Loading