diff options
| author | Ibot02 <jtp.jtp@gmx.de> | 2021-12-29 15:25:53 +0100 |
|---|---|---|
| committer | Ibot02 <jtp.jtp@gmx.de> | 2021-12-29 15:25:53 +0100 |
| commit | e589f75cf22b757688f3f2aecd72c4af0455d408 (patch) | |
| tree | 1357d5d0f308f06dbf1b3f87370dc8e9981f83d3 /src | |
| parent | 7f0caf50fafe9f8a28e7a5fd256c5bb071ba2fb8 (diff) | |
GyorgFemaleMouth.c: ok
Diffstat (limited to 'src')
| -rw-r--r-- | src/enemy/gyorgFemaleMouth.c | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/src/enemy/gyorgFemaleMouth.c b/src/enemy/gyorgFemaleMouth.c new file mode 100644 index 00000000..d326f287 --- /dev/null +++ b/src/enemy/gyorgFemaleMouth.c @@ -0,0 +1,42 @@ +#define NENT_DEPRECATED +#include "global.h" +#include "player.h" +#include "room.h" +#include "enemy/gyorg.h" + +extern const u16 gUnk_080D28CC[]; +extern Hitbox* const gUnk_080D28AC[]; + +void GyorgFemaleMouth(Entity* this) { + u32 tmp; + if (this->parent->next == NULL) { + DeleteThisEntity(); + } + if (this->action == 0) { + this->action = 1; + this->spriteOrientation.flipY = 2; + this->spriteRendering.b3 = 2; + this->spritePriority.b0 = 7; + this->collisionLayer = 2; + this->animationState = 0xFF; + } + tmp = this->parent->animationState >> 5; + if (tmp != this->animationState) { + this->animationState = tmp; + this->x.HALF.HI = gUnk_080D28CC[tmp] + gRoomControls.roomOriginX; + this->y.HALF.HI = gUnk_080D28CC[tmp + 1] + gRoomControls.roomOriginY; + InitializeAnimation(this, tmp >> 1); + } else { + GetNextFrame(this); + } + if (tmp & 2) { + if (this->y.HALF.HI < gPlayerEntity.y.HALF.HI) { + tmp++; + } + } else { + if (this->x.HALF.HI < gPlayerEntity.x.HALF.HI) { + tmp++; + } + } + this->hitbox = gUnk_080D28AC[tmp]; +} |
