From c6a34750115181147942b3a2bb35b40a584dd1d2 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sat, 11 Jan 2025 09:16:03 +0200
Subject: [PATCH 3/3] Drop 3D stuff

See RM #1211

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 client/Makefile.am             |   3 -
 client/gui-gtk-3.22/gui_main.c |   5 -
 client/gui-gtk-4.0/gui_main.c  |   5 -
 client/gui-gtk-5.0/gui_main.c  |   5 -
 client/gui-qt/gui_main.cpp     |   1 -
 client/gui-sdl2/gui_main.c     |   1 -
 client/gui-sdl3/gui_main.c     |   1 -
 client/gui_properties.h        |   1 -
 client/tilespec.c              |   3 -
 client/tilespec.h              |   2 -
 configure.ac                   |  12 --
 data/3d.tilespec               | 375 ---------------------------------
 12 files changed, 414 deletions(-)
 delete mode 100644 data/3d.tilespec

diff --git a/client/Makefile.am b/client/Makefile.am
index 6c4c9d7f94..4fac2af508 100644
--- a/client/Makefile.am
+++ b/client/Makefile.am
@@ -195,7 +195,6 @@ freeciv_gtk3_22_LDADD = \
  $(top_builddir)/common/libfreeciv.la \
  $(INTLLIBS) $(CLIENT_LIBS) $(CLIENTICON) \
  $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \
- $(gui_3d_libs) \
  $(gui_gtk3_22_libs)
 endif
 
@@ -211,7 +210,6 @@ freeciv_gtk4_LDADD = \
  $(top_builddir)/common/libfreeciv.la \
  $(INTLLIBS) $(CLIENT_LIBS) $(CLIENTICON) \
  $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \
- $(gui_3d_libs) \
  $(gui_gtk4_libs)
 endif
 
@@ -227,7 +225,6 @@ freeciv_gtk4x_LDADD = \
  $(top_builddir)/common/libfreeciv.la \
  $(INTLLIBS) $(CLIENT_LIBS) $(CLIENTICON) \
  $(TINYCTHR_LIBS) $(MAPIMG_WAND_LIBS) \
- $(gui_3d_libs) \
  $(gui_gtk5_libs)
 endif
 
diff --git a/client/gui-gtk-3.22/gui_main.c b/client/gui-gtk-3.22/gui_main.c
index fc1f0c519d..8b9aa730ad 100644
--- a/client/gui-gtk-3.22/gui_main.c
+++ b/client/gui-gtk-3.22/gui_main.c
@@ -2652,9 +2652,4 @@ void setup_gui_properties(void)
   gui_properties.animations = FALSE;
   gui_properties.views.isometric = TRUE;
   gui_properties.views.overhead = TRUE;
-#ifdef GTK3_3D_ENABLED
-  gui_properties.views.d3 = TRUE;
-#else  /* GTK3_3D_ENABLED */
-  gui_properties.views.d3 = FALSE;
-#endif /* GTK3_3D_ENABLED */
 }
diff --git a/client/gui-gtk-4.0/gui_main.c b/client/gui-gtk-4.0/gui_main.c
index 2852c9cda9..dfce1a54a1 100644
--- a/client/gui-gtk-4.0/gui_main.c
+++ b/client/gui-gtk-4.0/gui_main.c
@@ -2684,9 +2684,4 @@ void setup_gui_properties(void)
   gui_properties.animations = TRUE;
   gui_properties.views.isometric = TRUE;
   gui_properties.views.overhead = TRUE;
-#ifdef GTK3_3D_ENABLED
-  gui_properties.views.d3 = TRUE;
-#else  /* GTK3_3D_ENABLED */
-  gui_properties.views.d3 = FALSE;
-#endif /* GTK3_3D_ENABLED */
 }
diff --git a/client/gui-gtk-5.0/gui_main.c b/client/gui-gtk-5.0/gui_main.c
index ae953dfa4c..8cd7c3df68 100644
--- a/client/gui-gtk-5.0/gui_main.c
+++ b/client/gui-gtk-5.0/gui_main.c
@@ -2737,9 +2737,4 @@ void setup_gui_properties(void)
   gui_properties.animations = TRUE;
   gui_properties.views.isometric = TRUE;
   gui_properties.views.overhead = TRUE;
