* implement jp msg

* replace

* .
This commit is contained in:
AltoXorg 2023-12-25 21:15:30 +08:00 committed by GitHub
parent c55c2c0017
commit 9b96f91dc6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 2740 additions and 1458 deletions

View File

@ -259,7 +259,7 @@ def write_ninja_rules(
ninja.rule(
"msg",
description="msg $in",
command=f"$python {BUILD_TOOLS}/msg/parse_compile.py $in $out",
command=f"$python {BUILD_TOOLS}/msg/parse_compile.py $version $in $out",
)
ninja.rule(

File diff suppressed because it is too large Load Diff

1152
tools/splat_ext/msg_jp.yaml Normal file

File diff suppressed because it is too large Load Diff

View File

@ -7,7 +7,182 @@ import re
import pylibyaml
import yaml as yaml_loader
CHARSET = {
CHARSET_COMMON = {
0xF7: " ",
0xF0: "[BR]\n",
0xF1: "[Wait]",
0xF2: {None: lambda d: (f"[Pause {d[0]}]", 1)},
0xF3: "[Variant0]",
0xF4: "[Variant1]",
0xF5: "[Variant2]",
0xF6: "[Variant3]",
0xFB: "[Next]\n",
0xFC: {
0x01: "[Style right]\n",
0x02: "[Style left]\n",
0x03: "[Style center]\n",
0x04: "[Style tattle]\n",
0x05: {
None: lambda d: (
f"[Style choice pos={d[0]},{d[1]} size={d[2]},{d[3]}]\n",
4,
)
},
0x06: "[Style inspect]\n",
0x07: "[Style sign]\n",
0x08: {None: lambda d: (f"[Style lamppost height={d[0]}]\n", 1)},
0x09: {None: lambda d: (f"[Style postcard index={d[0]}]\n", 1)},
0x0A: "[Style popup]\n",
0x0B: "[Style popup2]\n",
0x0C: {
None: lambda d: (
f"[Style upgrade pos={d[0]},{d[1]} size={d[2]},{d[3]}]\n",
4,
)
},
0x0D: "[Style narrate]\n",
0x0E: "[Style epilogue]\n",
},
0xFF: {
0x00: {
0: "[Font standard]\n",
1: "[Font menu]\n",
2: "[Font menu2]\n",
3: "[Font title]\n",
4: "[Font subtitle]\n",
},
0x04: "[Yield]",
0x05: {
# 0x0A: "[color:normal]",
# 0x20: "[color:red]",
# 0x21: "[color:pink]",
# 0x22: "[color:purple]",
# 0x23: "[color:blue]",
# 0x24: "[color:cyan]",
# 0x25: "[color:green]",
# 0x26: "[color:yellow]",
# 0x00: "[color=normal ctx=diary]",
# 0x07: "[color=red ctx=diary]",
# 0x17: "[color=dark ctx=inspect]",
# 0x18: "[color=normal ctx=sign]",
# 0x19: "[color=red ctx=sign]",
# 0x1A: "[color=blue ctx=sign]",
# 0x1B: "[color=green ctx=sign]",
# 0x28: "[color=red ctx=popup]",
# 0x29: "[color=pink ctx=popup]",
# 0x2A: "[color=purple ctx=popup]",
# 0x2B: "[color=blue ctx=popup]",
# 0x2C: "[color=teal ctx=popup]",
# 0x2D: "[color=green ctx=popup]",
# 0x2E: "[color=yellow ctx=popup]",
# 0x2F: "[color=normal ctx=popup]",
None: lambda d: (f"[Color 0x{d[0]:X}]", 1),
},
0x07: "[InputOff]\n",
0x08: "[InputOn]\n",
0x09: "[DelayOff]\n",
0x0A: "[DelayOn]\n",
0x0B: {None: lambda d: (f"[CharWidth {d[0]}]", 1)},
0x0C: {None: lambda d: (f"[Scroll {d[0]}]", 1)},
0x0D: {None: lambda d: (f"[Size {d[0]},{d[1]}]\n", 2)},
0x0E: "[SizeReset]\n",
0x0F: {None: lambda d: (f"[Speed delay={d[0]} chars={d[1]}]", 2)},
0x10: {None: lambda d: (f"[SetPosX {(d[0] << 8) + d[1]}]", 2)},
0x11: {None: lambda d: (f"[SetPosY {d[0]}]", 1)},
0x12: {None: lambda d: (f"[Right {d[0]}]", 1)},
0x13: {None: lambda d: (f"[Down {d[0]}]", 1)},
0x14: {None: lambda d: (f"[Up {d[0]}]", 1)},
0x15: {None: lambda d: (f"[InlineImage index={d[0]}]\n", 1)},
0x16: {
None: lambda d: (
f"[AnimSprite spriteID=0x{d[0]:02X}{d[1]:02X} raster={d[2]}]\n",
3,
)
},
0x17: {None: lambda d: (f"[ItemIcon itemID=0x{d[0]:02X}{d[1]:02X}]\n", 2)},
0x18: {
None: lambda d: (
f"[Image index={d[0]} pos={(d[1] << 8) + d[2]},{d[3]} hasBorder={d[4]} alpha={d[5]} fadeAmount={d[6]}]\n",
7,
)
},
0x19: {None: lambda d: (f"[HideImage fadeAmount={d[0]}]\n", 1)},
0x1A: {None: lambda d: (f"[AnimDelay index={d[1]} delay={d[2]}]", 3)},
0x1B: {None: lambda d: (f"[AnimLoop {d[0]} {d[1]}]", 2)},
0x1C: {None: lambda d: (f"[AnimDone {d[0]}]", 1)},
0x1E: {None: lambda d: (f"[Cursor {d[0]}]", 1)},
0x1F: {None: lambda d: (f"[EndChoice {d[0]}]", 1)},
0x20: {None: lambda d: (f"[SetCancel {d[0]}]", 1)},
0x21: {None: lambda d: (f"[Option {d[0]}]", 1)},
0x22: "[SavePos]",
0x23: "[RestorePos]",
0x24: {
0xFF: {
0x05: {
0x10: {0x98: {0xFF: {0x25: "[A]"}}},
0x11: {0x99: {0xFF: {0x25: "[B]"}}},
0x12: {0xA1: {0xFF: {0x25: "[START]"}}},
0x13: {
0x9D: {0xFF: {0x25: "[C-UP]"}},
0x9E: {0xFF: {0x25: "[C-DOWN]"}},
0x9F: {0xFF: {0x25: "[C-LEFT]"}},
0xA0: {0xFF: {0x25: "[C-RIGHT]"}},
},
0x14: {0x9C: {0xFF: {0x25: "[Z]"}}},
}
}
},
# 0x24: "[SaveColor]",
# 0x25: "[RestoreColor]",
0x26: {
0x00: "[Shake]",
0x01: "[Wave]",
0x02: "[NoiseOutline]",
0x03: {None: lambda d: (f"[Static {d[0]}]", 1)},
0x05: {None: lambda d: (f"[Blur dir={['x', 'y', 'xy'][d[0]]}]", 1)},
0x07: {None: lambda d: (f"[DitherFade {d[0]}]", 1)},
0x0A: "[PrintRising]",
0x0B: "[PrintGrowing]",
0x0C: "[SizeJitter]",
0x0D: "[SizeWave]",
0x0E: "[DropShadow]",
},
0x27: {
0x00: "[/Shake]",
0x01: "[/Wave]",
0x03: "[/Static]",
0x05: "[/Blur]",
0x07: "[/DitherFade]",
0x0A: "[/PrintRising]",
0x0B: "[/PrintGrowing]",
0x0C: "[/SizeJitter]",
0x0D: "[/SizeWave]",
0x0E: "[/DropShadow]",
},
0x28: {None: lambda d: (f"[Var {d[0]}]", 1)},
0x29: {None: lambda d: (f"[CenterX {d[0]}]", 1)},
0x2B: "[EnableCDownNext]",
0x2C: {
None: lambda d: (
f"[CustomVoice soundIDs=0x{d[0]:02X}{d[1]:02X}{d[2]:02X}{d[3]:02X},0x{d[4]:02X}{d[5]:02X}{d[6]:02X}{d[7]:02X}]",
8,
)
},
0x2E: {None: lambda d: (f"[Volume {d[0]}]", 1)},
0x2F: {
0: "[Voice normal]\n",
1: "[Voice bowser]\n",
2: "[Voice star]\n",
None: lambda d: (f"[Voice {d[0]}]\n", 1),
},
# None: lambda d: (f"[func_{d[0]:02X}]", 1),
},
None: lambda d: (f"[Raw 0x{d[0]:02X}]", 1),
}
CHARSET_STANDARD = {
**CHARSET_COMMON,
0x00: "[NOTE]",
0x01: "!",
0x02: '"',
@ -174,178 +349,10 @@ CHARSET = {
0xA3: "",
0xA4: "",
0xA5: "",
0xF7: " ",
0xF0: "[BR]\n",
0xF1: "[Wait]",
0xF2: {None: lambda d: (f"[Pause {d[0]}]", 1)},
0xF3: "[Variant0]",
0xF4: "[Variant1]",
0xF5: "[Variant2]",
0xF6: "[Variant3]",
0xFB: "[Next]\n",
0xFC: {
0x01: "[Style right]\n",
0x02: "[Style left]\n",
0x03: "[Style center]\n",
0x04: "[Style tattle]\n",
0x05: {
None: lambda d: (
f"[Style choice pos={d[0]},{d[1]} size={d[2]},{d[3]}]\n",
4,
)
},
0x06: "[Style inspect]\n",
0x07: "[Style sign]\n",
0x08: {None: lambda d: (f"[Style lamppost height={d[0]}]\n", 1)},
0x09: {None: lambda d: (f"[Style postcard index={d[0]}]\n", 1)},
0x0A: "[Style popup]\n",
0x0C: {
None: lambda d: (
f"[Style upgrade pos={d[0]},{d[1]} size={d[2]},{d[3]}]\n",
4,
)
},
0x0D: "[Style narrate]\n",
0x0E: "[Style epilogue]\n",
},
0xFF: {
0x00: {
0: "[Font standard]\n",
1: "[Font menu]\n",
3: "[Font title]\n",
4: "[Font subtitle]\n",
},
0x04: "[Yield]",
0x05: {
# 0x0A: "[color:normal]",
# 0x20: "[color:red]",
# 0x21: "[color:pink]",
# 0x22: "[color:purple]",
# 0x23: "[color:blue]",
# 0x24: "[color:cyan]",
# 0x25: "[color:green]",
# 0x26: "[color:yellow]",
# 0x00: "[color=normal ctx=diary]",
# 0x07: "[color=red ctx=diary]",
# 0x17: "[color=dark ctx=inspect]",
# 0x18: "[color=normal ctx=sign]",
# 0x19: "[color=red ctx=sign]",
# 0x1A: "[color=blue ctx=sign]",
# 0x1B: "[color=green ctx=sign]",
# 0x28: "[color=red ctx=popup]",
# 0x29: "[color=pink ctx=popup]",
# 0x2A: "[color=purple ctx=popup]",
# 0x2B: "[color=blue ctx=popup]",
# 0x2C: "[color=teal ctx=popup]",
# 0x2D: "[color=green ctx=popup]",
# 0x2E: "[color=yellow ctx=popup]",
# 0x2F: "[color=normal ctx=popup]",
None: lambda d: (f"[Color 0x{d[0]:X}]", 1),
},
0x07: "[InputOff]\n",
0x08: "[InputOn]\n",
0x09: "[DelayOff]\n",
0x0A: "[DelayOn]\n",
0x0B: {None: lambda d: (f"[CharWidth {d[0]}]", 1)},
0x0C: {None: lambda d: (f"[Scroll {d[0]}]", 1)},
0x0D: {None: lambda d: (f"[Size {d[0]},{d[1]}]\n", 2)},
0x0E: "[SizeReset]\n",
0x0F: {None: lambda d: (f"[Speed delay={d[0]} chars={d[1]}]", 2)},
0x10: {None: lambda d: (f"[SetPosX {(d[0] << 8) + d[1]}]", 2)},
0x11: {None: lambda d: (f"[SetPosY {d[0]}]", 1)},
0x12: {None: lambda d: (f"[Right {d[0]}]", 1)},
0x13: {None: lambda d: (f"[Down {d[0]}]", 1)},
0x14: {None: lambda d: (f"[Up {d[0]}]", 1)},
0x15: {None: lambda d: (f"[InlineImage index={d[0]}]\n", 1)},
0x16: {
None: lambda d: (
f"[AnimSprite spriteID=0x{d[0]:02X}{d[1]:02X} raster={d[2]}]\n",
3,
)
},
0x17: {None: lambda d: (f"[ItemIcon itemID=0x{d[0]:02X}{d[1]:02X}]\n", 2)},
0x18: {
None: lambda d: (
f"[Image index={d[0]} pos={(d[1] << 8) + d[2]},{d[3]} hasBorder={d[4]} alpha={d[5]} fadeAmount={d[6]}]\n",
7,
)
},
0x19: {None: lambda d: (f"[HideImage fadeAmount={d[0]}]\n", 1)},
0x1A: {None: lambda d: (f"[AnimDelay index={d[1]} delay={d[2]}]", 3)},
0x1B: {None: lambda d: (f"[AnimLoop {d[0]} {d[1]}]", 2)},
0x1C: {None: lambda d: (f"[AnimDone {d[0]}]", 1)},
0x1E: {None: lambda d: (f"[Cursor {d[0]}]", 1)},
0x1F: {None: lambda d: (f"[EndChoice {d[0]}]", 1)},
0x20: {None: lambda d: (f"[SetCancel {d[0]}]", 1)},
0x21: {None: lambda d: (f"[Option {d[0]}]", 1)},
0x22: "[SavePos]",
0x23: "[RestorePos]",
0x24: {
0xFF: {
0x05: {
0x10: {0x98: {0xFF: {0x25: "[A]"}}},
0x11: {0x99: {0xFF: {0x25: "[B]"}}},
0x12: {0xA1: {0xFF: {0x25: "[START]"}}},
0x13: {
0x9D: {0xFF: {0x25: "[C-UP]"}},
0x9E: {0xFF: {0x25: "[C-DOWN]"}},
0x9F: {0xFF: {0x25: "[C-LEFT]"}},
0xA0: {0xFF: {0x25: "[C-RIGHT]"}},
},
0x14: {0x9C: {0xFF: {0x25: "[Z]"}}},
}
}
},
# 0x24: "[SaveColor]",
# 0x25: "[RestoreColor]",
0x26: {
0x00: "[Shake]",
0x01: "[Wave]",
0x02: "[NoiseOutline]",
0x03: {None: lambda d: (f"[Static {d[0]}]", 1)},
0x05: {None: lambda d: (f"[Blur dir={['x', 'y', 'xy'][d[0]]}]", 1)},
0x07: {None: lambda d: (f"[DitherFade {d[0]}]", 1)},
0x0A: "[PrintRising]",
0x0B: "[PrintGrowing]",
0x0C: "[SizeJitter]",
0x0D: "[SizeWave]",
0x0E: "[DropShadow]",
},
0x27: {
0x00: "[/Shake]",
0x01: "[/Wave]",
0x03: "[/Static]",
0x05: "[/Blur]",
0x07: "[/DitherFade]",
0x0A: "[/PrintRising]",
0x0B: "[/PrintGrowing]",
0x0C: "[/SizeJitter]",
0x0D: "[/SizeWave]",
0x0E: "[/DropShadow]",
},
0x28: {None: lambda d: (f"[Var {d[0]}]", 1)},
0x29: {None: lambda d: (f"[CenterX {d[0]}]", 1)},
0x2B: "[EnableCDownNext]",
0x2C: {
None: lambda d: (
f"[CustomVoice soundIDs=0x{d[0]:02X}{d[1]:02X}{d[2]:02X}{d[3]:02X},{d[4]:02X}{d[5]:02X}{d[6]:02X}{d[7]:02X}]",
8,
)
},
0x2E: {None: lambda d: (f"[Volume {d[0]}]", 1)},
0x2F: {
0: "[Voice normal]\n",
1: "[Voice bowser]\n",
2: "[Voice star]\n",
None: lambda d: (f"[Voice {d[0]}]\n", 1),
},
# None: lambda d: (f"[func_{d[0]:02X}]", 1),
},
None: lambda d: (f"[Raw 0x{d[0]:02X}]", 1),
}
CHARSET_CREDITS = {
**CHARSET,
**CHARSET_COMMON,
0x00: "A",
0x01: "B",
0x02: "C",
@ -387,7 +394,419 @@ CHARSET_CREDITS = {
0x26: "9",
0x27: "©",
0x28: "&",
}
CHARSET_JP_COMMON = {
**CHARSET_COMMON,
0xF3: "[Charset Kana]",
0xF4: "[Charset Latin]",
0xF5: "[Charset Kanji]",
0xF6: "[Charset Buttons]",
0xF7: " ",
0xF8: " ",
0xF9: "[HALFSPACE]",
0xFF: {
**CHARSET_COMMON[0xFF],
0x24: {
0xFF: {
0x05: {
0x10: {0xF6: {0x00: {0xFF: {0x25: "[A]"}}}},
0x11: {0xF6: {0x01: {0xFF: {0x25: "[B]"}}}},
0x12: {0xF6: {0x02: {0xFF: {0x25: "[START]"}}}},
0x13: {
0xF6: {
0x03: {0xFF: {0x25: "[C-UP]"}},
0x04: {0xFF: {0x25: "[C-DOWN]"}},
0x05: {0xFF: {0x25: "[C-LEFT]"}},
0x06: {0xFF: {0x25: "[C-RIGHT]"}},
}
},
0x14: {
0xF6: {
0x07: {0xFF: {0x25: "[Z]"}},
0x08: {0xFF: {0x25: "[L]"}},
0x09: {0xFF: {0x25: "[R]"}},
}
},
}
}
},
},
}
CHARSET_KANA = {
**CHARSET_JP_COMMON,
0x00: "",
0x01: "",
0x02: "",
0x03: "",
0x04: "",
0x05: "",
0x06: "",
0x07: "",
0x08: "",
0x09: "",
0x0A: "",
0x0B: "",
0x0C: "",
0x0D: "",
0x0E: "",
0x0F: "",
0x10: "",
0x11: "",
0x12: "",
0x13: "",
0x14: "",
0x15: "",
0x16: "",
0x17: "",
0x18: "",
0x19: "",
0x1A: "",
0x1B: "",
0x1C: "",
0x1D: "",
0x1E: "",
0x1F: "",
0x20: "",
0x21: "",
0x22: "",
0x23: "",
0x24: "",
0x25: "",
0x26: "",
0x27: "",
0x28: "",
0x29: "",
0x2A: "",
0x2B: "",
0x2C: "",
0x2D: "",
0x2E: "",
0x2F: "",
0x30: "",
0x31: "",
0x32: "",
0x33: "",
0x34: "",
0x35: "",
0x36: "",
0x37: "",
0x38: "",
0x39: "",
0x3A: "",
0x3B: "",
0x3C: "",
0x3D: "",
0x3E: "",
0x3F: "",
0x40: "",
0x41: "",
0x42: "",
0x43: "",
0x44: "",
0x45: "",
0x46: "",
0x47: "",
0x48: "",
0x49: "",
0x4A: "",
0x4B: "",
0x4C: "",
0x4D: "",
0x4E: "",
0x4F: "",
0x50: "",
0x51: "",
0x52: "",
0x53: "",
0x54: "",
0x55: "",
0x56: "",
0x57: "",
0x58: "",
0x59: "",
0x5A: "",
0x5B: "",
0x5C: "",
0x5D: "",
0x5E: "",
0x5F: "",
0x60: "",
0x61: "",
0x62: "",
0x63: "",
0x64: "",
0x65: "",
0x66: "",
0x67: "",
0x68: "",
0x69: "",
0x6A: "",
0x6B: "",
0x6C: "",
0x6D: "",
0x6E: "",
0x6F: "",
0x70: "",
0x71: "",
0x72: "",
0x73: "",
0x74: "",
0x75: "",
0x76: "",
0x77: "",
0x78: "",
0x79: "",
0x7A: "",
0x7B: "",
0x7C: "",
0x7D: "",
0x7E: "",
0x7F: "",
0x80: "",
0x81: "",
0x82: "",
0x83: "",
0x84: "",
0x85: "",
0x86: "",
0x87: "",
0x88: "",
0x89: "",
0x8A: "",
0x8B: "",
0x8C: "",
0x8D: "",
0x8E: "",
0x8F: "",
0x90: "",
0x91: "",
0x92: "",
0x93: "",
0x94: "",
0x95: "",
0x96: "",
0x97: "",
0x98: "",
0x99: "",
0x9A: "",
0x9B: "",
0x9C: "",
0x9D: "",
0x9E: "",
0x9F: "",
0xA0: "",
0xA1: "",
0xA2: "",
0xA3: "",
0xA4: {0xA5: {0xA6: "[LONGDASH]"}},
0xA7: "",
0xA8: "",
0xA9: "",
0xAA: "",
0xAB: "",
0xAC: "",
0xAD: "",
0xAE: "",
0xAF: "",
0xB0: "",
0xB1: "[UP]",
0xB2: "[DOWN]",
0xB3: "[LEFT]",
0xB4: "[RIGHT]",
0xB5: "",
0xB6: "",
0xB7: "",
0xB8: "",
0xB9: "",
0xBA: "",
0xBB: "",
0xBC: "",
0xBD: "[HEART]",
0xBE: "[STAR]",
0xBF: "",
0xC0: "",
0xC1: "",
0xC2: "",
0xC3: "",
0xC4: "[HIRAGANA SmallN]",
0xC5: "[KATAKANA SmallN]",
# existing characters without small counterparts
# 0xC4: "ん",
# 0xC5: "ン",
0xC6: "",
# 0xC7 is unused
}
CHARSET_LATIN = {
**CHARSET_JP_COMMON,
0x00: "",
0x01: "",
0x02: "",
0x03: "",
0x04: "",
0x05: "",
0x06: "",
0x07: "",
0x08: "",
0x09: "",
0x0A: "",
0x0B: "",
0x0C: "",
0x0D: "",
0x0E: "",
0x0F: "",
0x10: "",
0x11: "",
0x12: "",
0x13: "",
0x14: "",
0x15: "",
0x16: "",
0x17: "",
0x18: "",
0x19: "",
0x1A: "",
}
CHARSET_KANJI = {
**CHARSET_JP_COMMON,
0x00: "",
0x01: "",
0x02: "",
0x03: "",
0x04: "",
0x05: "",
0x06: "西",
0x07: "",
0x08: "",
0x09: "",
0x0A: "",
0x0B: "",
0x0C: "",
0x0D: "",
0x0E: "",
0x0F: "",
0x10: "",
0x11: "",
0x12: "",
0x13: "",
0x14: "",
0x15: "",
0x16: "",
0x17: "",
0x18: "",
0x19: "",
0x1A: "",
0x1B: "",
0x1C: "",
0x1D: "",
0x1E: "",
0x1F: "",
0x20: "",
0x21: "",
0x22: "",
0x23: "",
0x24: "",
0x25: "",
0x26: "",
0x27: "",
0x28: "",
0x29: "",
0x2A: "",
0x2B: "",
0x2C: "",
0x2D: "",
0x2E: "",
0x2F: "",
0x30: "",
0x31: "",
0x32: "",
0x33: "",
0x34: "",
0x35: "",
0x36: "",
0x37: "",
0x38: "",
0x39: "",
0x3A: "",
0x3B: "",
0x3C: "",
0x3D: "",
0x3E: "",
0x3F: "",
0x40: "使",
0x41: "",
0x42: "",
0x43: "",
0x44: "",
0x45: "",
0x46: "",
0x47: "",
0x48: "",
0x49: "",
0x4A: "",
0x4B: "",
0x4C: "",
0x4D: "",
0x4E: "",
0x4F: "",
0x50: "",
0x51: "",
0x52: "",
0x53: "",
0x54: "",
0x55: "",
0x56: "",
0x57: "",
0x58: "",
0x59: "",
0x5A: "",
0x5B: "",
0x5C: "",
0x5D: "",
0x5E: "",
0x5F: "",
0x60: "",
0x61: "[CIRCLE]",
0x62: "[CROSS]",
0x63: "",
0x64: "",
0x65: "",
0x66: "",
0x67: "",
0x68: "",
0x69: "",
0x6A: "[NOTE]",
0x6B: "",
0x6C: "",
0x6D: "",
0x6E: "",
0x6F: "",
0x70: "",
0x71: "",
0x72: "",
0x73: "",
0x74: "",
0x75: "",
0x76: "",
0x77: "",
0x78: "",
}
CHARSET_BUTTONS = {
**CHARSET_JP_COMMON,
0x00: "[~A]",
0x01: "[~B]",
0x02: "[~START]",
0x03: "[~C-UP]",
0x04: "[~C-DOWN]",
0x05: "[~C-LEFT]",
0x06: "[~C-RIGHT]",
0x07: "[~Z]",
0x08: "[~L]",
0x09: "[~R]",
}
@ -488,7 +907,10 @@ class N64SegPm_msg(N64Segment):
def write_message_markup(self, data):
pos = 0
self.root_charset = CHARSET
if "ver/jp" in str(options.opts.target_path):
self.root_charset = CHARSET_KANA
else:
self.root_charset = CHARSET_STANDARD
while data[pos] != 0xFD:
self.charset = self.root_charset
@ -531,7 +953,16 @@ class N64SegPm_msg(N64Segment):
if markup_lower == "[font title]\n" or markup_lower == "[font subtitle]\n":
self.root_charset = CHARSET_CREDITS
elif markup_lower == "[font standard]":
self.root_charset = CHARSET
self.root_charset = CHARSET_STANDARD
elif "ver/jp" in str(options.opts.target_path):
if markup_lower == "[charset kana]":
self.root_charset = CHARSET_KANA
elif markup_lower == "[charset latin]":
self.root_charset = CHARSET_LATIN
elif markup_lower == "[charset kanji]":
self.root_charset = CHARSET_KANJI
elif markup_lower == "[charset buttons]":
self.root_charset = CHARSET_BUTTONS
def cache(self):
return (self.yaml, self.rom_end, self.msg_names)

File diff suppressed because it is too large Load Diff

View File

@ -3282,8 +3282,60 @@ segments:
- [0x1C7F208, bin ]
- start: 0x1D40000
type: bin
name: pm_msg # TODO: fix message dumping for JP
type: pm_msg
name: msg_jp
files:
- 00_Intro
- 01_Outro
- 02_ToadTownGate
- 03_ToadTownPlaza
- 04_ToadTownBridge
- 05_ToadTownStation
- 06_ToadTownHousing
- 07_ToadTownPort
- 08_Minigame
- 09_CastleGrounds
- 0A_ShootingStarSummit
- 0B_Prologue
- 0C_Chapter1
- 0D_Chapter2
- 0E_Chapter3
- 0F_Chapter4
- 10_Chapter5
- 11_Chapter6
- 12_Chapter7
- 13_Chapter8
- 14_Peach
- 15_KootFavors
- 16_RussTHints
- 17_Unused
- 18_Unused
- 19_NewsBoard
- 1A_GossipBoard
- 1B_MapTattles
- 1C_NpcTattles
- 1D_EntityTattles
- 1E_EnemyTattles
- 1F_Unused
- 20_Menus
- 21_Choices
- 22_MenuTips
- 23_Documents
- 24_QuizQuestions
- 25_QuizChoices
- 26_MerlonHints
- 27_MerluvleeHints
- 28_ShortItemDesc
- 29_ShopItemDesc
- 2A_FullItemDesc
- 2B_ItemNames
- 2C_PlayerMoves
- 2D_Shops
- 2E_PartnerDesc
- 2F_PartnerMoves
- 30_TestStrings
- 31_EnemyNames
- 32_Credits
- [0x1DDBE60, bin]
- [0x1E00000, pm_map_data, mapfs]