summaryrefslogtreecommitdiff
path: root/src/npc/milkCart.c
blob: 4c581a1ee7f5232ee72ea83be3c962f489e36747 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
/**
 * @file milkCart.c
 * @ingroup NPCs
 *
 * @brief Milk Cart NPC
 */
#include "entity.h"
#include "npc.h"

void sub_08065B6C(Entity*);
void sub_08065B9C(Entity*);

void MilkCart(Entity* ent) {
    static void (*const gMilkCartBehaviors[2])(Entity*) = {
        sub_08065B6C,
        sub_08065B9C,
    };
    gMilkCartBehaviors[ent->action](ent);
    sub_0806ED78(ent);
}

void sub_08065B6C(Entity* ent) {
    ent->action++;
    ent->spriteSettings.draw = 1;
    ent->y.HALF.LO += -0x8000;
    ent->animationState = 6;
    InitAnimationForceUpdate(ent, 3);
}

void sub_08065B9C(Entity* ent) {
    UpdateAnimationSingleFrame(ent);
}