initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

57
openttd-legacy/PKGBUILD Normal file
View File

@@ -0,0 +1,57 @@
# Maintainer: Jesus E. <heckyel@riseup.net>
_realpkgname=openttd
pkgname=$_realpkgname-legacy
pkgver=13.4
_debver=$pkgver
_debrel=1
pkgrel=1
pkgdesc="A free and libre transport-simulation game (legacy version)"
arch=('i686' 'x86_64')
url='https://github.com/OpenTTD/OpenTTD'
license=('GPL-2')
provides=('openttd')
conflicts=('openttd')
depends=('libpng' 'sdl2' 'icu' 'fontconfig' 'lzo'
'hicolor-icon-theme' 'desktop-file-utils' 'xz' 'fluidsynth'
'openttd-opengfx' 'openttd-opensfx' 'openttd-openmsx')
makedepends=('quilt' 'cmake' 'ninja')
groups=('games')
source=("${pkgname}-${pkgver}.tar.xz::https://deb.debian.org/debian/pool/main/o/openttd/openttd_${pkgver}.orig.tar.xz"
"https://deb.debian.org/debian/pool/main/o/openttd/openttd_${_debver}-${_debrel}.debian.tar.xz"
"remove-online-content.patch")
sha512sums=('84f57a39c0dade44f0e6153dff7a40eec0da8e2f892ce870d5f9e037f80daa5c7c46ff786fa51c3671366dd5056504cd7ccbc1c4e5bce8b2c5575533b454c001'
'05918ada5220187783e5d9cfc0b4dfba049acbd45cc0420c1b09c8274b685c989886f84a950e1f5689e67aa0fa3f46da63f1a2b91f1f48943ef3af346a26f404'
'93b25dae84f04253da81e01b11de513244e794a8d102b1546d48bcb277be53f9b070039df0da4dd82c48bb1c3800d94447a20497261a59a2f79196013d022a0f')
prepare() {
cd ${_realpkgname}-${pkgver}
if [[ ${pkgver%.*} = ${_debver%.*} ]]; then
# Debian patches
export QUILT_PATCHES=debian/patches
export QUILT_REFRESH_ARGS='-p ab --no-timestamps --no-index'
export QUILT_DIFF_ARGS='--no-timestamps'
mv "$srcdir"/debian .
quilt push -av
fi
patch -Np1 -i ${srcdir}/remove-online-content.patch
}
build() {
cmake \
-B build \
-S $_realpkgname-$pkgver \
-D CMAKE_BUILD_TYPE=Release \
-D CMAKE_INSTALL_PREFIX=/usr \
-D CMAKE_INSTALL_BINDIR=games \
-D CMAKE_INSTALL_DATADIR=/usr/share/games \
-G Ninja
ninja -C build
}
package() {
DESTDIR="$pkgdir" ninja -C build install
install -Dm644 $srcdir/$_realpkgname-$pkgver/COPYING.md -t "${pkgdir}/usr/share/licenses/$pkgname"
}

View File

