diff --git a/charmap.tbl b/charmap.tbl index af04fc9..3ce686c 100644 --- a/charmap.tbl +++ b/charmap.tbl @@ -1,16 +1,61 @@ 00= +01=À +02=Á +03= +04=Ç +05=È +06=É +07=Ê +08=Ë +09=Ì +0B=Î +0C=Ï +0D=Ò +0E=Ó +0F=Ô +10=Œ +11=Ù +12=Ú +13=Û +14=Ñ +15=ß +16=à +17=á +19=ç +1A=è 1B=\e - +1C=ê +1D=ë +1E=ì +20=î +21=ï +22=ò +23=ó +24=ô +25=œ +26=ù +27=ú +28=û +29=ñ +2A=º +2B=ª 2D=& 2E=+ 35== 36=; +51=¿ +52=¡ + +5A=Í 5B=% 5C=( 5D=) +68=â +6F=í + 85=< 86=> @@ -31,13 +76,15 @@ AE=- AF=· B0=… B1=" +B1=“ B2=\" +B2=” B3=‘ B4=’ B4=' B5=♂ B6=♀ -B7=¥ +B7=\$ B8=, B9=× BA=/ diff --git a/scripts/string.py b/scripts/string.py index a6e7982..8bf724f 100644 --- a/scripts/string.py +++ b/scripts/string.py @@ -41,14 +41,39 @@ SpecialBuffers = { "ARROW_LEFT": ["7B"], "ARROW_RIGHT": ["7C"], + "SHRINK": ["FC", "06", "00"], + "PAUSE": ["FC", "08"], + "PAUSE_UNTIL_PRESS": ["FC", "09"], + "PLAY_BGM": ["FC", "0B"], + "ESCAPE": ["FC", "0C"], + "SHIFT_TEXT": ["FC", "0D"], + "PLAY_SE": ["FC", "10"], + "CLEAR": ["FC", "11"], + "SKIP": ["FC", "12"], "ALIGN": ["FC", "13"], - "SHRINK": ["FC", "06", "00"] + "MIN_LETTER_SPACING": ["FC", "14"], + "PAUSE_MUSIC": ["FC", "17"], + "RESUME_MUSIC": ["FC", "18"], + + "A_BUTTON": ["F8", "00"], + "B_BUTTON": ["F8", "01"], + "L_BUTTON": ["F8", "02"], + "R_BUTTON": ["F8", "03"], + "START_BUTTON": ["F8", "04"], + "SELECT_BUTTON": ["F8", "05"], + "DPAD_UP": ["F8", "06"], + "DPAD_DOWN": ["F8", "07"], + "DPAD_LEFT": ["F8", "08"], + "DPAD_RIGHT": ["F8", "09"], + "DPAD_UP_DOWN": ["F8", "0A"], + "DPAD_LEFT_RIGHT": ["F8", "0B"], + "DPAD": ["F8", "0C"], } def StringFileConverter(fileName: str): stringToWrite = ".thumb\n.text\n.align 2\n\n" - with open(fileName, 'r') as file: + with open(fileName, 'r', encoding="utf-8") as file: maxLength = 0 fillFF = False readingState = 0 @@ -178,7 +203,7 @@ def ProcessString(string: str, lineNum: int, maxLength=0, fillWithFF=False) -> s def PokeByteTableMaker(): dictionary = {} - with open(CharMap) as file: + with open(CharMap, 'r', encoding="utf-8") as file: for line in file: if line.strip() != "/FF" and line.strip() != "": if line[2] == '=' and line[3] != "": @@ -190,8 +215,4 @@ def PokeByteTableMaker(): except: pass dictionary[' '] = 0 - - dictionary[""] = 0xB4 - dictionary[""] = 0xB0 - dictionary[""] = 0xB1 return dictionary