mirror of
				https://github.com/zenorogue/hyperrogue.git
				synced 2025-10-31 05:52:59 +00:00 
			
		
		
		
	replacing with an explicit list
This commit is contained in:
		
							
								
								
									
										4
									
								
								game.cpp
									
									
									
									
									
								
							
							
						
						
									
										4
									
								
								game.cpp
									
									
									
									
									
								
							| @@ -144,7 +144,7 @@ cellwalker cwt;       // single player character position | ||||
| inline cell*& singlepos() { return cwt.c; } | ||||
| inline bool singleused() { return !(shmup::on || multi::players > 1); } | ||||
|  | ||||
| mt19937 r; | ||||
| std::mt19937 r; | ||||
|  | ||||
| void shrand(int i) { | ||||
|   r.seed(i); | ||||
| @@ -161,7 +161,7 @@ ld hrandf() { | ||||
|   } | ||||
|  | ||||
| int hrandstate() { | ||||
|   mt19937 r2 = r; | ||||
|   std::mt19937 r2 = r; | ||||
|   return r2() & HRANDMAX; | ||||
|   } | ||||
|  | ||||
|   | ||||
							
								
								
									
										31
									
								
								hyper.h
									
									
									
									
									
								
							
							
						
						
									
										31
									
								
								hyper.h
									
									
									
									
									
								
							| @@ -10,7 +10,34 @@ | ||||
|  | ||||
| namespace hr { | ||||
|  | ||||
| using namespace std; | ||||
| // functions and types used from the standard library | ||||
| using std::vector; | ||||
| using std::map; | ||||
| using std::array; | ||||
| using std::unordered_map; | ||||
| using std::sort; | ||||
| using std::multimap; | ||||
| using std::set; | ||||
| using std::string; | ||||
| using std::function; | ||||
| using std::pair; | ||||
| using std::tuple; | ||||
| using std::shared_ptr; | ||||
| using std::make_shared; | ||||
| using std::min; | ||||
| using std::max; | ||||
| using std::make_pair; | ||||
| using std::tie; | ||||
| using std::queue; | ||||
| using std::swap; | ||||
| using std::complex; | ||||
| using std::reverse; | ||||
| using std::real; | ||||
| using std::imag; | ||||
| using std::stable_sort; | ||||
| using std::out_of_range; | ||||
| using std::get; | ||||
| using std::random_shuffle; | ||||
|  | ||||
| // genus (in grammar) | ||||
| #define GEN_M 0 | ||||
| @@ -369,9 +396,7 @@ string cts(char c); | ||||
| string its(int i); | ||||
| int hrand(int i); | ||||
|  | ||||
| #ifndef STDSIZE | ||||
| template<class T> int size(const T& x) {return x.size(); } | ||||
| #endif | ||||
|  | ||||
| // initialize the achievement system. | ||||
| void achievement_init(); | ||||
|   | ||||
| @@ -93,7 +93,7 @@ namespace hr { namespace inv { | ||||
|     return int(mirrorqty0(orb) * sqrt(1.000001+items[itPower]/20.)); | ||||
|     } | ||||
|      | ||||
|   mt19937 invr; | ||||
|   std::mt19937 invr; | ||||
|    | ||||
|   void sirand(int i) { | ||||
|     invr.seed(i); | ||||
|   | ||||
							
								
								
									
										15
									
								
								langen.cpp
									
									
									
									
									
								
							
							
						
						
									
										15
									
								
								langen.cpp
									
									
									
									
									
								
							| @@ -9,14 +9,17 @@ | ||||
|  | ||||
| #include <map> | ||||
| #include <string> | ||||
| #include <stdio.h> | ||||
| #include <cstdio> | ||||
| #include <vector> | ||||
| #include <stdlib.h> | ||||
| using namespace std; | ||||
| #include <cstdlib> | ||||
| #include <set> | ||||
|  | ||||
| using std::string; | ||||
| using std::map; | ||||
| using std::vector; | ||||
| using std::set; | ||||
|  | ||||
| #ifndef STDSIZE | ||||
| template<class T> int size(const T& x) { return x.size(); } | ||||
| #endif | ||||
|  | ||||
| #define NUMLAN 7 | ||||
|  | ||||
| @@ -44,8 +47,6 @@ struct noun { | ||||
|  | ||||
| dictionary<noun> nouns[NUMLAN]; | ||||
|  | ||||
| #include <set> | ||||
|  | ||||
| int utfsize(char c) { | ||||
|   unsigned char cu = c; | ||||
|   if(cu < 128) return 1; | ||||
|   | ||||
| @@ -577,7 +577,7 @@ namespace sag { | ||||
|     return cost; | ||||
|     } | ||||
|    | ||||
|   mt19937 los; | ||||
|   std::mt19937 los; | ||||
|  | ||||
|   bool infullsa; | ||||
|    | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Zeno Rogue
					Zeno Rogue