mirror of
				https://github.com/MarioSpore/Grinch-AP.git
				synced 2025-10-21 20:21:32 -06:00 
			
		
		
		
	write 1024 bytes in one go instead of one by one
This commit is contained in:
		
							
								
								
									
										3
									
								
								Rom.py
									
									
									
									
									
								
							
							
						
						
									
										3
									
								
								Rom.py
									
									
									
									
									
								
							| @@ -727,8 +727,7 @@ def patch_rom(world, rom, player, team, enemized): | ||||
|         rom.write_byte(0x180182, 0x00) # Don't auto equip silvers on pickup | ||||
|  | ||||
|     # set up game internal RNG seed | ||||
|     for i in range(1024): | ||||
|         rom.write_byte(0x178000 + i, random.randint(0, 255)) | ||||
|     rom.write_bytes(0x178000, random.getrandbits(8 * 1024).to_bytes(1024, 'big')) | ||||
|  | ||||
|     # shuffle prize packs | ||||
|     prizes = [0xD8, 0xD8, 0xD8, 0xD8, 0xD9, 0xD8, 0xD8, 0xD9, 0xDA, 0xD9, 0xDA, 0xDB, 0xDA, 0xD9, 0xDA, 0xDA, 0xE0, 0xDF, 0xDF, 0xDA, 0xE0, 0xDF, 0xD8, 0xDF, | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Fabian Dill
					Fabian Dill