From 7c715e6ffcb784a5157a80841b1f6b7e75d226ad Mon Sep 17 00:00:00 2001 From: Marko Lindqvist <cazfi74@gmail.com> Date: Tue, 1 Mar 2022 21:20:26 +0200 Subject: [PATCH 38/38] Drop obsolete intro radar handling function from gui API See osdn #43872 Signed-off-by: Marko Lindqvist <cazfi74@gmail.com> --- client/client_main.c | 1 - client/gui-gtk-3.22/graphics.c | 14 -------------- client/gui-gtk-4.0/graphics.c | 14 -------------- client/gui-qt/graphics.cpp | 13 ------------- client/gui-qt/qtg_cxxside.cpp | 1 - client/gui-qt/qtg_cxxside.h | 1 - client/gui-sdl2/graphics.c | 16 ---------------- client/gui-sdl2/gui_main.c | 1 - client/gui-stub/graphics.c | 22 ---------------------- client/gui_cbsetter.c | 1 - client/gui_interface.c | 8 -------- client/gui_interface.h | 1 - client/include/graphics_g.h | 3 --- 13 files changed, 96 deletions(-) diff --git a/client/client_main.c b/client/client_main.c index 721dcc27e8..d529dd5851 100644 --- a/client/client_main.c +++ b/client/client_main.c @@ -926,7 +926,6 @@ void set_client_state(enum client_states newstate) set_client_page(PAGE_GAME); /* Find something sensible to display instead of the intro gfx. */ center_on_something(); - free_intro_radar_sprites(); agents_game_start(); editgui_tileset_changed(); voteinfo_gui_update(); diff --git a/client/gui-gtk-3.22/graphics.c b/client/gui-gtk-3.22/graphics.c index 75f98e5752..508a37591f 100644 --- a/client/gui-gtk-3.22/graphics.c +++ b/client/gui-gtk-3.22/graphics.c @@ -45,8 +45,6 @@ #include "graphics.h" -struct sprite *intro_gfx_sprite; - GdkCursor *fc_cursors[CURSOR_LAST][NUM_CURSOR_FRAMES]; /***********************************************************************//** @@ -102,15 +100,3 @@ void load_cursors(void) } } } - -/***********************************************************************//** - This function is so that packhand.c can be gui-independent, and - not have to deal with Sprites itself. -***************************************************************************/ -void free_intro_radar_sprites(void) -{ - if (intro_gfx_sprite) { - free_sprite(intro_gfx_sprite); - intro_gfx_sprite = NULL; - } -} diff --git a/client/gui-gtk-4.0/graphics.c b/client/gui-gtk-4.0/graphics.c index 9cd049e414..9610bf04c2 100644 --- a/client/gui-gtk-4.0/graphics.c +++ b/client/gui-gtk-4.0/graphics.c @@ -45,8 +45,6 @@ #include "graphics.h" -struct sprite *intro_gfx_sprite; - GdkCursor *fc_cursors[CURSOR_LAST][NUM_CURSOR_FRAMES]; /***********************************************************************//** @@ -102,15 +100,3 @@ void load_cursors(void) } } } - -/***********************************************************************//** - This function is so that packhand.c can be gui-independent, and - not have to deal with Sprites itself. -***************************************************************************/ -void free_intro_radar_sprites(void) -{ - if (intro_gfx_sprite) { - free_sprite(intro_gfx_sprite); - intro_gfx_sprite = NULL; - } -} diff --git a/client/gui-qt/graphics.cpp b/client/gui-qt/graphics.cpp index 9711301c7a..3b226e8f13 100644 --- a/client/gui-qt/graphics.cpp +++ b/client/gui-qt/graphics.cpp @@ -22,8 +22,6 @@ #include "graphics.h" #include "qtg_cxxside.h" -static struct sprite *intro_gfx_sprite = NULL; - /************************************************************************//** Return whether the client supports given view type. ****************************************************************************/ @@ -46,14 +44,3 @@ bool qtg_is_view_supported(enum ts_type type) void qtg_tileset_type_set(enum ts_type type) { } - -/************************************************************************//** - Frees the introductory sprites. -****************************************************************************/ -void qtg_free_intro_radar_sprites() -{ - if (intro_gfx_sprite) { - free_sprite(intro_gfx_sprite); - intro_gfx_sprite = NULL; - } -} diff --git a/client/gui-qt/qtg_cxxside.cpp b/client/gui-qt/qtg_cxxside.cpp index 6ea4cfa78d..62518a0193 100644 --- a/client/gui-qt/qtg_cxxside.cpp +++ b/client/gui-qt/qtg_cxxside.cpp @@ -42,7 +42,6 @@ void setup_gui_funcs() funcs->is_view_supported = qtg_is_view_supported; funcs->tileset_type_set = qtg_tileset_type_set; - funcs->free_intro_radar_sprites = qtg_free_intro_radar_sprites; funcs->load_gfxfile = qtg_load_gfxfile; funcs->load_gfxnumber = qtg_load_gfxnumber; funcs->create_sprite = qtg_create_sprite; diff --git a/client/gui-qt/qtg_cxxside.h b/client/gui-qt/qtg_cxxside.h index 145315cd9c..eb3a23aaf1 100644 --- a/client/gui-qt/qtg_cxxside.h +++ b/client/gui-qt/qtg_cxxside.h @@ -42,7 +42,6 @@ void qtg_real_output_window_append(const char *astring, bool qtg_is_view_supported(enum ts_type type); void qtg_tileset_type_set(enum ts_type type); -void qtg_free_intro_radar_sprites(); struct sprite *qtg_load_gfxfile(const char *filename); struct sprite *qtg_load_gfxnumber(int num); struct sprite *qtg_create_sprite(int width, int height, struct color *pcolor); diff --git a/client/gui-sdl2/graphics.c b/client/gui-sdl2/graphics.c index a707570d15..1ca9b0e2d6 100644 --- a/client/gui-sdl2/graphics.c +++ b/client/gui-sdl2/graphics.c @@ -1790,22 +1790,6 @@ void tileset_type_set(enum ts_type type) { } -/**********************************************************************//** - Load intro sprites. Not used in SDL-client. -**************************************************************************/ -void load_intro_gfx(void) -{ - /* nothing */ -} - -/**********************************************************************//** - Frees the introductory sprites. -**************************************************************************/ -void free_intro_radar_sprites(void) -{ - /* nothing */ -} - /**********************************************************************//** Create colored frame **************************************************************************/ diff --git a/client/gui-sdl2/gui_main.c b/client/gui-sdl2/gui_main.c index bac6410725..edabc94f52 100644 --- a/client/gui-sdl2/gui_main.c +++ b/client/gui-sdl2/gui_main.c @@ -1078,7 +1078,6 @@ void ui_exit(void) free_mapcanvas_and_overview(); free_auxiliary_tech_icons(); - free_intro_radar_sprites(); diplomacy_dialog_done(); intel_dialog_done(); diff --git a/client/gui-stub/graphics.c b/client/gui-stub/graphics.c index 90d0d52a51..f34371cb24 100644 --- a/client/gui-stub/graphics.c +++ b/client/gui-stub/graphics.c @@ -25,8 +25,6 @@ #include "graphics.h" -struct sprite *intro_gfx_sprite; - /************************************************************************//** Return whether the client supports given view type ****************************************************************************/ @@ -43,15 +41,6 @@ void gui_tileset_type_set(enum ts_type type) { } -/************************************************************************//** - Load the introductory graphics. -****************************************************************************/ -void load_intro_gfx(void) -{ - /* PORTME */ - intro_gfx_sprite = load_gfxfile(tileset_main_intro_filename(tileset)); -} - /************************************************************************//** Load the cursors (mouse substitute sprites), including a goto cursor, an airdrop cursor, a nuke cursor, and a patrol cursor. @@ -60,14 +49,3 @@ void load_cursors(void) { /* PORTME */ } - -/************************************************************************//** - Frees the introductory sprites. -****************************************************************************/ -void gui_free_intro_radar_sprites(void) -{ - if (intro_gfx_sprite) { - free_sprite(intro_gfx_sprite); - intro_gfx_sprite = NULL; - } -} diff --git a/client/gui_cbsetter.c b/client/gui_cbsetter.c index ae4292adfd..a7eed4c38e 100644 --- a/client/gui_cbsetter.c +++ b/client/gui_cbsetter.c @@ -53,7 +53,6 @@ void setup_gui_funcs(void) funcs->real_output_window_append = gui_real_output_window_append; funcs->is_view_supported = gui_is_view_supported; - funcs->free_intro_radar_sprites = gui_free_intro_radar_sprites; funcs->load_gfxfile = gui_load_gfxfile; funcs->create_sprite = gui_create_sprite; funcs->get_sprite_dimensions = gui_get_sprite_dimensions; diff --git a/client/gui_interface.c b/client/gui_interface.c index 3b6b534639..8ab124abfb 100644 --- a/client/gui_interface.c +++ b/client/gui_interface.c @@ -117,14 +117,6 @@ void tileset_type_set(enum ts_type type) funcs.tileset_type_set(type); } -/**********************************************************************//** - Call free_intro_radar_sprites callback -**************************************************************************/ -void free_intro_radar_sprites(void) -{ - funcs.free_intro_radar_sprites(); -} - /**********************************************************************//** Call load_gfxfile callback **************************************************************************/ diff --git a/client/gui_interface.h b/client/gui_interface.h index 65fb503416..314006e03b 100644 --- a/client/gui_interface.h +++ b/client/gui_interface.h @@ -45,7 +45,6 @@ struct gui_funcs { bool (*is_view_supported)(enum ts_type type); void (*tileset_type_set)(enum ts_type type); - void (*free_intro_radar_sprites)(void); struct sprite * (*load_gfxfile)(const char *filename); struct sprite * (*load_gfxnumber)(int num); struct sprite * (*create_sprite)(int width, int height, struct color *pcolor); diff --git a/client/include/graphics_g.h b/client/include/graphics_g.h index 85832c7ac5..a8c30b7941 100644 --- a/client/include/graphics_g.h +++ b/client/include/graphics_g.h @@ -27,9 +27,6 @@ GUI_FUNC_PROTO(bool, is_view_supported, enum ts_type type) GUI_FUNC_PROTO(void, tileset_type_set, enum ts_type type) -GUI_FUNC_PROTO(void, load_intro_gfx, void) GUI_FUNC_PROTO(void, load_cursors, void) -GUI_FUNC_PROTO(void, free_intro_radar_sprites, void) - #endif /* FC__GRAPHICS_G_H */ -- 2.34.1