Fixed operator [] overload for static arrays

This commit is contained in:
2025-03-05 23:39:53 +01:00
parent adf9a57294
commit b67380e354
2 changed files with 13 additions and 9 deletions

View File

@@ -592,10 +592,10 @@ Entity_Storage :: struct {
}
DONE
DELETE_ENTITY :: #string DONE
DELETE_ENTITY :: #string,\% DONE
delete_entity :: (e: *Entity) {
// Delete the file too
path := tprint("../assets/scenes/%%/%%.ent", e.scene.name, e.id);
path := tprint("../assets/scenes/\%/\%.ent", e.scene.name, e.id);
File.file_delete(path);
destroy_entity(e);
@@ -609,7 +609,7 @@ delete_entity :: (e: *Entity) {
DONE
SERIALIZE_ENTITY :: #string DONE
SERIALIZE_ENTITY :: #string,\% DONE
serialize_entity :: (e: *Entity, path: string) {
builder: String_Builder;
builder.allocator = temp;
@@ -618,7 +618,7 @@ serialize_entity :: (e: *Entity, path: string) {
%1
}
File.write_entire_file(tprint("%%/%%.ent", path, e.id), builder_to_string(*builder));
File.write_entire_file(tprint("\%/\%.ent", path, e.id), builder_to_string(*builder));
}
DONE
@@ -695,4 +695,4 @@ PLACEHOLDER :: #string DONE
#poke_name Coven entity_ui;
#poke_name Coven duplicate_entity;
}
DONE
DONE