chore: cleanup of some LOGs and comment formatting

This commit is contained in:
Sara 2024-09-20 11:53:29 +02:00
parent 6c3906b7f8
commit 0d6e1ba96d

View file

@ -96,19 +96,18 @@ void Internal_IndexResourceDirectory() {
.type = ResourceGetTypeFromPath(g_resource_files.paths[i])
};
// only index resources that the engine knows how to load
if(placeholder.type == RESOURCE_SHADER) { // shaders are made up of two files, so their paths are treated differently
// shaders are made up of two files, so their paths are treated differently
if(placeholder.type == RESOURCE_SHADER) {
// if the shader has already been added, don't accidentally add it twice.
ResourceContainer *found_container = hash_map_get_as(ResourceContainer, &g_resource_map, &placeholder.name);
if(found_container == NULL) {
placeholder.path = GetDirectoryPath(placeholder.path);
LOG_INFO("Internal_IndexResourceDirectory: Indexing %s as %s", placeholder.path, placeholder.name);
hash_map_insert(&g_resource_map, &placeholder.name, &placeholder);
LOG_INFO("hash: %zu", strhash(placeholder.name));
}
} else if(placeholder.type != RESOURCE_MAX) { // regular resources
LOG_INFO("Internal_IndexResourceDirectory: Indexing %s as %s", placeholder.path, placeholder.name);
hash_map_insert(&g_resource_map, &placeholder.name, &placeholder);
LOG_INFO("hash: %zu", strhash(placeholder.name));
}
}
}