コード例 #1
0
ファイル: voxels.c プロジェクト: kyle1320/voxels
void setBlock(Chunk *chunk, int x, int y, int z, Block block) {
    Block *current = getBlock(chunk, x, y, z);

    if (current->logic)
        freeLogic(current->logic);

    block.nb_pos_x = current->nb_pos_x;
    block.nb_neg_x = current->nb_neg_x;
    block.nb_pos_y = current->nb_pos_y;
    block.nb_neg_y = current->nb_neg_y;
    block.nb_pos_z = current->nb_pos_z;
    block.nb_neg_z = current->nb_neg_z;

    *getBlock(chunk, x, y, z) = block;
    renderChunk(chunk);
}
コード例 #2
0
ファイル: main.c プロジェクト: npenkov/pebslee-pebble
static void handle_deinit(void) {
    accel_data_service_unsubscribe();
    hide_sleep_window();

    // We are already in background capturing the sleep

    // if (get_config()->status == STATUS_ACTIVE) {
    //     set_config_status(STATUS_NOTACTIVE);
    //     notify_status_update(get_config()->status);
    // }

    // No more worker updates
    app_worker_message_unsubscribe();

    freeLogic();
}