Remove array globals from OxStd, as they were causing section overlaps
on GBA
This commit is contained in:
		
							
								
								
									
										11
									
								
								deps/ox/src/ox/std/random.cpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										11
									
								
								deps/ox/src/ox/std/random.cpp
									
									
									
									
										vendored
									
									
								
							@@ -11,7 +11,10 @@
 | 
			
		||||
 | 
			
		||||
namespace ox {
 | 
			
		||||
 | 
			
		||||
RandomSeed Random::DEFAULT_SEED = {540932923848, 540932540932};
 | 
			
		||||
Random::Random() {
 | 
			
		||||
	m_seed[0] = 540932923848;
 | 
			
		||||
	m_seed[1] = 540932540932;
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
Random::Random(RandomSeed seed) {
 | 
			
		||||
	m_seed[0] = seed[0];
 | 
			
		||||
@@ -32,9 +35,3 @@ uint64_t Random::gen() {
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
uint64_t ox_rand() {
 | 
			
		||||
	static ox::Random rand;
 | 
			
		||||
	return rand.gen();
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
							
								
								
									
										5
									
								
								deps/ox/src/ox/std/random.hpp
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										5
									
								
								deps/ox/src/ox/std/random.hpp
									
									
									
									
										vendored
									
									
								
							@@ -16,13 +16,14 @@ typedef uint64_t RandomSeed[2];
 | 
			
		||||
 | 
			
		||||
class Random {
 | 
			
		||||
	public:
 | 
			
		||||
		static RandomSeed DEFAULT_SEED;
 | 
			
		||||
 | 
			
		||||
	private:
 | 
			
		||||
		RandomSeed m_seed;
 | 
			
		||||
 | 
			
		||||
	public:
 | 
			
		||||
		Random(RandomSeed seed = DEFAULT_SEED);
 | 
			
		||||
		Random();
 | 
			
		||||
 | 
			
		||||
		Random(RandomSeed seed);
 | 
			
		||||
 | 
			
		||||
		uint64_t gen();
 | 
			
		||||
};
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user