mirror of
https://gitlab.com/dosowisko.net/libsuperderpy.git
synced 2024-12-05 00:38:00 +01:00
character: add detailedProgress property for progress report on each frame
This commit is contained in:
parent
02650dfb4f
commit
29e38ac04c
2 changed files with 5 additions and 0 deletions
|
@ -132,6 +132,9 @@ SYMBOL_EXPORT void LoadSpritesheets(struct Game* game, struct Character* charact
|
|||
if (height > tmp->height) {
|
||||
tmp->height = height;
|
||||
}
|
||||
if (character->detailedProgress && progress) {
|
||||
progress(game);
|
||||
}
|
||||
}
|
||||
if (progress) {
|
||||
progress(game);
|
||||
|
@ -400,6 +403,7 @@ SYMBOL_EXPORT struct Character* CreateCharacter(struct Game* game, char* name) {
|
|||
character->callback = NULL;
|
||||
character->callback_data = NULL;
|
||||
character->destructor = NULL;
|
||||
character->detailedProgress = false;
|
||||
|
||||
return character;
|
||||
}
|
||||
|
|
|
@ -112,6 +112,7 @@ struct Character {
|
|||
void* callback_data;
|
||||
CharacterDestructor* destructor;
|
||||
bool shared; /*!< Marks the list of spritesheets as shared, so it won't be freed together with the character. */
|
||||
bool detailedProgress; /*!< Reports progress of loading individual frames. */
|
||||
};
|
||||
|
||||
// TODO: document functions
|
||||
|
|
Loading…
Reference in a new issue