Skip to content

Commit

Permalink
Animation research + misc. (#279)
Browse files Browse the repository at this point in the history
  • Loading branch information
assidion2 authored Sep 25, 2024
1 parent d1468a6 commit caba7cb
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 7 deletions.
1 change: 1 addition & 0 deletions headers/functions/overlay29.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ void UpdateStatusIconFlags(struct entity* entity);
void PlayEffectAnimation0x171Full(struct entity* entity);
void PlayEffectAnimation0x171(struct entity* entity);
void ShowPpRestoreEffect(struct entity* entity);
bool ShouldDisplayEntityAdvanced(struct entity* entity);
void PlayEffectAnimation0x1A9(struct entity* entity);
void PlayEffectAnimation0x18E(struct entity* entity);
void LoadMappaFileAttributes(int quick_saved, bool disable_monsters, undefined* special_process);
Expand Down
21 changes: 15 additions & 6 deletions headers/types/dungeon_mode/dungeon_mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,12 @@ struct monster {
// tend to float? Otherwise 1?
bool field_0x171;
// 0x172: Set when the leader and falling through a pitfall trap.
// If both this and pitfall_trap_flag_0x174 are set, the sprite will disappear.
bool pitfall_trap_flag_0x172;
// 0x173: Some kind of visual flag?
bool field_0x173;
// 0x174: Set when the leader and falling through a pitfall trap.
// If both this and pitfall_trap_flag_0x172 are set, the sprite will disappear.
bool pitfall_trap_flag_0x174;
undefined field_0x175;
undefined field_0x176;
Expand Down Expand Up @@ -533,7 +535,9 @@ struct monster {
undefined field_0x199;
undefined field_0x19a;
undefined field_0x19b;
struct position pos; // 0x19C: Mirror of the position on the entity struct
// 0x19C: Mirror of the position on the entity struct.
// Is not updated properly in certain cases, such as in MoveMonsterToPos.
struct position pos;
undefined field_0x1a0;
undefined field_0x1a1;
undefined field_0x1a2;
Expand Down Expand Up @@ -1240,15 +1244,20 @@ ASSERT_SIZE(struct trap_animation, 2);
// Unverified, ported from Irdkwia's notes
struct effect_animation {
int field_0x0;
int field_0x4;
int file_index; // 0x4: File index in pack 3 (effect.bin)
int field_0x8;
int field_0xc;
int field_0x10;
// 0xC: Some sort of index into the file. Related animations are grouped together into the same
// file and indexed with this. Is used as the animation_key parameter in
// SetAnimationForAnimationControl.
int animation_index;
int se_id; // 0x10: Sound effect id, passed to PlaySeByIdVolume
int field_0x14;
uint8_t field_0x18;
int8_t field_0x19;
uint8_t field_0x1a;
uint8_t field_0x1b;
// 0x1A: Is non-zero if the animation is non-blocking. In this case, the animation will be
// delayed until the next time AnimationDelayOrSomething is called.
uint8_t is_non_blocking;
uint8_t unk_repeat; // 0x1B: If non-zero, makes the animation repeat a bunch of times
};
ASSERT_SIZE(struct effect_animation, 28);

Expand Down
1 change: 1 addition & 0 deletions symbols/overlay10.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ overlay10:
JP: 0x22C10A8
description: |-
Just a guess. This is called in a loop in PlayEffectAnimation, and the output controls whether or not AdvanceFrame continues to be called.
If the current effect animation's is_non_blocking field is set, the function will return false the very first time it is called.
r0: ?
return: whether or not the animation still has more frames left?
Expand Down
10 changes: 9 additions & 1 deletion symbols/overlay29.yml
Original file line number Diff line number Diff line change
Expand Up @@ -717,6 +717,14 @@ overlay29:
Displays the graphical effect on a monster that just recovered PP.
r0: entity pointer
- name: ShouldDisplayEntityAdvanced
address:
EU: 0x22E6880
description: |-
Returns whether or not the entity should be displayed, using the same checks as ShouldDisplayEntity except also checking whether it is visible and whether the camera entity is blinded.
r0: entity pointer
return: bool
- name: PlayEffectAnimation0x1A9
address:
EU:
Expand Down Expand Up @@ -2935,7 +2943,7 @@ overlay29:
description: |-
Returns 0 if none of these conditions holds for the given entity:
blinded (checked only if blind_check == 1),
asleep, paused, infatuated, wrapping, wrapped, biding, petrified, or terrified.
asleep, frozen, paused, infatuated, wrapping, wrapped, biding, petrified, or terrified.
r0: Entity pointer
r1: If true, return 1 if entity is blinded
Expand Down

0 comments on commit caba7cb

Please sign in to comment.