Created
          November 23, 2014 02:18 
        
      - 
      
 - 
        
Save Subv/5262431f4d4721ca4d97 to your computer and use it in GitHub Desktop.  
    3DS Region Codes Citra PR Updater
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | codes = {} | |
| File.readlines("output.txt").each do |line| | |
| data = line.split(" ") | |
| id = data[1] | |
| str = data[3] | |
| codes[id] = [str.to_i().to_s(16)].pack("H*").reverse | |
| end | |
| codes.sort_by { |code, str| code.to_i }.each do |code, str| | |
| puts "Code " + code + " String " + str | |
| end | |
| (0..0xBA).each do |i| | |
| if codes[i.to_s] != nil | |
| print "\"" + codes[i.to_s] + "\", " | |
| else | |
| print "nullptr, " | |
| end | |
| if (i + 1) % 8 == 0 | |
| puts "// " + (i - 7).to_s + "-" + i.to_s | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment