Пример #1
0
void overview_render_next(Overview * self) {
    if (self->screenshot [game->level]) {
#line 69
        return ;
    }
    All * a = global_a;
#line 73
    game->sequence = 1;
#line 75
    intro_tint = land_color_rgba(1, 1, 1, 1);
    intro_back = land_color_rgba(0, 0, 0, 0);
    a->render_screenshot = 1;
#line 79
    int w = land_display_width();
    int h = land_display_height();
    self->screenshot [game->level] = land_image_new(w / 4, h / 4);
    land_set_image_display(self->screenshot [game->level]);
#line 84
    Viewport * backup = game->viewport;
    Viewport ovp;
    game->viewport = & ovp;
    viewport_update(game->viewport, w / 4, h / 4);
    a->overview = 0;
    render(game, w / 4, h / 4);
    a->overview = 1;
    game->viewport = backup;
#line 93
    land_unset_image_display();
#line 95
    land_image_center(self->screenshot [game->level]);
#line 97
    game->sequence = 0;
    a->render_screenshot = 0;
}
Пример #2
0
void update(void) {
    All * a = global_a;
#line 175
    if (land_was_resized()) {
#line 177
        viewport_update(game->viewport, land_display_width(), land_display_height());
        a->resize_in_ticks = 10;
    }
    if (a->resize_in_ticks > 0) {
        a->resize_in_ticks--;
        if (a->resize_in_ticks == 0) {
            reload_fonts();
        }
    }
#line 185
    if (a->load_after_redraw) {
        if (a->load_after_redraw == 2) {
#line 188
            load_level(a->editor || game->record->is_replaying || game->record->is_recording);
            if (a->find_entrance) {
                a->find_entrance = 0;
                if (game->player) {
                    player_find_entrance(& game->player->super);
                }
            }
#line 193
            if (game && game->player) {
#line 195
                record_load(game->record, game->level, game->player->super.x, game->player->super.y, game->player->super.z);
            }
#line 196
            a->load_after_redraw++;
        }
#line 196
        return ;
    }
#line 199
    config_check_controls(a);
#line 201
    if (a->title) {
        title_tick();
    }
#line 202
    else {
#line 204
        game_tick(game);
    }
}