[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 64a0bdcc6ab271d8d3796b4029915d32a9b3fc1a Author: Sam James gentoo org> AuthorDate: Tue Oct 26 05:37:57 2021 + Commit: Sam James gentoo org> CommitDate: Tue Oct 26 05:37:57 2021 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=64a0bdcc games-puzzle/tod: respect CC, prefix Signed-off-by: Sam James gentoo.org> .../tod/{tod-0-r2.ebuild => tod-0-r3.ebuild}| 21 ++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/games-puzzle/tod/tod-0-r2.ebuild b/games-puzzle/tod/tod-0-r3.ebuild similarity index 67% rename from games-puzzle/tod/tod-0-r2.ebuild rename to games-puzzle/tod/tod-0-r3.ebuild index 9de46566b13..ad378860628 100644 --- a/games-puzzle/tod/tod-0-r2.ebuild +++ b/games-puzzle/tod/tod-0-r3.ebuild @@ -1,9 +1,9 @@ -# Copyright 1999-2020 Gentoo Authors +# Copyright 1999-2021 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 -inherit desktop +inherit desktop toolchain-funcs DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; @@ -22,13 +22,28 @@ S="${WORKDIR}" src_prepare() { default + eapply "${FILESDIR}"/${P}-makefile.patch eapply "${FILESDIR}"/${P}-allegro.patch + + sed -i \ + -e '/CC = gcc/d' \ + -e 's/gcc/$(CC)/' \ + -e 's/$(CC) $(CFLAGS)/& $(CPPFLAGS)/' \ + -e 's/$(LDFLAGS)/$(CFLAGS) $(CPPFLAGS) &/' \ + makefile || die + sed -i \ - -e "s:idltd\.dat:/usr/share/${PN}/idltd.dat:" \ + -e "s:idltd\.dat:${EPREFIX}/usr/share/${PN}/idltd.dat:" \ rec.c || die } +src_compile() { + tc-export CC + + emake +} + src_install() { newbin tod-debug.exe tod insinto /usr/share/${PN}
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/
commit: 751a8e21a28de0f5595e918fb2823938e7b5f336 Author: David Seifert gentoo org> AuthorDate: Fri Dec 1 18:57:38 2017 + Commit: David Seifert gentoo org> CommitDate: Fri Dec 1 19:30:12 2017 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=751a8e21 games-puzzle/tod: [QA] Fix DESCRIPTION.toolong games-puzzle/tod/tod-0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/games-puzzle/tod/tod-0.ebuild b/games-puzzle/tod/tod-0.ebuild index eeb59a66aa2..98278d52a03 100644 --- a/games-puzzle/tod/tod-0.ebuild +++ b/games-puzzle/tod/tod-0.ebuild @@ -4,7 +4,7 @@ EAPI=5 inherit eutils games -DESCRIPTION="Tetanus On Drugs simulates playing a Tetris clone under the influence of hallucinogenic drugs" +DESCRIPTION="Tetanus On Drugs simulates playing Tetris under the influence of drugs" HOMEPAGE="http://www.pineight.com/tod/"; SRC_URI="http://www.pineight.com/pc/win${PN}.zip";
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-
[gentoo-commits] repo/gentoo:master commit in: games-puzzle/tod/files/, games-puzzle/tod/
commit: 4c0fda88a281ca340ccb3849a166e010552a1b18 Author: Stefan Strogin gentoo org> AuthorDate: Fri Feb 14 01:59:22 2020 + Commit: Stefan Strogin gentoo org> CommitDate: Fri Feb 14 02:10:11 2020 + URL:https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4c0fda88 games-puzzle/tod: add patch to fix fixed point math functions Closes: https://bugs.gentoo.org/697090 Package-Manager: Portage-2.3.88, Repoman-2.3.20 Signed-off-by: Stefan Strogin gentoo.org> games-puzzle/tod/files/tod-0-allegro.patch | 154 + .../tod/{tod-0-r1.ebuild => tod-0-r2.ebuild} | 9 +- 2 files changed, 159 insertions(+), 4 deletions(-) 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 000..8b84a16dd9a --- /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 +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 +--- + 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 + 0xc0), hgrcos(theta)); ++ return fixdiv(hgrcos(theta + 0xc0), 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 + 0x1 + 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 + 0x1; ++fixed f = fixsqrt((x - 128) * (x - 128) + (y - 128) * (y - 128)) + ++ (fixcos(x << 20) + fixcos(y << 20)) / 64 + 0x1; + /* between 0 and 4 */ + fixed cosine = hgrcos(f << 11); + unsigned c = (cosine + 0x1 + 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, 0x1 - c); +- zpixel[4] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, c); +- zpixel[6] = THETALIGHT_AMBIENT + fmul(THETALIGHT_POWER, 0x1 - s); ++ zpixel[1] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, s); ++ zpixel[3] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - c); ++ zpixel[4] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, c); ++ zpixel[6] = THETALIGHT_AMBIENT + fixmul(THETALIGHT_POWER, 0x1 - 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 + 0x1); +-fixed x1 = fdiv(zBase, mline + 0x1); ++fixed scanline = fixdiv(i - wHt / 2, wHt / 2); ++fixed mline = fixmul(m, scanline); ++fixed zLine = fixmul(zCos, scanline); ++fixed y1 = fixdiv(zLine, mline + 0x1); ++fixed x1 = fixdiv(zBase, mline + 0x1); + + 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++) + { +-