-#ifdef GTK3_3D_ENABLED
-  gui_properties.views.d3 = TRUE;
-#else  /* GTK3_3D_ENABLED */
-  gui_properties.views.d3 = FALSE;
-#endif /* GTK3_3D_ENABLED */
 }
diff --git a/client/gui-qt/gui_main.cpp b/client/gui-qt/gui_main.cpp
index 43684c1cf2..90291320c0 100644
--- a/client/gui-qt/gui_main.cpp
+++ b/client/gui-qt/gui_main.cpp
@@ -608,5 +608,4 @@ void qtg_setup_gui_properties()
   gui_properties.animations = FALSE;
   gui_properties.views.isometric = TRUE;
   gui_properties.views.overhead = TRUE;
-  gui_properties.views.d3 = FALSE;
 }
diff --git a/client/gui-sdl2/gui_main.c b/client/gui-sdl2/gui_main.c
index 1185131cb8..b8eab6f4aa 100644
--- a/client/gui-sdl2/gui_main.c
+++ b/client/gui-sdl2/gui_main.c
@@ -1356,5 +1356,4 @@ void setup_gui_properties(void)
   gui_properties.animations = FALSE;
   gui_properties.views.isometric = TRUE;
   gui_properties.views.overhead = TRUE;
-  gui_properties.views.d3 = FALSE;
 }
diff --git a/client/gui-sdl3/gui_main.c b/client/gui-sdl3/gui_main.c
index c7f0ac8d5d..d01153ec0d 100644
--- a/client/gui-sdl3/gui_main.c
+++ b/client/gui-sdl3/gui_main.c
@@ -1358,5 +1358,4 @@ void setup_gui_properties(void)
   gui_properties.animations = FALSE;
   gui_properties.views.isometric = TRUE;
   gui_properties.views.overhead = TRUE;
-  gui_properties.views.d3 = FALSE;
 }
diff --git a/client/gui_properties.h b/client/gui_properties.h
index de4ff859d7..63bad04ecc 100644
--- a/client/gui_properties.h
+++ b/client/gui_properties.h
@@ -22,7 +22,6 @@ struct client_properties {
   struct {
     bool isometric;
     bool overhead;
-    bool d3;
   } views;
 };
 
