From db10e319cc2201924815b2d8c9a4c2d21c2bfbb6 Mon Sep 17 00:00:00 2001 From: iamcheeseman <[hidden email]> Date: Sat, 17 Jan 2026 18:19:57 -0500 Subject: Verlet ropes :) --- src/resources.odin | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/resources.odin') diff --git a/src/resources.odin b/src/resources.odin index 315551d..1bd567e 100644 --- a/src/resources.odin +++ b/src/resources.odin @@ -96,3 +96,15 @@ get_image :: proc(id: Image_Id) -> rl.Texture2D { get_room :: proc(id: Room_Id) -> Room_Resource { return rooms[id] } + +convert_path_to_resource :: proc( + obj: Object_Resource, + property: string, +) -> Resource_Id { + path, has_path := obj.properties[property].(string) + if !has_path { + log.warnf("Property '%v' must be a path or string", property) + return nil + } + return path_to_resource_id[path] +} -- cgit v1.3-2-g0d8e