summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Pavlov2024-01-16 02:16:34 +0300
committerAlexander Pavlov2024-01-16 02:16:34 +0300
commit8e8e73b980ce1abf8f5b829ea8b5471faaec6e0f (patch)
tree0d4009bc867a5b113da73c981ae67bb840038018
parent3b96595ddc7f477bbfc9180f952bcc3112d464ba (diff)
downloadaur-serioussam-vk.tar.gz
Fix broken texture effects
-rw-r--r--.SRCINFO4
-rw-r--r--0001-Fix-broken-texture-effects.patch161
-rw-r--r--PKGBUILD19
3 files changed, 178 insertions, 6 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 163f54a484e8..750a61265aff 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = serioussam-vk
pkgdesc = Serious Sam Classic native Linux version with Vulkan support.
pkgver = 1.10.6
- pkgrel = 3
+ pkgrel = 4
url = https://github.com/tx00100xt/SeriousSamClassic-VK
install = serioussam.install
arch = i686
@@ -21,8 +21,10 @@ pkgbase = serioussam-vk
source = serioussam-tfe.desktop
source = serioussam-tse.desktop
source = serioussam.xpm
+ source = 0001-Fix-broken-texture-effects.patch
sha256sums = 2891c4890810ce156bb3e7e30e6b6de9ab21ff51380709de9f329ac3c48edde1
sha256sums = 1e36d7b0d11f68729aa5c79ac9a44157d4af0bf61060040ab92a37d96ca89aba
sha256sums = 49680c65d26b264a1d7735c6310fcc5d0ac0e0e56273d3bccf539c0c87d31b2b
sha256sums = 1fd56e04072372e1e8dab0bae40da1519d82a28895cbe5661b18561ee9ea47b4
+ sha256sums = f0408905078ec16d0b2a6f3dfbdadd37e475fe03d595d46633fab948ffbbe439
pkgname = serioussam-vk
diff --git a/0001-Fix-broken-texture-effects.patch b/0001-Fix-broken-texture-effects.patch
new file mode 100644
index 000000000000..9bcb66c8b83e
--- /dev/null
+++ b/0001-Fix-broken-texture-effects.patch
@@ -0,0 +1,161 @@
+From d2c7cc22d2b62e971bafad05568639e3f5965342 Mon Sep 17 00:00:00 2001
+From: Alexander Pavlov <t.x00100x.t@yandex.ru>
+Date: Wed, 20 Dec 2023 23:36:34 +0300
+Subject: [PATCH] Fix broken texture effects.
+
+---
+ .../Engine/Graphics/TextureEffects.cpp | 24 +++++++++----------
+ .../Engine/Graphics/TextureEffects.cpp | 24 +++++++++----------
+ 2 files changed, 24 insertions(+), 24 deletions(-)
+
+diff --git a/SamTFE/Sources/Engine/Graphics/TextureEffects.cpp b/SamTFE/Sources/Engine/Graphics/TextureEffects.cpp
+index 2670de2..42a1ba5 100644
+--- a/SamTFE/Sources/Engine/Graphics/TextureEffects.cpp
++++ b/SamTFE/Sources/Engine/Graphics/TextureEffects.cpp
+@@ -269,10 +269,10 @@ void AnimateRandomSurfer(CTextureEffectSource *ptes)
+ Surfer &sf =
+ (*((Surfer *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+
+- PutPixel9SLONG_WATER((long) sf.fU, (long) sf.fV, 125);
++ PutPixel9SLONG_WATER(sf.fU, sf.fV, 125);
+ sf.fU += 2*sin(sf.fAngle);
+ sf.fV += 2*cos(sf.fAngle);
+- PutPixel9SLONG_WATER((long) sf.fU, (long) sf.fV, 250);
++ PutPixel9SLONG_WATER(sf.fU, sf.fV, 250);
+
+ if((RNDW&15)==0) {
+ sf.fAngle += 3.14f/7.0f;
+@@ -326,7 +326,7 @@ void AnimateRaindrops(CTextureEffectSource *ptes, int iHeight)
+ rd.iIndex++;
+
+ if (rd.iIndex < 8) {
+- PutPixel9SLONG_WATER(rd.pixU, rd.pixV, (long) sin(rd.iIndex/4.0f*(-3.14f))*rd.iHeight);
++ PutPixel9SLONG_WATER(rd.pixU, rd.pixV, sin(rd.iIndex/4.0f*(-3.14f))*rd.iHeight);
+ }
+ } else {
+ rd.pixU = RNDW&(_pixBufferWidth -1);
+@@ -369,7 +369,7 @@ void AnimateOscilator(CTextureEffectSource *ptes)
+ {
+ Oscilator &os =
+ (*((Oscilator *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+- PutPixel9SLONG_WATER(os.pixU, os.pixV, (long) sin(os.fAngle)*150);
++ PutPixel9SLONG_WATER(os.pixU, os.pixV, sin(os.fAngle)*150);
+ os.fAngle += (3.14f/6);
+ }
+
+@@ -403,7 +403,7 @@ void AnimateVertLine(CTextureEffectSource *ptes)
+ (*((VertLine *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+ PIX pixV = vl.pixV;
+ for (int iCnt=0; iCnt<vl.uwSize; iCnt++) {
+- PutPixelSLONG_WATER(vl.pixU, pixV, (long) (sin(vl.fAngle)*25));
++ PutPixelSLONG_WATER(vl.pixU, pixV, (sin(vl.fAngle)*25));
+ pixV = (pixV+1)&(_pixBufferHeight-1);
+ }
+ vl.fAngle += (3.14f/6);
+@@ -439,7 +439,7 @@ void AnimateHortLine(CTextureEffectSource *ptes)
+ (*((HortLine *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+ PIX pixU = hl.pixU;
+ for (int iCnt=0; iCnt<hl.uwSize; iCnt++) {
+- PutPixelSLONG_WATER(pixU, hl.pixV, (long) (sin(hl.fAngle)*25));
++ PutPixelSLONG_WATER(pixU, hl.pixV, (sin(hl.fAngle)*25));
+ pixU = (pixU+1)&(_pixBufferWidth-1);
+ }
+ hl.fAngle += (3.14f/6);
+@@ -622,14 +622,14 @@ void AnimateFireRoler(CTextureEffectSource *ptes)
+ {
+ FireRoler &fr =
+ (*((FireRoler *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+- PutPixel9UBYTE_FIRE((long) (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
+- (long) (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 255);
++ PutPixel9UBYTE_FIRE( (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
++ (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 255);
+ fr.fAngle += fr.fAngleAdd;
+- PutPixel9UBYTE_FIRE((long) (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
+- (long) (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 200);
++ PutPixel9UBYTE_FIRE( (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
++ (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 200);
+ fr.fAngle += fr.fAngleAdd;
+- PutPixel9UBYTE_FIRE((long) (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
+- (long) (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 150);
++ PutPixel9UBYTE_FIRE( (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
++ (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 150);
+ fr.fAngle += fr.fAngleAdd;
+ }
+
+diff --git a/SamTSE/Sources/Engine/Graphics/TextureEffects.cpp b/SamTSE/Sources/Engine/Graphics/TextureEffects.cpp
+index 2670de2..42a1ba5 100644
+--- a/SamTSE/Sources/Engine/Graphics/TextureEffects.cpp
++++ b/SamTSE/Sources/Engine/Graphics/TextureEffects.cpp
+@@ -269,10 +269,10 @@ void AnimateRandomSurfer(CTextureEffectSource *ptes)
+ Surfer &sf =
+ (*((Surfer *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+
+- PutPixel9SLONG_WATER((long) sf.fU, (long) sf.fV, 125);
++ PutPixel9SLONG_WATER(sf.fU, sf.fV, 125);
+ sf.fU += 2*sin(sf.fAngle);
+ sf.fV += 2*cos(sf.fAngle);
+- PutPixel9SLONG_WATER((long) sf.fU, (long) sf.fV, 250);
++ PutPixel9SLONG_WATER(sf.fU, sf.fV, 250);
+
+ if((RNDW&15)==0) {
+ sf.fAngle += 3.14f/7.0f;
+@@ -326,7 +326,7 @@ void AnimateRaindrops(CTextureEffectSource *ptes, int iHeight)
+ rd.iIndex++;
+
+ if (rd.iIndex < 8) {
+- PutPixel9SLONG_WATER(rd.pixU, rd.pixV, (long) sin(rd.iIndex/4.0f*(-3.14f))*rd.iHeight);
++ PutPixel9SLONG_WATER(rd.pixU, rd.pixV, sin(rd.iIndex/4.0f*(-3.14f))*rd.iHeight);
+ }
+ } else {
+ rd.pixU = RNDW&(_pixBufferWidth -1);
+@@ -369,7 +369,7 @@ void AnimateOscilator(CTextureEffectSource *ptes)
+ {
+ Oscilator &os =
+ (*((Oscilator *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+- PutPixel9SLONG_WATER(os.pixU, os.pixV, (long) sin(os.fAngle)*150);
++ PutPixel9SLONG_WATER(os.pixU, os.pixV, sin(os.fAngle)*150);
+ os.fAngle += (3.14f/6);
+ }
+
+@@ -403,7 +403,7 @@ void AnimateVertLine(CTextureEffectSource *ptes)
+ (*((VertLine *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+ PIX pixV = vl.pixV;
+ for (int iCnt=0; iCnt<vl.uwSize; iCnt++) {
+- PutPixelSLONG_WATER(vl.pixU, pixV, (long) (sin(vl.fAngle)*25));
++ PutPixelSLONG_WATER(vl.pixU, pixV, (sin(vl.fAngle)*25));
+ pixV = (pixV+1)&(_pixBufferHeight-1);
+ }
+ vl.fAngle += (3.14f/6);
+@@ -439,7 +439,7 @@ void AnimateHortLine(CTextureEffectSource *ptes)
+ (*((HortLine *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+ PIX pixU = hl.pixU;
+ for (int iCnt=0; iCnt<hl.uwSize; iCnt++) {
+- PutPixelSLONG_WATER(pixU, hl.pixV, (long) (sin(hl.fAngle)*25));
++ PutPixelSLONG_WATER(pixU, hl.pixV, (sin(hl.fAngle)*25));
+ pixU = (pixU+1)&(_pixBufferWidth-1);
+ }
+ hl.fAngle += (3.14f/6);
+@@ -622,14 +622,14 @@ void AnimateFireRoler(CTextureEffectSource *ptes)
+ {
+ FireRoler &fr =
+ (*((FireRoler *) ptes->tes_tespEffectSourceProperties.tesp_achDummy));
+- PutPixel9UBYTE_FIRE((long) (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
+- (long) (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 255);
++ PutPixel9UBYTE_FIRE( (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
++ (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 255);
+ fr.fAngle += fr.fAngleAdd;
+- PutPixel9UBYTE_FIRE((long) (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
+- (long) (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 200);
++ PutPixel9UBYTE_FIRE( (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
++ (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 200);
+ fr.fAngle += fr.fAngleAdd;
+- PutPixel9UBYTE_FIRE((long) (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
+- (long) (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 150);
++ PutPixel9UBYTE_FIRE( (cos(fr.fAngle)*fr.fRadiusU + fr.pixU),
++ (sin(fr.fAngle)*fr.fRadiusV + fr.pixV), 150);
+ fr.fAngle += fr.fAngleAdd;
+ }
+
+--
+2.41.0
+
diff --git a/PKGBUILD b/PKGBUILD
index 5428f75fbbf9..b39a17e06761 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,11 +1,11 @@
-# Maintainer: Alexander <tx00100xt@yandex.ru>
-# Contributer: Alexander <tx00100xt@yandex.ru>>
+# Maintainer: Alexander <t.x00100x.t@yandex.ru>
+# Contributer: Alexander <t.x00100x.t@yandex.ru>>
pkgname=serioussam-vk
pkginstdir=serioussam
pkgver=1.10.6
_srcname="SeriousSamClassic-VK-$pkgver"
-pkgrel=3
+pkgrel=4
pkgdesc="Serious Sam Classic native Linux version with Vulkan support."
arch=('i686' 'x86_64')
url="https://github.com/tx00100xt/SeriousSamClassic-VK"
@@ -17,11 +17,13 @@ install=serioussam.install
source=("https://github.com/tx00100xt/SeriousSamClassic-VK/archive/refs/tags/v$pkgver.tar.gz"
"serioussam-tfe.desktop"
"serioussam-tse.desktop"
- "serioussam.xpm")
+ "serioussam.xpm"
+ "0001-Fix-broken-texture-effects.patch")
sha256sums=('2891c4890810ce156bb3e7e30e6b6de9ab21ff51380709de9f329ac3c48edde1'
'1e36d7b0d11f68729aa5c79ac9a44157d4af0bf61060040ab92a37d96ca89aba'
'49680c65d26b264a1d7735c6310fcc5d0ac0e0e56273d3bccf539c0c87d31b2b'
- '1fd56e04072372e1e8dab0bae40da1519d82a28895cbe5661b18561ee9ea47b4')
+ '1fd56e04072372e1e8dab0bae40da1519d82a28895cbe5661b18561ee9ea47b4'
+ 'f0408905078ec16d0b2a6f3dfbdadd37e475fe03d595d46633fab948ffbbe439')
if [[ $CARCH = "i686" ]]; then
_bits="32"
else
@@ -29,6 +31,9 @@ else
fi
prepare(){
+ # Prepare patch
+ cat 0001-Fix-broken-texture-effects.patch > "$srcdir/$_srcname/0001-Fix-broken-texture-effects.patch"
+
# Making building TFE scripts.
cd "$srcdir/$_srcname/SamTFE/Sources/"
sed -i 's/cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo/cmake -DCMAKE_BUILD_TYPE=Release/g' build-linux"$_bits".sh
@@ -39,6 +44,10 @@ prepare(){
cd "$srcdir/$_srcname/SamTSE/Sources/"
sed -i 's/cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo/cmake -DCMAKE_BUILD_TYPE=Release/g' build-linux"$_bits".sh
chmod 755 build-linux"$_bits".sh
+
+ # Fix broken texture effects
+ cd "$srcdir/$_srcname"
+ patch -p1 < 0001-Fix-broken-texture-effects.patch || return 1
}
build(){