Update to hyperrogue-10.5e; the big endian patches are now upstreamed
This commit is contained in:
parent
3753cc5709
commit
567f8acbea
@ -1,12 +1,11 @@
|
||||
# $OpenBSD: Makefile,v 1.9 2019/01/17 00:14:58 cwen Exp $
|
||||
# $OpenBSD: Makefile,v 1.10 2019/02/17 00:28:54 bcallah Exp $
|
||||
|
||||
COMMENT = roguelike game in a non-Euclidean world
|
||||
CATEGORIES = games x11
|
||||
REVISION = 0
|
||||
|
||||
GH_ACCOUNT = zenorogue
|
||||
GH_PROJECT = hyperrogue
|
||||
GH_TAGNAME = v10.5a
|
||||
GH_TAGNAME = v10.5e
|
||||
|
||||
HOMEPAGE = http://roguetemple.com/z/hyper/
|
||||
MAINTAINER = Brian Callahan <bcallah@openbsd.org>
|
||||
@ -15,7 +14,7 @@ MAINTAINER = Brian Callahan <bcallah@openbsd.org>
|
||||
PERMIT_PACKAGE_CDROM = Yes
|
||||
|
||||
WANTLIB += ${COMPILER_LIBCXX} GL GLEW SDL SDL_gfx SDL_mixer SDL_ttf
|
||||
WANTLIB += c m png
|
||||
WANTLIB += c m png16
|
||||
|
||||
# C++11
|
||||
COMPILER = base-clang ports-gcc
|
||||
|
@ -1,2 +1,2 @@
|
||||
SHA256 (hyperrogue-10.5a.tar.gz) = Uct3UrP+eMdH9t3DnQaZpzyjir7akV0jV0Rk96WLzLs=
|
||||
SIZE (hyperrogue-10.5a.tar.gz) = 56966889
|
||||
SHA256 (hyperrogue-10.5e.tar.gz) = 2frg1N2zwMNFVvJyNSLbyBSKU5WmC7DoLKdSmm4H1DQ=
|
||||
SIZE (hyperrogue-10.5e.tar.gz) = 57007081
|
||||
|
@ -1,20 +0,0 @@
|
||||
$OpenBSD: patch-polygons_cpp,v 1.1 2019/01/17 00:14:58 cwen Exp $
|
||||
Fix colors on big-endian machines in non-OpenGL mode.
|
||||
See https://github.com/zenorogue/hyperrogue/pull/70
|
||||
Index: polygons.cpp
|
||||
--- polygons.cpp.orig
|
||||
+++ polygons.cpp
|
||||
@@ -762,7 +762,12 @@ void fixMercator(bool tinf) {
|
||||
}
|
||||
|
||||
unsigned char& part(color_t& col, int i) {
|
||||
- unsigned char* c = (unsigned char*) &col; return c[i];
|
||||
+ unsigned char* c = (unsigned char*) &col;
|
||||
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
+ return c[sizeof(col) - 1 - i];
|
||||
+#else
|
||||
+ return c[i];
|
||||
+#endif
|
||||
}
|
||||
|
||||
bool in_twopoint = false;
|
@ -1,30 +0,0 @@
|
||||
$OpenBSD: patch-shaders_cpp,v 1.1 2019/01/17 00:14:58 cwen Exp $
|
||||
Fix colors for big endian archs in OpenGL mode.
|
||||
See https://github.com/zenorogue/hyperrogue/pull/70
|
||||
Index: shaders.cpp
|
||||
--- shaders.cpp.orig
|
||||
+++ shaders.cpp
|
||||
@@ -339,9 +339,9 @@ void id_modelview() {
|
||||
#endif
|
||||
|
||||
void color2(color_t color, ld part) {
|
||||
- unsigned char *c = (unsigned char*) (&color);
|
||||
GLfloat cols[4];
|
||||
- for(int i=0; i<4; i++) cols[i] = c[3-i] / 255.0 * part;
|
||||
+ for(int i=0; i<4; i++)
|
||||
+ cols[i] = (color >> ((3-i) * 8) & 0xff) / 255.0 * part;
|
||||
#if CAP_SHADER
|
||||
// glUniform4fv(current->uFog, 4, cols);
|
||||
glUniform4f(current->uColor, cols[0], cols[1], cols[2], cols[3]);
|
||||
@@ -352,7 +352,11 @@ void color2(color_t color, ld part) {
|
||||
|
||||
void colorClear(color_t color) {
|
||||
unsigned char *c = (unsigned char*) (&color);
|
||||
+#if SDL_BYTEORDER == SDL_BIG_ENDIAN
|
||||
+ glClearColor(c[0] / 255.0, c[1] / 255.0, c[2]/255.0, c[3] / 255.0);
|
||||
+#else
|
||||
glClearColor(c[3] / 255.0, c[2] / 255.0, c[1]/255.0, c[0] / 255.0);
|
||||
+#endif
|
||||
}
|
||||
|
||||
void be_nontextured(shader_projection sp) { switch_mode(gmColored, sp); }
|
Loading…
Reference in New Issue
Block a user