From: TerminalHash Date: Tue, 15 Jun 2021 09:55:56 +0000 (+0300) Subject: fpc 3.2 fixes and rpm spec. X-Git-Url: https://deadsoftware.ru/gitweb?p=d2df-editor.git;a=commitdiff_plain;h=d352fdd3066532486d406dea4cb2dc629748f924 fpc 3.2 fixes and rpm spec. --- 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 0000000..70dc242 Binary files /dev/null and b/rpm/res/doom2df-editor.png differ 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;