summaryrefslogtreecommitdiff
path: root/src/object/lamp.c
blob: 1992f36aa6fb3dce52640f2b89155e351df6b08c (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
/**
 * @file lamp.c
 * @ingroup Objects
 *
 * @brief Lamp object
 */
#include "entity.h"

void Lamp_Init(Entity* this);
void Lamp_Action1(Entity* this);

void Lamp(Entity* this) {
    static void (*const Lamp_Actions[])(Entity*) = {
        Lamp_Init,
        Lamp_Action1,
    };

    Lamp_Actions[this->action](this);
}

void Lamp_Init(Entity* this) {
    this->action = 1;
    UpdateSpriteForCollisionLayer(this);
    InitializeAnimation(this, 0);
}

void Lamp_Action1(Entity* this) {
    GetNextFrame(this);
}