diff --git a/client/tilespec.c b/client/tilespec.c
index c7d59a1306..51a649cd4e 100644
--- a/client/tilespec.c
+++ b/client/tilespec.c
@@ -2101,9 +2101,6 @@ static struct tileset *tileset_read_toplevel(const char *tileset_name,
   case TS_OVERHEAD:
     vsup = gui_properties.views.overhead;
     break;
-  case TS_3D:
-    vsup = gui_properties.views.d3;
-    break;
   }
 
   if (!vsup) {
diff --git a/client/tilespec.h b/client/tilespec.h
index a9371db12e..ce02590be0 100644
--- a/client/tilespec.h
+++ b/client/tilespec.h
@@ -50,8 +50,6 @@ struct resource_type;
 #define SPECENUM_VALUE0NAME N_("Overhead")
 #define SPECENUM_VALUE1 TS_ISOMETRIC
 #define SPECENUM_VALUE1NAME N_("Isometric")
-#define SPECENUM_VALUE2 TS_3D
-#define SPECENUM_VALUE2NAME N_("3D")
 #include "specenum_gen.h"
 
 #define SPECENUM_NAME fog_style
diff --git a/configure.ac b/configure.ac
index f4a52a8e8e..f55b6a9784 100644
--- a/configure.ac
+++ b/configure.ac
@@ -499,17 +499,6 @@ for gui in $(echo $clients | $SED 's/,/ /g') ; do
   fi
 done
 
-AC_ARG_WITH([3d],
-  [AS_HELP_STRING([--with-3d], [build WIP 3D support to gtk3.22-client])],
-  [AC_DEFINE([GTK3_3D_ENABLED], [1], [3D support built to gtk3.22-client])
-   enable_3d=true])
-
-gui_3d_libs=""
-if test x$enable_3d = xtrue ; then
-  AC_CHECK_LIB([GL], [glBegin], [gui_3d_libs="-lGL"],
-               [AC_MSG_ERROR([libGL needed for 3D support not found])])
-fi
-
 AC_ARG_ENABLE([gitrev],
   AS_HELP_STRING([--enable-gitrev], [get git revision to version information]),
 [case "${enableval}" in
@@ -1444,7 +1433,6 @@ AC_DEFINE_UNQUOTED([AI_MOD_DEFAULT], ["${default_ai_set}"], [Default ai type nam
 AM_CONDITIONAL([SRV_LIB],
   [test "x$server" = "xyes" || test "x$fcmanual" = "xyes" || test "x$ruledit" = "xyes" || test "x$fcruleup" = "xyes"])
 
-AC_SUBST([gui_3d_libs])
 AC_SUBST([gui_gtk3_22_cflags])
 AC_SUBST([gui_gtk3_22_libs])
 AC_SUBST([gui_gtk3_22_ldflags])
diff --git a/data/3d.tilespec b/data/3d.tilespec
deleted file mode 100644
index e6406c1914..0000000000
--- a/data/3d.tilespec
+++ /dev/null
@@ -1,375 +0,0 @@
-[tilespec]
-
-; Format and options of this tilespec file:
-options = "+Freeciv-tilespec-3.3-Devel-2024-Nov-16"
-
-; A simple name for the tileset specified by this file:
-name = "Trident"
-priority = 5
-
-; There`s no separate versioning in tilesets part of main freeciv distribution
-;version = ""
-
-; Summary and full description of the tileset.
-summary = _("Basic small overhead tileset.")
-;description = ""
-
-; TODO: add more overall information fields on tiles,
-; eg, authors, colors, etc.
-
-; What is the primary ruleset this tileset is meant for.
-;for_ruleset = ""
-
-; Basic tile sizes:
-normal_tile_width  = 30
-normal_tile_height = 30
-small_tile_width   = 15
-small_tile_height  = 20
-
-; The height svg flags should be drawn to, if they are used
-svg_height = 44
-
-; Basic tile style.
-type = "3D"
-is_hex = FALSE
-
-; Was old iso style
-fog_style      = "Darkness"
-
-; Was darkness style "CardinalFull" (15 sprites)
-darkness_style = "Corner"
-
-; offset the flags by this amount when drawing units
-unit_flag_offset_x = 0
-unit_flag_offset_y = 0
-city_flag_offset_x = 0
-city_flag_offset_y = 0
-
-; offset the city occupied sprite by this amount
-occupied_offset_x = 0
-occupied_offset_y = 0
-
-; offset the units by this amount
-unit_offset_x = 0
-unit_offset_y = 0
-
-; offset of the normal activity icons
-activity_offset_x = 0
-activity_offset_y = 0
-
-; offset of the selected unit sprites
-select_offset_x = 0
-select_offset_y = 0
-
-; offset of the unit stack size number sprites
-stack_size_offset_x = 0
-stack_size_offset_y = 0
-
-; offset the cities by this amount
-city_offset_x = 0
-city_offset_y = 0
-
-; offset the city size number by this amount
-; This is relative to full sprite origin.
-city_size_offset_x = 0
-city_size_offset_y = 0
-
-; offset the city bar text by this amount (from the city tile origin)
-citybar_offset_y = 27
-
-; offset the tile label text by this amount
-tilelabel_offset_y = 10
-
-; offset the upkeep icons by this amount from the top of the unit itself.
-; The default is the normal tile height, which means that the upkeep icons
-; appear below the unit icon if the unit icons are equal to tile height
-; (typical in overhead tileset), or overlay lower part of the unit icon,
-; if unit icon is higher than tiles (typical in iso tilesets)
-;unit_upkeep_offset_y = 0
-
-; Like unit_upkeep_offset_y, but to be used in case there`s only small
-; space for the overall icon produced. Defaults to unit_upkeep_offset_y -
-; not having alternative layout.
-; Set it to overlay lower part of the unit icon instead of taking extra
-; space below.
-unit_upkeep_small_offset_y = 20
-
-; For tilesets with oriented units, the directional sprite to use to
-; represent a unit type rather than a specific unit from the map
-; (e.g., in worklists, editor, and online help). Does not have to be a
-; valid direction for the tileset.
-;unit_default_orientation = "s"
-
-; How long (number of refreshes) it takes to move from an animation
-; frame to the next.
-time_per_frame = 3
-
-; The map is rendered in "layers", just like any decent image editor
-; supports. The setting below allows to change the layer drawing order. The
-; first layer in the list will be drawn below the others; the second on top
-; of it, and so on. No layer can be omitted from the list, nor can new ones
-; be added.
-;layer_order =
-;  "Background", ; Background color (if enabled, the player color where there
-;                ; are units or cities). You probably want to leave this
-;                ; first.
-;  "Terrain1",   ; The three terrain layers. See sections [layerN] below.
-;  "Darkness",   ; Darkness (unseen tiles)
-;  "Terrain2",
-;  "Terrain3",
-;  "Water",      ; All extras with "River" style.
-;  "Roads",      ; All extras with style "RoadAllSeparate",
-;                ; "RoadParityCombined" or "RoadAllCombined".
-;  "Special1",   ; 1st layer for extras with style "3Layers", "Single2" or
-;                ; "Single1".
-;  "Grid1",      ; Grid layer for isometric tilesets.
-;  "City1",      ; City and walls.
-;  "Special2",   ; 2nd layer for extras with "3Layers" and "Single2" styles.
-;  "Fog",        ; Fog of war (on tiles one knows but doesn`t see).
-;  "Unit",       ; Units except the selected one(s).
-;  "Special3",   ; 3rd layer for extras with "3Layers" style, and base flags.
-;  "City2",      ; City size when the city bar is disabled.
-;  "Grid2",      ; Second grid layer (overhead tilesets only).
-;  "Overlays",   ; Tile output sprites.
-;  "TileLabel",  ; Tile labels ("Scorched spot").
-;  "CityBar",    ; The city bar with name, production, food, ...
-;  "FocusUnit",  ; The focused unit(s).
-;  "Goto",       ; Goto turn count and intermediate points, *not* goto lines.
-;  "WorkerTask", ; The unit task indicators ("G", "S", ...).
-;  "Editor",     ; Editor stuff (selected tile and start points).
-;  "InfraWork"   ; Icons for the extras being placed.
-
-; This is special because it gets freed and reloaded as required:
-main_intro_file    = "misc/intro"
-
-; Below, the graphics spec files; must be somewhere (anywhere) in
-; the data path. Order may be important for color allocation on
-; low-color systems, and if there are any duplicate tags (lattermost
-; tag is used).
-files =
-  "misc/overlays.spec",
-  "misc/citybar.spec",
-  "trident/tiles.spec",
-  "trident/earth.spec",
-  "misc/small.spec",
-  "misc/events.spec",
-  "misc/governments.spec",
-  "misc/specialists.spec",
-  "trident/units.spec",
-  "trident/select.spec",
-  "misc/flags.spec",
-  "misc/shields.spec",
-  "misc/cursors.spec",
-  "trident/grid.spec",
-  "trident/roads.spec",
-  "misc/buildings.spec",
-  "misc/space.spec",
-  "misc/techs.spec",
-  "misc/treaty.spec",
-  "misc/icons.spec",
-  "misc/editor.spec",
-  "trident/fog.spec",
-  "trident/cities.spec",
-  "trident/explosions.spec"
-
-
-; Include color definitions
-*include "misc/colors.tilespec"
-
-; Terrain info - see README.graphics
-
-[layer0]
-match_types = "desert", "forest", "grassland", "hills", "jungle", "mountains", "water", "plains", "swamp", "tundra"
-
-[layer1]
-match_types = "water", "land"
-
-[layer2]
-match_types = "water", "arctic"
-
-; Water graphics referenced by terrain.ruleset
-;
-[tile_coast]
-tag = "coast"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "water"
-layer0_match_with = "water"
-layer0_sprite_type = "corner"
-layer1_match_type = "water"
-layer1_match_with = "water"
-layer2_match_type = "water"
-layer2_match_with = "water"
-
-[tile_floor]
-tag = "floor"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "water"
-layer0_match_with = "water"
-layer0_sprite_type = "corner"
-layer1_match_type = "water"
-layer1_match_with = "water"
-layer2_match_type = "water"
-layer2_match_with = "water"
-
-[tile_lake]
-tag = "lake"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "water"
-layer0_match_with = "water"
-layer0_sprite_type = "corner"
-layer1_match_type = "water"
-layer1_match_with = "water"
-layer2_match_type = "water"
-layer2_match_with = "water"
-
-[tile_inaccessible]
-tag = "inaccessible"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "water"
-layer0_match_with = "water"
-layer0_sprite_type = "corner"
-layer1_match_type = "water"
-layer1_match_with = "water"
-layer2_match_type = "water"
-layer2_match_with = "water"
-
-; Land graphics referenced by terrain.ruleset
-;
-[tile_arctic]
-tag = "arctic"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "tundra"
-layer0_match_with = "tundra"
-layer1_match_type = "water"
-layer1_match_with = "water"
-layer2_match_type = "arctic"
-
-[tile_desert]
-tag = "desert"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "desert"
-layer0_match_with = "desert"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_forest]
-tag = "forest"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "forest"
-layer0_match_with = "forest"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_grassland]
-tag = "grassland"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "grassland"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_hills]
-tag = "hills"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "hills"
-layer0_match_with = "hills"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_jungle]
-tag = "jungle"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "jungle"
-layer0_match_with = "jungle"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_mountains]
-tag = "mountains"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "mountains"
-layer0_match_with = "mountains"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_plains]
-tag = "plains"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "plains"
-layer0_match_with = "plains"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_swamp]
-tag = "swamp"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "swamp"
-layer0_match_with = "swamp"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[tile_tundra]
-tag = "tundra"
-blend_layer = 0
-num_layers = 3
-layer0_match_type = "tundra"
-layer0_match_with = "tundra"
-layer1_match_type = "land"
-layer2_match_type = "water"
-
-[extras]
-styles =
-    { "name",          "style"
-      "road.road",     "RoadParityCombined"
-      "road.rail",     "RoadParityCombined"
-      "road.maglev",   "RoadParityCombined"
-      "road.river",    "River"
-      "tx.irrigation", "Cardinals"
-      "tx.farmland",   "Cardinals"
-      "tx.mine",       "Single1"
-      "tx.oil_mine",   "Single1"
-      "tx.oil_rig",    "Single1"
-      "tx.pollution",  "Single2"
-      "tx.fallout",    "Single2"
-      "tx.village",    "Single1"
-      "base.outpost",  "3Layer"
-      "base.fortress", "3Layer"
-      "base.airstrip", "3Layer"
-      "base.airbase",  "3Layer"
-      "base.buoy",     "3Layer"
-      "extra.ruins",   "3Layer"
-      "ts.gold",       "Single1"
-      "ts.iron",       "Single1"
-      "ts.tundra_game", "Single1"
-      "ts.furs",       "Single1"
-      "ts.coal",       "Single1"
-      "ts.fish",       "Single1"
-      "ts.fruit",      "Single1"
-      "ts.gems",       "Single1"
-      "ts.buffalo",    "Single1"
-      "ts.wheat",      "Single1"
-      "ts.oasis",      "Single1"
-      "ts.peat",       "Single1"
-      "ts.pheasant",   "Single1"
-      "ts.grassland_resources", "Single1"
-      "ts.arctic_ivory", "Single1"
-      "ts.silk",       "Single1"
-      "ts.spice",      "Single1"
-      "ts.whales",     "Single1"
-      "ts.wine",       "Single1"
-      "ts.oil",        "Single1"
-      "ts.horses",     "Single1"
-      "ts.seals",      "Single1"
-    }
-- 
2.45.2

