Example #1
0
/* Remove a mirror */
void remove_mirror(int y, int x)
{
    cave_type *c_ptr = &cave[y][x];

    /* Remove the mirror */
    c_ptr->info &= ~(CAVE_OBJECT);
    c_ptr->mimic = 0;

    if (d_info[dungeon_type].flags1 & DF1_DARKNESS)
    {
        c_ptr->info &= ~(CAVE_GLOW);
        if (!view_torch_grids) c_ptr->info &= ~(CAVE_MARK);

        /* Update the monster */
        if (c_ptr->m_idx) update_mon(c_ptr->m_idx, FALSE);

        update_local_illumination(y, x);
    }

    /* Notice */
    note_spot(y, x);

    /* Redraw */
    lite_spot(y, x);
}
Example #2
0
bool place_mirror(void)
{
    /* XXX XXX XXX */
    if (!cave_clean_bold(py, px))
    {
#ifdef JP
        msg_print("床上のアイテムが呪文を跳ね返した。");
#else
        msg_print("The object resists the spell.");
#endif

        return FALSE;
    }

    /* Create a mirror */
    cave[py][px].info |= CAVE_OBJECT;
    cave[py][px].mimic = feat_mirror;

    /* Turn on the light */
    cave[py][px].info |= CAVE_GLOW;

    /* Notice */
    note_spot(py, px);

    /* Redraw */
    lite_spot(py, px);

    update_local_illumination(py, px);

    return TRUE;
}
static bool _mirror_place(void)
{
    if (!cave_clean_bold(py, px))
    {
        msg_print("The object resists the spell.");
        return FALSE;
    }

    cave[py][px].info |= CAVE_OBJECT;
    cave[py][px].mimic = feat_mirror;
    cave[py][px].info |= CAVE_GLOW;
    note_spot(py, px);
    lite_spot(py, px);
    update_local_illumination(py, px);

    return TRUE;
}