diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2020-02-17 01:16:38 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2020-02-17 01:16:38 +0000 |
commit | 53cba99042fa967e2a93da9f8db806fe2d035543 (patch) | |
tree | 9780d3b87dfc6bdebc6b7b7d15af1ecb813c6853 /games-puzzle/tod | |
parent | 71deace00d1a2b091313fe137ab7092418c6f87c (diff) |
gentoo resync : 17.02.2020
Diffstat (limited to 'games-puzzle/tod')
-rw-r--r-- | games-puzzle/tod/Manifest | 3 | ||||
-rw-r--r-- | games-puzzle/tod/files/tod-0-allegro.patch | 154 | ||||
-rw-r--r-- | games-puzzle/tod/tod-0-r2.ebuild (renamed from games-puzzle/tod/tod-0-r1.ebuild) | 9 |
3 files changed, 161 insertions, 5 deletions
diff --git a/games-puzzle/tod/Manifest b/games-puzzle/tod/Manifest index 5d5da4e54316..b99165c87011 100644 --- a/games-puzzle/tod/Manifest +++ b/games-puzzle/tod/Manifest @@ -1,4 +1,5 @@ +AUX tod-0-allegro.patch 5788 BLAKE2B a84cf4915524ba2060d77db2cf411d91e3e381be201d757f79c9827af31aa83288914510035ee21e34426b74c0771c44eb6a23898eb686035cea1f1612b963d9 SHA512 6e719bd7bfa7186e1ac22512af73bce659f5e52b728c795913ebea56f1c17cb3f76b5528857df291a9876c23dd7e49e8463019cb00ad6f5cf5455a90d62d59c4 AUX tod-0-makefile.patch 336 BLAKE2B 914b05d5bf298a3d60c6ac836ef45127c253859fa8b620adf5827abbc3dd3375c02eebd614ab79277bd3c52f7f383a4b4458e80d8fabd8549e4d49ca5702959f SHA512 efd342bfedacdb1dcd20d5a938a02c555c7d260bf9584a0d6d24c4aa0617df7ba8e37fdfacc5b0e0f600a2cae752e50347ba8b6992c5ba2dc22c1b62306e7438 DIST wintod.zip 115653 BLAKE2B 9c54be567954892eabc353bf5985579ff11fcb9e00304bf92792ef787bbaccf29084c68a58faae46229856fae103c4b27c462b62c2da489bfe635d474fd564ef SHA512 8cc203d9745cc4855c58c2f9119d06a1f02e1ecb9c1cc2c1dc1f1c77e5aa0553925bdcba3d744db462bbc77f3637a42e35a579a8807c8098aa2fde7452cc30cc -EBUILD tod-0-r1.ebuild 748 BLAKE2B a78c2a73d87c13263a8400df1312e2c9d02972d92a2882080a6801e1a7dac7c8bd6545ce8546bcbc31d8927888b4c09a673985316d4b637fa4cbca2f33f74071 SHA512 e3b4566e211a670b1fce84958e79d95dee9af188ce73ce415976fc835f44f77639b989e3c3c8ceaf8d6e1a768bd239364a1e14ca08d19171fd57ffe01e429612 +EBUILD tod-0-r2.ebuild 786 BLAKE2B 304ba9546a36a6154adbf3e3ef1ffb039601d03c8803a2fcc8b5c19638db00afdce17d6ba1c7457623742c52d3cdb58f22c8576d250fe3ed444f58f92dce88e9 SHA512 1a31186cd20e0db64d2cd996b513fcf1ff72f56fc8344221d665abec4063feb71d81eddfb6ea23263e81e13591738dfce89187816a5387cc2b6268e75ab7d26f MISC metadata.xml 249 BLAKE2B 7113a758d7abc93accec998a8843d8ef51ca8b72d72e659e224d5cec2a1a6a63e6c0605958091532ac6e51fa0d501ca4fd9f3f4a9e55baeb31519a02971b465f SHA512 895577c3a805c40581da03057b94e3f28f05f23012bf350c1e3575847d1a0fe40bb044a46f909012a200d991a400f6389358a60e9c2b5bef0da01fb26f846118 diff --git a/games-puzzle/tod/files/tod-0-allegro.patch b/games-puzzle/tod/files/tod-0-allegro.patch new file mode 100644 index 000000000000..8b84a16dd9a3 --- /dev/null +++ b/games-puzzle/tod/files/tod-0-allegro.patch @@ -0,0 +1,154 @@ +From a8be33cd50b5f477f047e845426047da332d6273 Mon Sep 17 00:00:00 2001 +From: Stefan Strogin <steils@gentoo.org> +Date: Fri, 14 Feb 2020 03:55:13 +0200 +Subject: [PATCH] Fix fixed point math functions (from media-libs/allegro) + +Bug: https://bugs.gentoo.org/697090 +Upstream-Status: Inappropriate [no upstream] +Signed-off-by: Stefan Strogin <steils@gentoo.org> +--- + hgrcos.c | 2 +- + rec.c | 58 ++++++++++++++++++++++++++++---------------------------- + 2 files changed, 30 insertions(+), 30 deletions(-) + +diff --git a/hgrcos.c b/hgrcos.c +index c65b469..442b18f 100644 +--- a/hgrcos.c ++++ b/hgrcos.c +@@ -34,5 +34,5 @@ fixed hgrsin(fixed theta) +
+ fixed hgrtan(fixed theta)
+ {
+- return fdiv(hgrcos(theta + 0xc00000), hgrcos(theta));
++ return fixdiv(hgrcos(theta + 0xc00000), hgrcos(theta));
+ }
+diff --git a/rec.c b/rec.c +index bf6df2e..d02830a 100644 +--- a/rec.c ++++ b/rec.c +@@ -214,7 +214,7 @@ void SetupLight1(void) + {
+ if(line[x] == c1)
+ {
+- fixed f = fsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)); /* between 0 and 2 */
++ fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)); /* between 0 and 2 */
+ fixed cosine = hgrcos(f << 10);
+ unsigned c = (cosine + 0x10000 + rand() % 0x1000) * 15 / 32768;
+ if(c > 63)
+@@ -223,8 +223,8 @@ void SetupLight1(void) + }
+ else if(line[x] == c2)
+ {
+- fixed f = fsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) +
+- (fcos(x << 20) + fcos(y << 20)) / 64 + 0x10000;
++ fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) +
++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x10000;
+ /* between 0 and 4 */
+ fixed cosine = hgrcos(f << 11);
+ unsigned c = (cosine + 0x10000 + rand() % 0x1000) * 15 / 32768;
+@@ -264,10 +264,10 @@ void ThetaLight(fixed theta) + * 3 4
+ * 567
+ */
+- zpixel[1] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, s);
+- zpixel[3] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x10000 - c);
+- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c);
+- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x10000 - s);
++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s);
++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x10000 - c);
++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c);
++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x10000 - s);
+
+ zpixel[0] = (zpixel[1] + zpixel[3])/2;
+ zpixel[2] = (zpixel[1] + zpixel[4])/2;
+@@ -304,20 +304,20 @@ void InitSidesPhi(Seven *seven, fixed phi, fixed zBase) + fixed m, zCos;
+ int scanlineWidth = 160 / nPlayers;
+
+- if(fcos(phi) == 0)
++ if(fixcos(phi) == 0)
+ {
+ phi -= 0x8000;
+ }
+- zCos = fdiv(zBase, hgrcos(phi));
++ zCos = fixdiv(zBase, hgrcos(phi));
+ m = hgrtan(phi);
+
+ for(i = 0; i < wHt; i++)
+ {
+- fixed scanline = fdiv(i - wHt / 2, wHt / 2);
+- fixed mline = fmul(m, scanline);
+- fixed zLine = fmul(zCos, scanline);
+- fixed y1 = fdiv(zLine, mline + 0x10000);
+- fixed x1 = fdiv(zBase, mline + 0x10000);
++ fixed scanline = fixdiv(i - wHt / 2, wHt / 2);
++ fixed mline = fixmul(m, scanline);
++ fixed zLine = fixmul(zCos, scanline);
++ fixed y1 = fixdiv(zLine, mline + 0x10000);
++ fixed x1 = fixdiv(zBase, mline + 0x10000);
+
+ if(x1 < 0)
+ {
+@@ -391,10 +391,10 @@ void RotateSides(Seven *seven, int theta) + ly = seven->leftY[i];
+ ry = seven->rightY[i];
+
+- seven->leftX[i] = fmul(lx, c) - fmul(ly, s);
+- seven->rightX[i] = fmul(rx, c) - fmul(ry, s);
+- seven->leftY[i] = fmul(ly, c) + fmul(lx, s);
+- seven->rightY[i] = fmul(ry, c) + fmul(rx, s);
++ seven->leftX[i] = fixmul(lx, c) - fixmul(ly, s);
++ seven->rightX[i] = fixmul(rx, c) - fixmul(ry, s);
++ seven->leftY[i] = fixmul(ly, c) + fixmul(lx, s);
++ seven->rightY[i] = fixmul(ry, c) + fixmul(rx, s);
+ }
+ }
+
+@@ -405,10 +405,10 @@ void ScaleSides(Seven *seven, int fac) +
+ for(i = 0; i < wHt; i++)
+ {
+- seven->leftX[i] = fmul(seven->leftX[i], fac);
+- seven->leftY[i] = fmul(seven->leftY[i], fac);
+- seven->rightX[i] = fmul(seven->rightX[i], fac);
+- seven->rightY[i] = fmul(seven->rightY[i], fac);
++ seven->leftX[i] = fixmul(seven->leftX[i], fac);
++ seven->leftY[i] = fixmul(seven->leftY[i], fac);
++ seven->rightX[i] = fixmul(seven->rightX[i], fac);
++ seven->rightY[i] = fixmul(seven->rightY[i], fac);
+ }
+ }
+
+@@ -446,22 +446,22 @@ void DisplaceScanlines(Seven *seven, int ticks, + {
+ y = i - wHt / 2;
+ xOff = ((a * y / wHt + b) * y / wHt + c) * y / wHt + d +
+- fmul(hgrcos(theta), amplitude);
+- xOff += fmul((rand() & 0x7ff) - 0x400, noise);
++ fixmul(hgrcos(theta), amplitude);
++ xOff += fixmul((rand() & 0x7ff) - 0x400, noise);
+ theta += dtheta;
+ heatTheta += dheat;
+
+- yOff = fmul(hgrsin(heatTheta), heat);
++ yOff = fixmul(hgrsin(heatTheta), heat);
+
+ lx = seven->leftX[i];
+ rx = seven->rightX[i];
+ ly = seven->leftY[i];
+ ry = seven->rightY[i];
+
+- seven->leftX[i] = lx + fmul(rx - lx, xOff) - fmul(ry - ly, yOff);
+- seven->rightX[i] = rx + fmul(rx - lx, xOff) - fmul(ry - ly, yOff);
+- seven->leftY[i] = ly + fmul(ry - ly, xOff) + fmul(rx - lx, yOff);
+- seven->rightY[i] = ry + fmul(ry - ly, xOff) + fmul(rx - lx, yOff);
++ seven->leftX[i] = lx + fixmul(rx - lx, xOff) - fixmul(ry - ly, yOff);
++ seven->rightX[i] = rx + fixmul(rx - lx, xOff) - fixmul(ry - ly, yOff);
++ seven->leftY[i] = ly + fixmul(ry - ly, xOff) + fixmul(rx - lx, yOff);
++ seven->rightY[i] = ry + fixmul(ry - ly, xOff) + fixmul(rx - lx, yOff);
+ }
+ }
+
+-- +2.25.0 + diff --git a/games-puzzle/tod/tod-0-r1.ebuild b/games-puzzle/tod/tod-0-r2.ebuild index 0ed9a29063f0..9de46566b137 100644 --- a/games-puzzle/tod/tod-0-r1.ebuild +++ b/games-puzzle/tod/tod-0-r2.ebuild @@ -1,7 +1,8 @@ -# Copyright 1999-2018 Gentoo Foundation +# Copyright 1999-2020 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 -EAPI=6 +EAPI=7 + inherit desktop DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" @@ -15,14 +16,14 @@ IUSE="" RDEPEND="media-libs/allegro:0[X]" DEPEND="${RDEPEND} - app-arch/unzip -" + app-arch/unzip" S="${WORKDIR}" src_prepare() { default eapply "${FILESDIR}"/${P}-makefile.patch + eapply "${FILESDIR}"/${P}-allegro.patch sed -i \ -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ rec.c || die |