diff --git a/src/character.c b/src/character.c index bfa20cd..bff324d 100644 --- a/src/character.c +++ b/src/character.c @@ -388,20 +388,20 @@ SYMBOL_EXPORT void AnimateCharacter(struct Game* game, struct Character* charact if (character->repeats > 0) { character->repeats--; if (character->callback) { - character->callback(game, character, NULL, character->spritesheet->name, character->callbackData); + character->callback(game, character, NULL, character->spritesheet, character->callbackData); } } else { if ((!character->reversed) && (character->successor)) { - char* old = character->spritesheet->name; + struct Spritesheet* old = character->spritesheet; SelectSpritesheet(game, character, character->successor); if (character->callback) { - character->callback(game, character, character->spritesheet->name, old, character->callbackData); + character->callback(game, character, character->spritesheet, old, character->callbackData); } } else if ((character->reversed) && (character->predecessor)) { - char* old = character->spritesheet->name; + struct Spritesheet* old = character->spritesheet; SelectSpritesheet(game, character, character->predecessor); if (character->callback) { - character->callback(game, character, character->spritesheet->name, old, character->callbackData); + character->callback(game, character, character->spritesheet, old, character->callbackData); } } else { if (character->repeats == 0) { @@ -411,7 +411,7 @@ SYMBOL_EXPORT void AnimateCharacter(struct Game* game, struct Character* charact character->pos = character->spritesheet->frameCount - 1; } if (character->callback) { - character->callback(game, character, NULL, character->spritesheet->name, character->callbackData); + character->callback(game, character, NULL, character->spritesheet, character->callbackData); } } } diff --git a/src/character.h b/src/character.h index 9a70f6f..916b85c 100644 --- a/src/character.h +++ b/src/character.h @@ -94,7 +94,7 @@ struct Character { bool reversed; /*!< Whether the current animation has been requested as reversed. */ bool hidden; void* data; /*!< Additional, custom character data (HP etc.). */ - void (*callback)(struct Game*, struct Character*, char* newAnim, char* oldAnim, void*); + void (*callback)(struct Game*, struct Character*, struct Spritesheet* newAnim, struct Spritesheet* oldAnim, void*); void* callbackData; bool shared; /*!< Marks the list of spritesheets as shared, so it won't be freed together with the character. */ ALLEGRO_TRANSFORM transform;