@@ -0,0 +1,175 @@
--- a/src/intro_gui.cpp 2023-07-30 01:01:44.000000000 +0200
+++ b/src/intro_gui.cpp 2024-01-18 02:55:03.474253466 +0100
@@ -459,12 +459,10 @@
NWidget(NWID_SPACER), SetMinimalSize(0, 6),
- /* 'Check Online Content' and 'NewGRF Settings' buttons */
- NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_CONTENT_DOWNLOAD), SetMinimalSize(158, 12),
- SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT), SetPadding(0, 0, 0, 10), SetFill(1, 0),
- NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_GRF_SETTINGS), SetMinimalSize(158, 12),
- SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_INTRO_TOOLTIP_NEWGRF_SETTINGS), SetPadding(0, 10, 0, 0), SetFill(1, 0),
+ /* 'NewGRF Settings' button */
+ NWidget(NWID_HORIZONTAL),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_ORANGE, WID_SGI_GRF_SETTINGS), SetMinimalSize(316, 12),
+ SetDataTip(STR_INTRO_NEWGRF_SETTINGS, STR_INTRO_TOOLTIP_NEWGRF_SETTINGS), SetPadding(0, 10, 0, 10), SetFill(1, 0),
EndContainer(),
NWidget(NWID_SPACER), SetMinimalSize(0, 6),
--- a/src/network/core/config.cpp 2023-07-30 01:01:44.000000000 +0200
+++ b/src/network/core/config.cpp 2024-01-18 13:07:41.058571120 +0100
@@ -55,7 +55,7 @@
*/
const char *NetworkContentServerConnectionString()
{
- return GetEnv("OTTD_CONTENT_SERVER_CS", "content.openttd.org");
+ return GetEnv("OTTD_CONTENT_SERVER_CS", "");
}
/**
--- a/src/network/core/config.h 2023-07-30 01:01:44.000000000 +0200
+++ b/src/network/core/config.h 2024-01-18 10:48:04.285056804 +0100
@@ -18,13 +18,13 @@
const char *NetworkContentMirrorConnectionString();
/** URL of the HTTP mirror system */
-static const char * const NETWORK_CONTENT_MIRROR_URL = "/bananas";
+static const char * const NETWORK_CONTENT_MIRROR_URL = "";
static const uint16 NETWORK_COORDINATOR_SERVER_PORT = 3976; ///< The default port of the Game Coordinator server (TCP)
static const uint16 NETWORK_STUN_SERVER_PORT = 3975; ///< The default port of the STUN server (TCP)
static const uint16 NETWORK_TURN_SERVER_PORT = 3974; ///< The default port of the TURN server (TCP)
-static const uint16 NETWORK_CONTENT_SERVER_PORT = 3978; ///< The default port of the content server (TCP)
-static const uint16 NETWORK_CONTENT_MIRROR_PORT = 80; ///< The default port of the content mirror (TCP)
+static const uint16 NETWORK_CONTENT_SERVER_PORT = 0; ///< The default port of the content server (TCP)
+static const uint16 NETWORK_CONTENT_MIRROR_PORT = 0; ///< The default port of the content mirror (TCP)
static const uint16 NETWORK_DEFAULT_PORT = 3979; ///< The default port of the game server (TCP & UDP)
static const uint16 NETWORK_ADMIN_PORT = 3977; ///< The default port for admin network
static const uint16 NETWORK_DEFAULT_DEBUGLOG_PORT = 3982; ///< The default port debug-log is sent to (TCP)
--- a/src/newgrf_gui.cpp 2023-07-30 01:01:44.000000000 +0200
+++ b/src/newgrf_gui.cpp 2024-01-20 03:46:25.387026148 +0100
@@ -763,15 +763,6 @@
*size = maxdim(d, *size);
break;
}
-
- case WID_NS_CONTENT_DOWNLOAD:
- case WID_NS_CONTENT_DOWNLOAD2: {
- Dimension d = GetStringBoundingBox(STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_BUTTON);
- *size = maxdim(d, GetStringBoundingBox(STR_INTRO_ONLINE_CONTENT));
- size->width += padding.width;
- size->height += padding.height;
- break;
- }
}
}
@@ -1131,17 +1122,6 @@
}
break;
- case WID_NS_CONTENT_DOWNLOAD:
- case WID_NS_CONTENT_DOWNLOAD2:
- if (!_network_available) {
- ShowErrorMessage(STR_NETWORK_ERROR_NOTAVAILABLE, INVALID_STRING_ID, WL_ERROR);
- } else {
- this->CloseChildWindows(WC_QUERY_STRING); // Remove the parameter query window
-
- ShowMissingContentWindow(this->actives);
- }
- break;
-
case WID_NS_RESCAN_FILES:
case WID_NS_RESCAN_FILES2:
RequestNewGRFScan(this);
@@ -1315,14 +1295,7 @@
if (has_missing || has_compatible) {
widget_data = STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_BUTTON;
tool_tip = STR_NEWGRF_SETTINGS_FIND_MISSING_CONTENT_TOOLTIP;
- } else {
- widget_data = STR_INTRO_ONLINE_CONTENT;
- tool_tip = STR_INTRO_TOOLTIP_ONLINE_CONTENT;
}
- this->GetWidget<NWidgetCore>(WID_NS_CONTENT_DOWNLOAD)->widget_data = widget_data;
- this->GetWidget<NWidgetCore>(WID_NS_CONTENT_DOWNLOAD)->tool_tip = tool_tip;
- this->GetWidget<NWidgetCore>(WID_NS_CONTENT_DOWNLOAD2)->widget_data = widget_data;
- this->GetWidget<NWidgetCore>(WID_NS_CONTENT_DOWNLOAD2)->tool_tip = tool_tip;
this->SetWidgetDisabledState(WID_NS_PRESET_SAVE, has_missing);
}
@@ -1832,12 +1805,8 @@
SetDataTip(STR_NEWGRF_SETTINGS_UPGRADE, STR_NEWGRF_SETTINGS_UPGRADE_TOOLTIP),
EndContainer(),
- NWidget(NWID_VERTICAL, NC_EQUALSIZE), SetPadding(2, 2, 2, 2),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_RESCAN_FILES2), SetFill(1, 0), SetResize(1, 0),
- SetDataTip(STR_NEWGRF_SETTINGS_RESCAN_FILES, STR_NEWGRF_SETTINGS_RESCAN_FILES_TOOLTIP),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_CONTENT_DOWNLOAD2), SetFill(1, 0), SetResize(1, 0),
- SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
- EndContainer(),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_RESCAN_FILES2), SetFill(1, 0), SetResize(1, 0),
+ SetDataTip(STR_NEWGRF_SETTINGS_RESCAN_FILES, STR_NEWGRF_SETTINGS_RESCAN_FILES_TOOLTIP),
EndContainer(),
EndContainer(),
};
@@ -1866,11 +1835,8 @@
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE), SetPadding(2, 2, 2, 2), SetPIP(0, NWidgetNewGRFDisplay::INTER_COLUMN_SPACING, 0),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_ADD), SetFill(1, 0), SetResize(1, 0),
SetDataTip(STR_NEWGRF_SETTINGS_ADD, STR_NEWGRF_SETTINGS_ADD_FILE_TOOLTIP),
- NWidget(NWID_VERTICAL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_RESCAN_FILES), SetFill(1, 0), SetResize(1, 0),
- SetDataTip(STR_NEWGRF_SETTINGS_RESCAN_FILES, STR_NEWGRF_SETTINGS_RESCAN_FILES_TOOLTIP),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_CONTENT_DOWNLOAD), SetFill(1, 0), SetResize(1, 0),
- SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
+ NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_NS_RESCAN_FILES), SetFill(1, 0), SetResize(1, 0),
+ SetDataTip(STR_NEWGRF_SETTINGS_RESCAN_FILES, STR_NEWGRF_SETTINGS_RESCAN_FILES_TOOLTIP),
EndContainer(),
EndContainer(),
EndContainer(),
--- a/src/ai/ai_gui.cpp 2023-07-30 01:01:44.000000000 +0200
+++ b/src/ai/ai_gui.cpp 2024-01-20 04:26:25.040964928 +0100
@@ -705,7 +705,6 @@
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_AIC_CONTENT_DOWNLOAD), SetFill(1, 0), SetMinimalSize(279, 0), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
EndContainer(),
};
--- a/src/fios_gui.cpp 2023-07-30 01:01:44.000000000 +0200
+++ b/src/fios_gui.cpp 2024-01-20 04:29:24.551228214 +0100
@@ -106,11 +106,6 @@
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
EndContainer(),
- /* Online Content button */
- NWidget(NWID_SELECTION, INVALID_COLOUR, WID_SL_CONTENT_DOWNLOAD_SEL),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_CONTENT_DOWNLOAD), SetResize(1, 0),
- SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
- EndContainer(),
EndContainer(),
/* Right side : game details */
@@ -164,10 +159,8 @@
EndContainer(),
NWidget(NWID_VSCROLLBAR, COLOUR_GREY, WID_SL_SCROLLBAR),
EndContainer(),
- /* Online Content and Load button */
+ /* Load button */
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),
- NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_CONTENT_DOWNLOAD), SetResize(1, 0), SetFill(1, 0),
- SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
NWidget(WWT_PUSHTXTBTN, COLOUR_GREY, WID_SL_LOAD_BUTTON), SetResize(1, 0), SetFill(1, 0),
SetDataTip(STR_SAVELOAD_LOAD_BUTTON, STR_SAVELOAD_LOAD_HEIGHTMAP_TOOLTIP),
NWidget(WWT_RESIZEBOX, COLOUR_GREY),
--- a/src/game/game_gui.cpp 2023-07-30 01:01:44.000000000 +0200
+++ b/src/game/game_gui.cpp 2024-01-20 04:31:11.861385605 +0100
@@ -72,7 +72,6 @@
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GSC_TEXTFILE + TFT_CHANGELOG), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_CHANGELOG, STR_NULL),
NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GSC_TEXTFILE + TFT_LICENSE), SetFill(1, 0), SetResize(1, 0), SetDataTip(STR_TEXTFILE_VIEW_LICENCE, STR_NULL),
EndContainer(),
- NWidget(WWT_PUSHTXTBTN, COLOUR_YELLOW, WID_GSC_CONTENT_DOWNLOAD), SetFill(1, 0), SetResize(1, 0), SetMinimalSize(279, 0), SetPadding(0, 7, 9, 7), SetDataTip(STR_INTRO_ONLINE_CONTENT, STR_INTRO_TOOLTIP_ONLINE_CONTENT),
EndContainer(),
NWidget(NWID_HORIZONTAL),
NWidget(NWID_HORIZONTAL, NC_EQUALSIZE),