mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 22:12:59 +00:00 
			
		
		
		
	Merge branch 'master' of https://github.com/zenorogue/hyperrogue
This commit is contained in:
		| @@ -9,15 +9,14 @@ matrix: | |||||||
|         sources: |         sources: | ||||||
|           - ubuntu-toolchain-r-test |           - ubuntu-toolchain-r-test | ||||||
|         packages: |         packages: | ||||||
|           - gcc-4.6 |           - gcc-5 | ||||||
|           - g++-4.6 |           - g++-5 | ||||||
|     env: >- |     env: >- | ||||||
|       TRAVIS_OS_NAME=linux |       TRAVIS_OS_NAME=linux | ||||||
|       TRAVIS_BUILD_SYSTEM=Makefile |       TRAVIS_BUILD_SYSTEM=Makefile | ||||||
|       HYPERROGUE_CXX=g++-4.6 |       HYPERROGUE_CXX=g++-5 | ||||||
|       HYPERROGUE_USE_GLEW=1 |       HYPERROGUE_USE_GLEW=1 | ||||||
|       HYPERROGUE_USE_PNG=1 |       HYPERROGUE_USE_PNG=1 | ||||||
|       EXTRA_CXXFLAGS=-DGCC46 |  | ||||||
|   - os: linux |   - os: linux | ||||||
|     compiler: gcc |     compiler: gcc | ||||||
|     env: >- |     env: >- | ||||||
|   | |||||||
| @@ -32,14 +32,10 @@ else | |||||||
|   TOOLCHAIN_VERSION_S := $(shell $(CXX) --version) |   TOOLCHAIN_VERSION_S := $(shell $(CXX) --version) | ||||||
|   ifneq (,$(findstring clang,$(TOOLCHAIN_VERSION_S))) |   ifneq (,$(findstring clang,$(TOOLCHAIN_VERSION_S))) | ||||||
|     TOOLCHAIN := clang |     TOOLCHAIN := clang | ||||||
|   else |  | ||||||
|     ifneq (,$(findstring 4.6.,$(TOOLCHAIN_VERSION_S))) |  | ||||||
|       TOOLCHAIN := gcc46 |  | ||||||
|   else |   else | ||||||
|     TOOLCHAIN := gcc |     TOOLCHAIN := gcc | ||||||
|   endif |   endif | ||||||
| endif | endif | ||||||
| endif |  | ||||||
|  |  | ||||||
|  |  | ||||||
| ## We have now finished inspecting the environment via $(shell). | ## We have now finished inspecting the environment via $(shell). | ||||||
| @@ -95,12 +91,6 @@ ifeq (${TOOLCHAIN},gcc) | |||||||
|   CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized |   CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized | ||||||
| endif | endif | ||||||
|  |  | ||||||
| ifeq (${TOOLCHAIN},gcc46) |  | ||||||
|   CXXFLAGS_EARLY += -std=c++0x |  | ||||||
|   CXXFLAGS_EARLY += -W -Wall -Wextra -Werror |  | ||||||
|   CXXFLAGS_EARLY += -Wno-unknown-warning-option -Wno-missing-field-initializers -Wno-unused-parameter -Wno-implicit-fallthrough -Wno-maybe-uninitialized |  | ||||||
| endif |  | ||||||
|  |  | ||||||
| ifeq (${TOOLCHAIN},mingw) | ifeq (${TOOLCHAIN},mingw) | ||||||
|   CXXFLAGS_EARLY += -std=c++11 -march=native |   CXXFLAGS_EARLY += -std=c++11 -march=native | ||||||
|   CXXFLAGS_EARLY += -W -Wall -Wextra -Werror |   CXXFLAGS_EARLY += -W -Wall -Wextra -Werror | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ | |||||||
| A puzzle roguelike in the hyperbolic plane. See the [HyperRogue website](http://roguetemple.com/z/hyper.php) for detailed and most up-to-date information. | A puzzle roguelike in the hyperbolic plane. See the [HyperRogue website](http://roguetemple.com/z/hyper.php) for detailed and most up-to-date information. | ||||||
| Compiled executables can be downloaded from [itch.io](https://zenorogue.itch.io/hyperrogue) and from the [HyperRogue website](http://www.roguetemple.com/z/hyper/download.php). | Compiled executables can be downloaded from [itch.io](https://zenorogue.itch.io/hyperrogue) and from the [HyperRogue website](http://www.roguetemple.com/z/hyper/download.php). | ||||||
|  |  | ||||||
| Released under [GNU General Public License, version 2](http://www.gnu.org/licenses/gpl-2.0.html). As such, it comes with without any warranty. | Released under [GNU General Public License, version 2](http://www.gnu.org/licenses/gpl-2.0.html). As such, it comes without any warranty. | ||||||
|  |  | ||||||
| If you would like to thank me for HyperRogue, you can support the development by buying paid versions (with more up-to-date content and some social and competitive features), or [in other ways](http://www.roguetemple.com/z/donate.php?id=hyper).  | If you would like to thank me for HyperRogue, you can support the development by buying paid versions (with more up-to-date content and some social and competitive features), or [in other ways](http://www.roguetemple.com/z/donate.php?id=hyper).  | ||||||
| You can contact me at zeno@attnam.com, or at [my blog](http://zenorogue.blogspot.com/), or via [Twitter](https://twitter.com/ZenoRogue). | You can contact me at zeno@attnam.com, or at [my blog](http://zenorogue.blogspot.com/), or via [Twitter](https://twitter.com/ZenoRogue). | ||||||
| @@ -37,7 +37,7 @@ You can see tooltips by placing the mouse over stuff. You can also right click t | |||||||
|  |  | ||||||
| Press v to configure the game. You can also rotate the world by pressing arrow keys, PageUp and PageDn (not numpad). You can center on the PC by pressing Home. | Press v to configure the game. You can also rotate the world by pressing arrow keys, PageUp and PageDn (not numpad). You can center on the PC by pressing Home. | ||||||
|  |  | ||||||
| Your scores and other stats about your games are recorded to file hyperrogue.log (in Linux, *~/.hyperrogue.log*). You can save your configation to file hyperrogue.ini (in Linux, *~/.hyperrogue.ini*). | Your scores and other stats about your games are recorded to file hyperrogue.log (in Linux, *~/.hyperrogue.log*). You can save your configuration to file hyperrogue.ini (in Linux, *~/.hyperrogue.ini*). | ||||||
|  |  | ||||||
| The surface the game is played on is called a hyperbolic plane. It seems there is just a very small amount of games and other works of art which use hyperbolic geometry (the most well known are some works of M.C.  Escher). | The surface the game is played on is called a hyperbolic plane. It seems there is just a very small amount of games and other works of art which use hyperbolic geometry (the most well known are some works of M.C.  Escher). | ||||||
|  |  | ||||||
|   | |||||||
| @@ -47,21 +47,11 @@ eVariation variation; | |||||||
| struct hyperpoint : array<ld, MAXMDIM> { | struct hyperpoint : array<ld, MAXMDIM> { | ||||||
|   hyperpoint() {} |   hyperpoint() {} | ||||||
|    |    | ||||||
|   #if ISGCC46 |  | ||||||
|   #if MAXMDIM == 4 |  | ||||||
|   // aaa |  | ||||||
|   constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> { (array<ld, MAXMDIM>) {{x, y, z, w}}} {} |  | ||||||
|   #else |  | ||||||
|   constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> { (array<ld, MAXMDIM>) {{x, y, z}}} {} |  | ||||||
|   #endif |  | ||||||
|  |  | ||||||
|   #else |  | ||||||
|   #if MAXMDIM == 4 |   #if MAXMDIM == 4 | ||||||
|   constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> {{x,y,z,w}} {} |   constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> {{x,y,z,w}} {} | ||||||
|   #else |   #else | ||||||
|   constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> {{x,y,z}} {} |   constexpr hyperpoint(ld x, ld y, ld z, ld w) : array<ld, MAXMDIM> {{x,y,z}} {} | ||||||
|   #endif |   #endif | ||||||
|   #endif |  | ||||||
|  |  | ||||||
|   inline hyperpoint& operator *= (ld d) { |   inline hyperpoint& operator *= (ld d) { | ||||||
|     for(int i=0; i<MDIM; i++) self[i] *= d; |     for(int i=0; i<MDIM; i++) self[i] *= d; | ||||||
|   | |||||||
| @@ -65,7 +65,7 @@ int utfsize(char c) { | |||||||
|   return 4; |   return 4; | ||||||
|   } |   } | ||||||
|  |  | ||||||
| void addutftoset(std::set<std::string>& s, std::string& w) { | void addutftoset(std::set<std::string>& s, const std::string& w) { | ||||||
|   size_t i = 0; |   size_t i = 0; | ||||||
|   while(i < w.size()) { |   while(i < w.size()) { | ||||||
|     int siz = utfsize(w[i]); |     int siz = utfsize(w[i]); | ||||||
| @@ -74,7 +74,7 @@ void addutftoset(std::set<std::string>& s, std::string& w) { | |||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
| void addutftoset(std::set<std::string>& s, noun& w) { | void addutftoset(std::set<std::string>& s, const noun& w) { | ||||||
|   addutftoset(s, w.nom); |   addutftoset(s, w.nom); | ||||||
|   addutftoset(s, w.nomp); |   addutftoset(s, w.nomp); | ||||||
|   addutftoset(s, w.acc); |   addutftoset(s, w.acc); | ||||||
| @@ -82,7 +82,7 @@ void addutftoset(std::set<std::string>& s, noun& w) { | |||||||
|   } |   } | ||||||
|  |  | ||||||
| template<class T> | template<class T> | ||||||
| void addutftoset(std::set<std::string>& s, dictionary<T>& w) { | void addutftoset(std::set<std::string>& s, const dictionary<T>& w) { | ||||||
|   for(auto&& elt : w.m) |   for(auto&& elt : w.m) | ||||||
|     addutftoset(s, elt.second); |     addutftoset(s, elt.second); | ||||||
|   } |   } | ||||||
| @@ -102,7 +102,7 @@ hashcode langhash(const std::string& s) { | |||||||
|     return langhash(s.substr(0, s.size() - 9)) + 1; |     return langhash(s.substr(0, s.size() - 9)) + 1; | ||||||
|     } |     } | ||||||
|   hashcode r = 0; |   hashcode r = 0; | ||||||
|   for(int i=0; i<isize(s); i++) r = hashval * r + s[i]; |   for (char ch : s) r = hashval * r + ch; | ||||||
|   return r; |   return r; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -216,7 +216,7 @@ EX void apply_memory_reserve() { | |||||||
|       } |       } | ||||||
|     } |     } | ||||||
|   catch(std::bad_alloc&) {} |   catch(std::bad_alloc&) {} | ||||||
|   #if (ISGCC46 || ISWINDOWS) |   #if ISWINDOWS | ||||||
|   // no get_new_handler on this compiler... |   // no get_new_handler on this compiler... | ||||||
|   default_handler = [] { throw std::bad_alloc(); }; |   default_handler = [] { throw std::bad_alloc(); }; | ||||||
|   #else |   #else | ||||||
|   | |||||||
| @@ -48,13 +48,6 @@ | |||||||
| #define ISSTEAM 0 | #define ISSTEAM 0 | ||||||
| #endif | #endif | ||||||
|  |  | ||||||
| #if GCC46 |  | ||||||
| #define override |  | ||||||
| #define ISGCC46 1 |  | ||||||
| #else |  | ||||||
| #define ISGCC46 0 |  | ||||||
| #endif |  | ||||||
|  |  | ||||||
| #ifndef ISWEB | #ifndef ISWEB | ||||||
| #define ISWEB 0 | #define ISWEB 0 | ||||||
| #endif | #endif | ||||||
| @@ -396,6 +389,7 @@ extern "C" { | |||||||
| #else | #else | ||||||
|   #define GL_GLEXT_PROTOTYPES 1 |   #define GL_GLEXT_PROTOTYPES 1 | ||||||
|   #if ISMAC |   #if ISMAC | ||||||
|  |     #define GL_SILENCE_DEPRECATION 1 | ||||||
|     #include <OpenGL/gl.h> |     #include <OpenGL/gl.h> | ||||||
|     #include <OpenGL/glu.h> |     #include <OpenGL/glu.h> | ||||||
|     #include <OpenGL/glext.h> |     #include <OpenGL/glext.h> | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue