diff --git a/src/console/console.c b/src/console/console.c index 58674013..1c5bfcbb 100644 --- a/src/console/console.c +++ b/src/console/console.c @@ -313,7 +313,7 @@ void console_render() { con->input[0] = '\0'; con->histpos_changed = 0; } - video_render_sprite(&con->background, -1, con->ypos - 101, BLEND_ALPHA, 0); + video_draw(&con->background, -1, con->ypos - 101); int t = con->ticks / 2; // input line font_render(&font_small, con->input, 0, con->ypos - 7, color_create(121, 121, 121, 255)); diff --git a/src/game/gui/dialog.c b/src/game/gui/dialog.c index 807f9e76..6100d600 100644 --- a/src/game/gui/dialog.c +++ b/src/game/gui/dialog.c @@ -76,7 +76,7 @@ void dialog_render(dialog *dlg) { if(!dlg->visible) { return; } - video_render_sprite(&dlg->background, dlg->x, dlg->y, BLEND_ALPHA, 0); + video_draw(&dlg->background, dlg->x, dlg->y); if(dlg->yes) { component_render(dlg->yes); } diff --git a/src/game/gui/menu.c b/src/game/gui/menu.c index c7db820b..4ca658c6 100644 --- a/src/game/gui/menu.c +++ b/src/game/gui/menu.c @@ -90,7 +90,7 @@ static void menu_render(component *c) { // Otherwise handle this component iterator it; component **tmp; - video_render_sprite(m->bg, c->x, c->y, BLEND_ALPHA, 0); + video_draw(m->bg, c->x, c->y); vector_iter_begin(&s->objs, &it); while((tmp = iter_next(&it)) != NULL) { component_render(*tmp); diff --git a/src/game/gui/pilotpic.c b/src/game/gui/pilotpic.c index b31abbf2..341eead7 100644 --- a/src/game/gui/pilotpic.c +++ b/src/game/gui/pilotpic.c @@ -19,7 +19,7 @@ typedef struct { static void pilotpic_render(component *c) { pilotpic *g = widget_get_obj(c); if(g->img != NULL) { - video_render_sprite(g->img->data, c->x, c->y, BLEND_ALPHA, 0); + video_draw(g->img->data, c->x, c->y); } } diff --git a/src/game/gui/progressbar.c b/src/game/gui/progressbar.c index eefcbcb3..12ab5e5b 100644 --- a/src/game/gui/progressbar.c +++ b/src/game/gui/progressbar.c @@ -103,17 +103,16 @@ static void progressbar_render(component *c) { } } - // Render backgrond (flashing or not) + // Render background (flashing or not) if(bar->state) { - video_render_sprite(bar->background_alt, c->x, c->y, BLEND_ALPHA, 0); + video_draw(bar->background_alt, c->x, c->y); } else { - video_render_sprite(bar->background, c->x, c->y, BLEND_ALPHA, 0); + video_draw(bar->background, c->x, c->y); } // Render block if(bar->block != NULL) { - video_render_sprite(bar->block, c->x + (bar->orientation == PROGRESSBAR_LEFT ? 0 : c->w - bar->block->w + 1), - c->y, BLEND_ALPHA, 0); + video_draw(bar->block, c->x + (bar->orientation == PROGRESSBAR_LEFT ? 0 : c->w - bar->block->w + 1), c->y); } } diff --git a/src/game/gui/spritebutton.c b/src/game/gui/spritebutton.c index a8347a7e..8a39fd63 100644 --- a/src/game/gui/spritebutton.c +++ b/src/game/gui/spritebutton.c @@ -31,7 +31,7 @@ static void spritebutton_render(component *c) { video_render_sprite_flip_scale_opacity_tint(sb->img, c->x, c->y, BLEND_ALPHA, 0, 0, 1.0, 1.0, opacity, color_create(128, 128, 128, 255)); } else if(sb->active > 0) { - video_render_sprite(sb->img, c->x, c->y, BLEND_ALPHA, 0); + video_draw(sb->img, c->x, c->y); } if(sb->text) { sb->tconf.opacity = opacity; diff --git a/src/game/gui/spriteimage.c b/src/game/gui/spriteimage.c index e26d67f2..5e271dc3 100644 --- a/src/game/gui/spriteimage.c +++ b/src/game/gui/spriteimage.c @@ -12,7 +12,7 @@ typedef struct { static void spriteimage_render(component *c) { spriteimage *sb = widget_get_obj(c); - video_render_sprite(sb->img, c->x, c->y, BLEND_ALPHA, 0); + video_draw(sb->img, c->x, c->y); } static void spriteimage_free(component *c) { diff --git a/src/game/gui/textbutton.c b/src/game/gui/textbutton.c index 5302953c..54c7e53f 100644 --- a/src/game/gui/textbutton.c +++ b/src/game/gui/textbutton.c @@ -69,7 +69,7 @@ static void textbutton_render(component *c) { // Border if(tb->border_enabled) { - video_render_sprite(&tb->border, c->x - 2, c->y - 2, BLEND_ALPHA, 0); + video_draw(&tb->border, c->x - 2, c->y - 2); } } diff --git a/src/game/gui/textinput.c b/src/game/gui/textinput.c index 4f88a8a3..993d611e 100644 --- a/src/game/gui/textinput.c +++ b/src/game/gui/textinput.c @@ -29,7 +29,7 @@ static void textinput_render(component *c) { int chars = strlen(tb->buf); if(tb->bg_enabled) { - video_render_sprite(&tb->sur, c->x + (c->w - tb->sur.w) / 2, c->y - 2, BLEND_ALPHA, 0); + video_draw(&tb->sur, c->x + (c->w - tb->sur.w) / 2, c->y - 2); } if(component_is_selected(c)) { diff --git a/src/game/gui/trnselect.c b/src/game/gui/trnselect.c index 0693b897..af6d183a 100644 --- a/src/game/gui/trnselect.c +++ b/src/game/gui/trnselect.c @@ -25,7 +25,7 @@ typedef struct { static void trnselect_render(component *c) { trnselect *g = widget_get_obj(c); - video_render_sprite(g->img->data, c->x + g->img->pos.x, c->y + g->img->pos.y, BLEND_ALPHA, 0); + video_draw(g->img->data, c->x + g->img->pos.x, c->y + g->img->pos.y); if(g->label) { component_render(g->label); } diff --git a/src/game/objects/har.c b/src/game/objects/har.c index 8b7bc636..462725ea 100644 --- a/src/game/objects/har.c +++ b/src/game/objects/har.c @@ -926,7 +926,7 @@ void har_debug(object *obj) { uint8_t red = 0xCF; uint8_t blank = 0; - // video_render_sprite(&h->cd_debug, 0, 0, 0, 0); + // video_draw(&h->cd_debug, 0, 0); if(obj->cur_sprite == NULL) { return; @@ -977,7 +977,7 @@ void har_debug(object *obj) { image_set_pixel(&img, pos_a.x, pos_a.y, red); surface_force_refresh(&h->cd_debug); // Force refresh for the texture - video_render_sprite(&h->cd_debug, 0, 0, 0, 0); + video_draw(&h->cd_debug, 0, 0); } #endif // DEBUGMODE diff --git a/src/game/scenes/arena.c b/src/game/scenes/arena.c index 9cc5df76..2daf908a 100644 --- a/src/game/scenes/arena.c +++ b/src/game/scenes/arena.c @@ -1137,7 +1137,7 @@ void arena_render_overlay(scene *scene) { // Render menu (if visible) if(local->menu_visible) { guiframe_render(local->game_menu); - video_render_sprite(&local->sur, 10, 150, BLEND_ALPHA, 0); + video_draw(&local->sur, 10, 150); } } diff --git a/src/game/scenes/melee.c b/src/game/scenes/melee.c index 34c64703..dc275079 100644 --- a/src/game/scenes/melee.c +++ b/src/game/scenes/melee.c @@ -437,8 +437,8 @@ void melee_render(scene *scene) { int current_b = 5 * local->row_b + local->column_b; if(local->selection == 0) { - video_render_sprite(&local->feh, 70, 0, BLEND_ALPHA, 0); - video_render_sprite(&local->bleh, 0, 62, BLEND_ALPHA, 0); + video_draw(&local->feh, 70, 0); + video_draw(&local->bleh, 0, 62); // player bio font_render_wrapped_shadowed(&font_small, lang_get(135 + current_a), 4, 66, 152, COLOR_GREEN, @@ -455,8 +455,8 @@ void melee_render(scene *scene) { component_render(local->bar_endurance[0]); if(player2->selectable) { - video_render_sprite(&local->feh, 320 - 70 - local->feh.w, 0, BLEND_ALPHA, 0); - video_render_sprite(&local->bleh, 320 - local->bleh.w, 62, BLEND_ALPHA, 0); + video_draw(&local->feh, 320 - 70 - local->feh.w, 0); + video_draw(&local->bleh, 320 - local->bleh.w, 62); // player bio font_render_wrapped_shadowed(&font_small, lang_get(135 + current_b), 320 - local->bleh.w + 4, 66, 152, COLOR_GREEN, TEXT_SHADOW_RIGHT | TEXT_SHADOW_BOTTOM); diff --git a/src/game/scenes/newsroom.c b/src/game/scenes/newsroom.c index ad16a8bb..a07c3bd4 100644 --- a/src/game/scenes/newsroom.c +++ b/src/game/scenes/newsroom.c @@ -138,7 +138,7 @@ void newsroom_overlay_render(scene *scene) { // Render text if(str_size(&local->news_str) > 0) { - video_render_sprite(&local->news_bg, 20, 140, BLEND_ALPHA, 0); + video_draw(&local->news_bg, 20, 140); font_render_wrapped(&font_small, str_c(&local->news_str), 30, 150, 250, COLOR_YELLOW); } diff --git a/src/game/scenes/vs.c b/src/game/scenes/vs.c index a159a772..be6b9580 100644 --- a/src/game/scenes/vs.c +++ b/src/game/scenes/vs.c @@ -265,7 +265,7 @@ void vs_render(scene *scene) { if(player2->selectable) { // arena selection - video_render_sprite(&local->arena_select_bg, 55, 150, BLEND_ALPHA, 0); + video_draw(&local->arena_select_bg, 55, 150); object_render(&local->arena_select); diff --git a/src/video/video.c b/src/video/video.c index eaf718aa..ae46a7f9 100644 --- a/src/video/video.c +++ b/src/video/video.c @@ -304,18 +304,6 @@ void video_render_sprite_tint(surface *sur, int sx, int sy, color c, int pal_off video_render_sprite_flip_scale_opacity_tint(sur, sx, sy, BLEND_ALPHA, pal_offset, FLIP_NONE, 1.0f, 1.0f, 255, c); } -// Wrapper -void video_render_sprite(surface *sur, int sx, int sy, VIDEO_BLEND_MODE blend_mode, int pal_offset) { - video_render_sprite_flip_scale_opacity(sur, sx, sy, blend_mode, pal_offset, FLIP_NONE, 1.0f, 1.0f, 255); -} - -void video_render_sprite_flip_scale_opacity(surface *sur, int sx, int sy, VIDEO_BLEND_MODE blend_mode, int pal_offset, - unsigned int flip_mode, float x_percent, float y_percent, uint8_t opacity) { - - video_render_sprite_flip_scale_opacity_tint(sur, sx, sy, blend_mode, pal_offset, flip_mode, x_percent, y_percent, - opacity, color_create(0xFF, 0xFF, 0xFF, 0xFF)); -} - void video_render_sprite_size(surface *sur, int sx, int sy, int sw, int sh) { SDL_Rect dst; dst.w = sw; diff --git a/src/video/video.h b/src/video/video.h index ba11d6fd..ff12ab6a 100644 --- a/src/video/video.h +++ b/src/video/video.h @@ -19,11 +19,6 @@ void video_reinit_renderer(); void video_get_state(int *w, int *h, int *fs, int *vsync); void video_move_target(int x, int y); -/** - * @deprecated - */ -void video_render_sprite(surface *sur, int x, int y, VIDEO_BLEND_MODE blend_mode, int pal_offset); - /** * @deprecated */ @@ -34,12 +29,6 @@ void video_render_sprite_size(surface *sur, int sx, int sy, int sw, int sh); */ void video_render_sprite_tint(surface *sur, int x, int y, color c, int pal_offset); -/** - * @deprecated - */ -void video_render_sprite_flip_scale_opacity(surface *sur, int x, int y, VIDEO_BLEND_MODE blend_mode, int pal_offset, - unsigned int flip_mode, float x_percent, float y_percent, uint8_t opacity); - /** * @deprecated */