#include <trx/game/const.h>
#include <trx/game/objects/common.h>
#include <trx/game/sound.h>

static void M_Control(const int16_t item_num)
{
    const ITEM *const item = Item_Get(item_num);
    if (item->trigger.mask == TRIGGER_MASK_ALL) {
        Sound_Effect(SFX_BURGLAR_ALARM, &item->pos, SPM_NORMAL);
    }
}

static void M_Setup(OBJECT *const obj)
{
    obj->control_func = M_Control;
    obj->draw_func = nullptr;
    obj->save_flags = true;
}

REGISTER_OBJECT(O_LARA_ALARM, M_Setup)
