summaryrefslogtreecommitdiff
path: root/src/object/crackingGround.c
blob: bd13dadf75f13338b7002b56d60801d2b0fd9953 (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
/**
 * @file crackingGround.c
 * @ingroup Objects
 *
 * @brief Cracking Ground object
 */
#include "asm.h"
#include "object.h"
#include "sound.h"
#include "effects.h"
#include "room.h"
#include "player.h"

void CrackingGround(Entity* this) {
    if (this->action == 0) {
        this->action = 1;
        this->timer = 20;
        SnapToTile(this);
    } else {
        if (this->timer-- == 0) {
            sub_0807B7D8(0x35, COORD_TO_TILE(this), this->collisionLayer);
            CreateFx(this, FX_FALL_DOWN, 0x40);
            SoundReq(SFX_126);
            DeleteThisEntity();
        }
    }
}