mirror of
https://github.com/zeldaret/tmc
synced 2026-05-25 07:23:16 -04:00
29 lines
577 B
C
29 lines
577 B
C
|
|
#include "entity.h"
|
|
#include "coord.h"
|
|
|
|
void sub_080AABB0(Entity*);
|
|
|
|
void GuruguruBarProjectile(Entity* this) {
|
|
if (this->action == 0) {
|
|
this->action = 1;
|
|
InitializeAnimation(this, 0);
|
|
}
|
|
sub_080AABB0(this);
|
|
GetNextFrame(this);
|
|
}
|
|
|
|
void sub_080AABB0(Entity* this) {
|
|
u32 factor;
|
|
const s16* tmp;
|
|
Entity* parent;
|
|
|
|
parent = this->parent;
|
|
CopyPosition(parent, this);
|
|
|
|
tmp = &gSineTable[parent->animationState];
|
|
factor = this->actionDelay << 8;
|
|
this->x.WORD += tmp[0] * factor;
|
|
this->y.WORD -= tmp[0x40] * factor;
|
|
}
|