Generalized assets data.
This commit is contained in:
parent
1a36cccebc
commit
260c092a69
|
|
@ -1 +1 @@
|
||||||
Subproject commit d0e2dc99d2305ecea709632c75027fd33d863088
|
Subproject commit a8aacc04ef2bff71e9ba340673216ea94454f3ea
|
||||||
|
|
@ -59,8 +59,10 @@ inline int sprite_component_destroy(component_t *component)
|
||||||
|
|
||||||
inline int sprite_component_set_texture(sprite_component_data_t *component_data, const char *texture_name)
|
inline int sprite_component_set_texture(sprite_component_data_t *component_data, const char *texture_name)
|
||||||
{
|
{
|
||||||
component_data->texture = asset_manager_get_texture(&game.asset_manager, texture_name);
|
asset_t *texture_asset = asset_manager_get(&game.asset_manager, texture_name);
|
||||||
if(!component_data->texture) return EXIT_FAILURE;
|
if(!texture_asset) return EXIT_FAILURE;
|
||||||
|
|
||||||
|
component_data->texture = texture_asset->data;
|
||||||
|
|
||||||
return EXIT_SUCCESS;
|
return EXIT_SUCCESS;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue