mirror of
https://github.com/Artrios/pokecarde.git
synced 2026-03-24 18:54:09 -05:00
- Improvements to build, which should help find nevpk and rgbds a little easier. - Support for berry cards K007-K012 has been added (original Japanese) and they have received unofficial localizations. - Unofficial Localizations for cards B001 - B048 have now been included. - Cards P001-P004 have now been added (Official English and Japanese) - Cards P005-P008 have now been added (official Japanese) and have also received unofficial localizations. - Cards N001-N008 have now been added (official Japanese) and have also received unofficial localizations. - Unofficial localization for card O001 has been improved to be more in-line with official localizations of the time. tl;dr All Ruby/Sapphire e-Reader cards are now included and exist in their original English/Japanese, and have unofficial localizations if no official translation is available.
27 lines
697 B
Python
27 lines
697 B
Python
# -*- coding: utf-8 -*-
|
|
#!/usr/bin/env python2.7
|
|
import sys
|
|
from asmquote import asmQuote
|
|
|
|
region = sys.argv[3]
|
|
|
|
out = open(sys.argv[2], 'w')
|
|
|
|
with open(sys.argv[1], 'rb') as f:
|
|
for asm in f:
|
|
asms = asm.split('"')
|
|
command = asms[0].strip()
|
|
if command == "db":
|
|
# this is only for the American e-Reader; still need to deal with Japanese
|
|
asms[1] = asms[1].replace('\\0', '\x00')
|
|
asms[1] = asms[1].replace('\\n', '\n')
|
|
asms[1] = asms[1].replace('é', '\x7F')
|
|
|
|
out.write("db " + asmQuote(asms[1]) + "\n")
|
|
else:
|
|
out.write(asm)
|
|
if "macros.asm" in asm:
|
|
out.write("REGION EQU REGION_{0}\n".format(region))
|
|
out.write('REGION_NAME EQUS "{0}"\n'.format(region))
|
|
|
|
f.closed |