mirror of
https://github.com/zeldaret/tmc
synced 2026-06-02 02:00:32 -04:00
40 lines
983 B
C
40 lines
983 B
C
#include "entity.h"
|
|
#include "collision.h"
|
|
#include "enemy.h"
|
|
#include "player.h"
|
|
#include "functions.h"
|
|
|
|
extern void (*const V3HandProjectile_Functions[])(Entity*);
|
|
|
|
void V3HandProjectile(Entity* this) {
|
|
V3HandProjectile_Functions[GetNextFunction(this)](this);
|
|
}
|
|
|
|
void V3HandProjectile_OnTick(Entity* this) {
|
|
if (this->action == 0) {
|
|
this->action = 1;
|
|
this->direction = GetFacingDirection(this, &gPlayerEntity);
|
|
InitializeAnimation(this, 0);
|
|
SoundReq(SFX_199);
|
|
}
|
|
if (this->z.HALF.HI < -6) {
|
|
this->z.HALF.HI += 2;
|
|
}
|
|
ProcessMovement3(this);
|
|
if (this->collisions != COL_NONE) {
|
|
DeleteThisEntity();
|
|
}
|
|
GetNextFrame(this);
|
|
if (IsProjectileOffScreen(this)) {
|
|
DeleteThisEntity();
|
|
}
|
|
}
|
|
|
|
void sub_080ABFA8(Entity* this) {
|
|
DeleteThisEntity();
|
|
}
|
|
|
|
void (*const V3HandProjectile_Functions[])(Entity*) = {
|
|
V3HandProjectile_OnTick, sub_080ABFA8, DeleteEntity, DeleteEntity, DeleteEntity,
|
|
};
|