Added utils and types to handle paths

This commit is contained in:
Patedam committed 2026-09-18 18:14:00 -04:00
1 parent f77b7fb901
commit 2fd675cf11
16 files changed
+189 -98

No files matched your search

+3 -3
View File
@@ -236,18 +236,18 @@ void RenderWorldEditorUI(World& world)
static char worldFilePath[256] = "/world.bin";
ImGui::InputText("World File", worldFilePath, sizeof(worldFilePath));
String path = GetAssetPath(temp.Arena, AssetType::JAsset, ConstString(worldFilePath));
Path path = GetAssetPath(temp.Arena, AssetType::JAsset, ConstString(worldFilePath));
if (ImGui::Button("Save World"))
{
Archive data = { .arena = temp.Arena, .loading = false };
Serialize(data, world, path);
Serialize(data, world, path.FullPath);
}
ImGui::SameLine();
if (ImGui::Button("Load World"))
{
Archive data{ .arena = temp.Arena, .loading = true };
Serialize(data, world, path);
Serialize(data, world, path.FullPath);
}
scratch_end(temp);