Github messages for voidlinux
 help / color / mirror / Atom feed
From: tranzystorekk <tranzystorekk@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: [PR PATCH] hyperrogue: update to 12.1z
Date: Sat, 02 Dec 2023 20:15:21 +0100	[thread overview]
Message-ID: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47539@inbox.vuxu.org> (raw)

[-- Attachment #1: Type: text/plain, Size: 1254 bytes --]

There is a new pull request by tranzystorekk against master on the void-packages repository

https://github.com/tranzystorekk/void-packages hyperrogue
https://github.com/void-linux/void-packages/pull/47539

hyperrogue: update to 12.1z
<!-- Uncomment relevant sections and delete options which are not applicable -->

#### Testing the changes
- I tested the changes in this PR: **YES**

<!--
#### New package
- This new package conforms to the [package requirements](https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#package-requirements): **YES**|**NO**
-->

<!-- Note: If the build is likely to take more than 2 hours, please add ci skip tag as described in
https://github.com/void-linux/void-packages/blob/master/CONTRIBUTING.md#continuous-integration
and test at least one native build and, if supported, at least one cross build.
Ignore this section if this PR is not skipping CI.
-->
<!--
#### Local build testing
- I built this PR locally for my native architecture, (ARCH-LIBC)
- I built this PR locally for these architectures (if supported. mark crossbuilds):
  - aarch64-musl
  - armv7l
  - armv6l-musl
-->


A patch file from https://github.com/void-linux/void-packages/pull/47539.patch is attached

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-hyperrogue-47539.patch --]
[-- Type: text/x-diff, Size: 6080 bytes --]

From 52fba1019d5a84b0a991b2ac05232a81a83df259 Mon Sep 17 00:00:00 2001
From: Marcin Puc <tranzystorek.io@protonmail.com>
Date: Sat, 2 Dec 2023 15:02:21 +0100
Subject: [PATCH] hyperrogue: update to 12.1z

---
 .../hyperrogue/patches/fix-compile-bug.patch  | 126 ++++++++++++++++++
 srcpkgs/hyperrogue/template                   |   4 +-
 2 files changed, 128 insertions(+), 2 deletions(-)
 create mode 100644 srcpkgs/hyperrogue/patches/fix-compile-bug.patch

diff --git a/srcpkgs/hyperrogue/patches/fix-compile-bug.patch b/srcpkgs/hyperrogue/patches/fix-compile-bug.patch
new file mode 100644
index 0000000000000..6b585296cc1f4
--- /dev/null
+++ b/srcpkgs/hyperrogue/patches/fix-compile-bug.patch
@@ -0,0 +1,126 @@
+From 39ddc3dc33b4a703812dd42437711e77e113e314 Mon Sep 17 00:00:00 2001
+From: Zeno Rogue <zeno@attnam.com>
+Date: Sat, 2 Dec 2023 19:34:06 +0100
+Subject: [PATCH] fix compile bug
+
+---
+ drawing.cpp   | 16 ++++++++--------
+ mapeditor.cpp | 30 +++++++++++++++++++++++++++---
+ 2 files changed, 35 insertions(+), 11 deletions(-)
+
+diff --git a/drawing.cpp b/drawing.cpp
+index f1d55f0d..0a48a6ea 100644
+--- a/drawing.cpp
++++ b/drawing.cpp
+@@ -1566,21 +1566,21 @@ EX namespace ods {
+     dqi_poly npoly = *p;
+     npoly.offset = 0;
+     npoly.tab = &glcoords;
+-    npoly.V = Id;
++    npoly.V = shiftless(Id);
+     npoly.tinf = p->tinf ? &stinf : NULL;
+     if(npoly.tinf) {
+       npoly.offset_texture = 0;
+       stinf.texture_id = p->tinf->texture_id;
+       stinf.tvertices.clear();
+       }
+-    npoly.V = Id;
++    npoly.V = shiftless(Id);
+     glcoords.clear();
+ 
+     array<hyperpoint, 6> h;
+ 
+     if(0) for(int i=0; i<p->cnt; i+=3) {
+       for(int j=0; j<3; j++)
+-        h[j] = p->V * glhr::gltopoint((*p->tab)[p->offset+i+j]);
++        h[j] = unshift(p->V) * glhr::gltopoint((*p->tab)[p->offset+i+j]);
+ 
+       for(int j=0; j<3; j++) {
+         glcoords.push_back(glhr::makevertex(h[j][0], h[j][1], h[j][2]));
+@@ -1591,15 +1591,15 @@ EX namespace ods {
+     if(1) for(int i=0; i<p->cnt; i+=3) {
+ 
+       for(int j=0; j<3; j++) {
+-        hyperpoint o = p->V * glhr::gltopoint((*p->tab)[p->offset+i+j]);
++        shiftpoint o = p->V * glhr::gltopoint((*p->tab)[p->offset+i+j]);
+         if(nonisotropic || gproduct) {
+-          o = lp_apply(inverse_exp(o, iTable, false));
+-          o[3] = 1;
++          auto o1 = lp_apply(inverse_exp(o, pNORMAL));
++          o1[3] = 1;
+           dynamicval<eGeometry> g(geometry, gEuclid);
+-          if(!project(o, h[j], h[j+3], global_projection == -1))
++          if(!project(o1, h[j], h[j+3], global_projection == -1))
+             goto next_i;
+           }
+-        else if(!project(o, h[j], h[j+3], global_projection == -1))
++        else if(!project(unshift(o), h[j], h[j+3], global_projection == -1))
+           goto next_i;
+         }
+       
+diff --git a/mapeditor.cpp b/mapeditor.cpp
+index 1db016b1..dd1e8761 100644
+--- a/mapeditor.cpp
++++ b/mapeditor.cpp
+@@ -184,10 +184,14 @@ EX namespace mapeditor {
+     if(drawing_tool && (cmode & sm::DRAW)) {
+       shiftpoint moh = full_mouseh();
+       dynamicval<ld> lw(vid.linewidth, vid.linewidth * dtwidth * 100);
+-      if(holdmouse && mousekey == 'c')
++      if(holdmouse && mousekey == 'c') {
++        torus_rug_jump(moh, lstart);
+         queue_hcircle(rgpushxto0(lstart), hdist(lstart, moh));
+-      else if(holdmouse && mousekey == 'l')
++        }
++      else if(holdmouse && mousekey == 'l') {
++        torus_rug_jump(moh, lstart);
+         queueline(lstart, moh, dtcolor, 4 + vid.linequality, PPR::LINE);
++        }
+       else if(!holdmouse) {
+         shiftmatrix T = rgpushxto0(moh);
+         queueline(T * xpush0(-.1), T * xpush0(.1), dtcolor);
+@@ -208,6 +212,9 @@ EX namespace mapeditor {
+     }
+   
+   EX void dt_add_line(shiftpoint h1, shiftpoint h2, int maxl) {
++
++    torus_rug_jump(h2, h1);
++
+     if(hdist(h1, h2) > 1 && maxl > 0) {
+       shiftpoint h3 = mid(h1, h2);
+       dt_add_line(h1, h3, maxl-1);
+@@ -230,6 +237,7 @@ EX namespace mapeditor {
+   EX void dt_add_circle(shiftpoint h1, shiftpoint h2) {
+     cell *b = centerover;
+     
++    torus_rug_jump(h2, h1);
+     auto d = hdist(h1, h2);
+     
+     auto xh1 = inverse_shift(ggmatrix(b), h1);
+@@ -279,9 +287,25 @@ EX namespace mapeditor {
+     cfree = nullptr;
+     cfree_at = nullptr;
+     }
+-  
++
++  EX void torus_rug_jump(shiftpoint& h, shiftpoint last) {
++    if(!rug::rugged) return;
++    again:
++
++    auto C = ggmatrix(centerover);
++    auto T1 = inverse_shift(C, rgpushxto0(h));
++
++    for(int a=0; a<2; a++) for(int s: {-1, 1}) {
++      transmatrix T = eumove(s * euc::eu.optimal_axes[a]);
++      shiftpoint h1 = C * T * tC0(T1);
++      if(hdist(h1, last) < hdist(h, last) - 1e-6) { h = h1; goto again; }
++      }
++    }
++
+   EX void dt_add_free(shiftpoint h) {
+ 
++    if(cfree) torus_rug_jump(h, cfree_old * cfree->lh.back());
++
+     cell *b = centerover;
+     shiftmatrix T = rgpushxto0(h);
+     auto T1 = inverse_shift(ggmatrix(b), T);
diff --git a/srcpkgs/hyperrogue/template b/srcpkgs/hyperrogue/template
index e349023a5c449..ee51bccca6b16 100644
--- a/srcpkgs/hyperrogue/template
+++ b/srcpkgs/hyperrogue/template
@@ -1,6 +1,6 @@
 # Template file for 'hyperrogue'
 pkgname=hyperrogue
-version=12.1y
+version=12.1z
 revision=1
 build_style=gnu-makefile
 makedepends="glew-devel libpng-devel SDL-devel SDL_gfx-devel SDL_mixer-devel
@@ -12,7 +12,7 @@ license="GPL-2.0-or-later, CC-BY-SA-4.0, CC-BY-SA-3.0, CC-BY-3.0, Public Domain"
 homepage="https://www.roguetemple.com/z/hyper/"
 changelog="https://raw.githubusercontent.com/zenorogue/hyperrogue/master/changelog.txt"
 distfiles="https://github.com/zenorogue/hyperrogue/archive/refs/tags/v${version}.tar.gz"
-checksum=881d4c1e7a39f74f2b33af8fea3df5a2323b1ab0929ddd291f8b9aba874fd414
+checksum=b2a0f1a252af837043da1c2f2e4492aba677e577c670eb643f8d10176ed8c667
 nocross="Generates code from build output that must run on host"
 
 # SDL_gfx-devel headers require that SDL.h be under the header search paths,

             reply	other threads:[~2023-12-02 19:15 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-02 19:15 tranzystorekk [this message]
2023-12-02 20:30 ` [PR PATCH] [Updated] " tranzystorekk
2023-12-02 23:03 ` [PR PATCH] [Merged]: " classabbyamp

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-47539@inbox.vuxu.org \
    --to=tranzystorekk@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).