From d352fdd3066532486d406dea4cb2dc629748f924 Mon Sep 17 00:00:00 2001 From: TerminalHash Date: Tue, 15 Jun 2021 12:55:56 +0300 Subject: [PATCH] fpc 3.2 fixes and rpm spec. --- rpm/d2df-editor.spec | 83 +++++++++++++++++++++++++++++++ rpm/res/doom2df-editor.png | Bin 0 -> 979 bytes rpm/res/doom2df_editor.desktop | 12 +++++ src/lib/vampimg/ImagingPcx.pas | 5 +- src/lib/vampimg/ImagingTypes.pas | 8 ++- 5 files changed, 102 insertions(+), 6 deletions(-) create mode 100755 rpm/d2df-editor.spec create mode 100644 rpm/res/doom2df-editor.png create mode 100755 rpm/res/doom2df_editor.desktop diff --git a/rpm/d2df-editor.spec b/rpm/d2df-editor.spec new file mode 100755 index 0000000..dff2dc7 --- /dev/null +++ b/rpm/d2df-editor.spec @@ -0,0 +1,83 @@ +# +# Doom2D Forever spec file. It's a official build of editor for Linux. +# Maintainer: Dmitry Lyashuk +# +# Copyright (C) Doom 2D: Forever Developers +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, version 3 of the License ONLY. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +# + +Name: d2dforever +Version: v0.667 +Release: %mkrel 1 +Summary: Doom-themed platformer with network play +Source0: doom2df-editor.png +Source1: doom2df_editor.desktop +URL: http://doom2d.org + +BuildRequires: fpc lazarus + +Group: Games/Arcade +License: GPLv3 +Provides: d2df-editor + +%description +Doom-themed platformer with network play, modern port of the 1996 Doom 2D by Prikol Software. Package contains main binary, headless binary and editor binary with icons and desktop files. Manual (man d2df) included. + +%prep + +# Editor sources. +cd .. +git clone http://repo.or.cz/d2df-editor.git +cd d2df-editor +mkdir bin +mkdir tmp + +%build +cd d2df-editor/src/editor + +# Editor bin. +export D2DF_BUILD_HASH="$(git rev-parse HEAD)" +lazbuild --bm=Debug Editor.lpi + +%install + +# Create directories. +install -dm755 %{buildroot}/{usr/{bin,share/pixmaps}} +install -dm755 %{buildroot}/usr/share/doom2df + +# Installing files. +# Editor. +cd ../.. +cd d2df-editor/bin +install -D -m755 editor %{buildroot}%{_bindir}/Editor + +# Other. +install -D -m644 %{SOURCE1} %{buildroot}/usr/share/pixmaps/doom2df-editor.png +install -D -m644 %{SOURCE3} %{buildroot}/usr/share/applications/doom2df_editor.desktop + +%clean +rm -Rf d2df-editor +rm -Rf %{buildroot} + +%files +%defattr(0755,root,root) + +# Binaries. +%{_bindir}/Editor + +# Icons. +/usr/share/pixmaps/doom2df-editor.png + +# Desktop files. +/usr/share/applications/doom2df_editor.desktop diff --git a/rpm/res/doom2df-editor.png b/rpm/res/doom2df-editor.png new file mode 100644 index 0000000000000000000000000000000000000000..70dc2421abc3229f8b7f576527c4cbf641aaa69d GIT binary patch literal 979 zcmV;^11$WBP)EX>4Tx04R}tkv&MmKpe$i(@I4u3U&~22w26zf~bh2R-p(LLaorMgUO{|(4-+r zad8w}3l4rPRvlcNb#-tR1i=pwH#a9m7b)?7Nufoo2gm(*ckglc4iIW3rdfe;K+|nA z8IOtS%&HiCMF2tcVhE!$vy3@ON}%odx`&UicTt|z{@kCVTg_Sw@QK8;%rI@@4dUrd z+u*!U9A*VsB|aw}GwFiFk6c$ge&d{XS>TyrGnJet4ik&{7FJrA6-D&>*{h@IUz7t(BXc@RC9?pyS1HK8AtdE>N#J&iAq7)K38aGjOFh{pA`k^GSNO zsYQ-}o^9abx~VC9z~v6m|76If>`H!`LM{iqpV2pEfWBLxYt8Gev5(USAVpmzZh(VB zU?fl3>uuiM+1lH`XBz$e0Bb~Yq;*v*-2eap24YJ`L;!vOQUG|4N9F+l000SaNLh0L z01FcU01FcV0GgZ_00007bV*G`2jv6@5F`n97(|)?00GZQL_t(o!|j%#a@#-#2fL^FD-0Q)FCZWYC$Af`GCB8w3Of7?dRskXI-uZD2!7{0s#Gn!A%!*P2m*8;#{8 zjwMGH@jr7!bJBg<{daGHgIZRn>I>7alf3R>Q50f&bz3@|*1|al=R8hM-oqyz zX_~GMLB(nWz&QtJEk>i!(v&`ikK_HdVrMPJlL|A$WvyZMj1JG?zUM!(-j?K0eD()Mmy9c_(d zo#Ai@?;Y-c-WOiruKBLsCH|6PIB^=bM{sBy~!F$N)1E~N2002ovPDHLkV1j5S BtAPLj literal 0 HcmV?d00001 diff --git a/rpm/res/doom2df_editor.desktop b/rpm/res/doom2df_editor.desktop new file mode 100755 index 0000000..61d9173 --- /dev/null +++ b/rpm/res/doom2df_editor.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Version=1.0 +Name=D2DF Map Editor +Name[ru]= Редактор карт D2DF +Exec=Doom2DF_E +Icon=doom2df-editor +Terminal=false +Type=Application +Categories=Game;Shooter;ActionGame +Comment=Powerful map editor for Doom 2D Forever. +Comment[ru]=Мощный редактор карт для Doom 2D Forever. +Keywords=Doom;Doom2D;Doom2D Forever;Forever;Shooter;Doom 2D; diff --git a/src/lib/vampimg/ImagingPcx.pas b/src/lib/vampimg/ImagingPcx.pas index d278542..b85b5d2 100644 --- a/src/lib/vampimg/ImagingPcx.pas +++ b/src/lib/vampimg/ImagingPcx.pas @@ -87,10 +87,7 @@ end; function TPCXFileFormat.LoadData(Handle: TImagingHandle; var Images: TDynImageDataArray; OnlyFirstLevel: Boolean): Boolean; -const - ifMono: TImageFormat = TImageFormat(250); - ifIndex2: TImageFormat = TImageFormat(251); - ifIndex4: TImageFormat = TImageFormat(252); + var Hdr: TPCXHeader; PalID, B: Byte; diff --git a/src/lib/vampimg/ImagingTypes.pas b/src/lib/vampimg/ImagingTypes.pas index 9c5e1f1..e38478b 100644 --- a/src/lib/vampimg/ImagingTypes.pas +++ b/src/lib/vampimg/ImagingTypes.pas @@ -251,7 +251,7 @@ type ifBTC = 203, ifATI1N = 204, ifATI2N = 205, - ifBinary = 206 + ifBinary = 206, { Passtrough formats } {ifETC1 = 220, ifETC2RGB = 221, @@ -259,7 +259,11 @@ type ifETC2PA = 223, ifDXBC6 = 224, ifDXBC7 = 225} - ); +); + { PCX formats} + ifMono = 250, + ifIndex2 = 251, + ifIndex4 = 252 { Color value for 32 bit images.} TColor32 = LongWord; -- 2.29.2