Fix intro text
This commit is contained in:
19
Rom.py
19
Rom.py
@@ -2756,13 +2756,18 @@ def write_strings(rom, world, player, team):
|
|||||||
tt['menu_start_3'] = "{MENU}\n{SPEED0}\n≥@'s " + lh_text + "\n " + sanc_text + "\n Mountain Cave\n{CHOICE2}"
|
tt['menu_start_3'] = "{MENU}\n{SPEED0}\n≥@'s " + lh_text + "\n " + sanc_text + "\n Mountain Cave\n{CHOICE2}"
|
||||||
if world.mode[player] == 'inverted':
|
if world.mode[player] == 'inverted':
|
||||||
tt['intro_main'] = CompressedTextMapper.convert(
|
tt['intro_main'] = CompressedTextMapper.convert(
|
||||||
"{INTRO}\n Episode III\n{PAUSE3}\n A Link to\n the Past\n"
|
"{INTRO}\n Episode III"
|
||||||
+ "{PAUSE3}\nInverted\n Randomizer\n{PAUSE3}\nAfter mostly disregarding what happened in the first two games.\n"
|
+ "{PAUSE3}\n A Link to the Past"
|
||||||
+ "{PAUSE3}\nLink has been transported to the Dark World\n{PAUSE3}\nWhile he was slumbering\n"
|
+ "{PAUSE3}\nInverted Randomizer"
|
||||||
+ "{PAUSE3}\nWhatever will happen?\n{PAUSE3}\n{CHANGEPIC}\nGanon has moved around all the items in Hyrule.\n"
|
+ "{PAUSE3}\n\n\n"
|
||||||
+ "{PAUSE7}\nYou will have to find all the items necessary to beat Ganon.\n"
|
+ "{PAUSE3}\nAfter mostly disregarding what happened in the first two games,"
|
||||||
+ "{PAUSE7}\nThis is your chance to be a hero.\n{PAUSE3}\n{CHANGEPIC}\n"
|
+ "{PAUSE3}\nLink has been transported to the Dark World, while he was slumbering."
|
||||||
+ "You must get the 7 crystals to beat Ganon.\n{PAUSE9}\n{CHANGEPIC}", False)
|
+ "{PAUSE3}\n\nWhatever will happen?"
|
||||||
|
+ "{PAUSE3} {CHANGEPIC}\nGanon has moved around all the items in Hyrule."
|
||||||
|
+ "{PAUSE7}\nYou will have to find all the items necessary to beat Ganon."
|
||||||
|
+ "{PAUSE7}\nThis is your chance to be a hero."
|
||||||
|
+ "{PAUSE3} {CHANGEPIC}\nYou must get the 7 crystals to beat Ganon."
|
||||||
|
+ "{PAUSE9} {CHANGEPIC}", False)
|
||||||
rom.write_bytes(0xE0000, tt.getBytes())
|
rom.write_bytes(0xE0000, tt.getBytes())
|
||||||
|
|
||||||
credits = Credits()
|
credits = Credits()
|
||||||
|
|||||||
35
Text.py
35
Text.py
@@ -648,7 +648,7 @@ class MultiByteCoreTextMapper(object):
|
|||||||
outbuf = bytearray()
|
outbuf = bytearray()
|
||||||
lineindex = 0
|
lineindex = 0
|
||||||
is_intro = '{INTRO}' in text
|
is_intro = '{INTRO}' in text
|
||||||
first_line=True
|
first_line = True
|
||||||
|
|
||||||
while lines:
|
while lines:
|
||||||
linespace = wrap
|
linespace = wrap
|
||||||
@@ -679,20 +679,19 @@ class MultiByteCoreTextMapper(object):
|
|||||||
outbuf.extend(cls.special_commands[start_command])
|
outbuf.extend(cls.special_commands[start_command])
|
||||||
word = word.replace(start_command, '')
|
word = word.replace(start_command, '')
|
||||||
|
|
||||||
match = re.search(r'(\{[A-Z0-9_:]+\})\.?$', word)
|
match = re.search(r'(\{[A-Z0-9_:]+\})$', word)
|
||||||
if match:
|
if match:
|
||||||
end_command = match.group(1)
|
end_command = match.group(1)
|
||||||
word = word.replace(end_command, '')
|
word = word.replace(end_command, '')
|
||||||
period = word.endswith('.')
|
|
||||||
else:
|
else:
|
||||||
end_command, period = None, False
|
end_command = None
|
||||||
|
|
||||||
# sanity check: if the word we have is more than 19 characters,
|
# sanity check: if the word we have is more than 19 characters,
|
||||||
# we take as much as we can still fit and push the rest back for later
|
# we take as much as we can still fit and push the rest back for later
|
||||||
if cls.wordlen(word) > wrap:
|
if cls.wordlen(word) > wrap:
|
||||||
(word_first, word_rest) = cls.splitword(word, linespace)
|
(word_first, word_rest) = cls.splitword(word, linespace)
|
||||||
if end_command:
|
if end_command:
|
||||||
word_rest = (word_rest[:-1] + end_command + '.') if period else (word_rest + end_command)
|
word_rest = word_rest + end_command
|
||||||
words.insert(0, word_rest)
|
words.insert(0, word_rest)
|
||||||
lines.insert(0, ' '.join(words))
|
lines.insert(0, ' '.join(words))
|
||||||
|
|
||||||
@@ -705,16 +704,13 @@ class MultiByteCoreTextMapper(object):
|
|||||||
if cls.wordlen(word) < linespace:
|
if cls.wordlen(word) < linespace:
|
||||||
pending_space = True
|
pending_space = True
|
||||||
linespace -= cls.wordlen(word) + 1 if pending_space else 0
|
linespace -= cls.wordlen(word) + 1 if pending_space else 0
|
||||||
word_to_map = word[:-1] if period else word
|
outbuf.extend(RawMBTextMapper.convert(word))
|
||||||
outbuf.extend(RawMBTextMapper.convert(word_to_map))
|
|
||||||
if end_command:
|
if end_command:
|
||||||
outbuf.extend(cls.special_commands[end_command])
|
outbuf.extend(cls.special_commands[end_command])
|
||||||
if period:
|
|
||||||
outbuf.extend(RawMBTextMapper.convert('.'))
|
|
||||||
else:
|
else:
|
||||||
# ran out of space, push word and lines back and continue with next line
|
# ran out of space, push word and lines back and continue with next line
|
||||||
if end_command:
|
if end_command:
|
||||||
word = (word[:-1] + end_command + '.') if period else (word + end_command)
|
word = word + end_command
|
||||||
words.insert(0, word)
|
words.insert(0, word)
|
||||||
lines.insert(0, ' '.join(words))
|
lines.insert(0, ' '.join(words))
|
||||||
break
|
break
|
||||||
@@ -1895,13 +1891,18 @@ class TextTable(object):
|
|||||||
text['magic_bat_wake'] = CompressedTextMapper.convert("You bum! I was sleeping! Where's my magic bolts?")
|
text['magic_bat_wake'] = CompressedTextMapper.convert("You bum! I was sleeping! Where's my magic bolts?")
|
||||||
text['magic_bat_give_half_magic'] = CompressedTextMapper.convert("How you like me now?")
|
text['magic_bat_give_half_magic'] = CompressedTextMapper.convert("How you like me now?")
|
||||||
text['intro_main'] = CompressedTextMapper.convert(
|
text['intro_main'] = CompressedTextMapper.convert(
|
||||||
"{INTRO}\n Episode III\n{PAUSE3}\n A Link to\n the Past\n"
|
"{INTRO}\n Episode III"
|
||||||
+ "{PAUSE3}\n Randomizer\n{PAUSE3}\nAfter mostly disregarding what happened in the first two games.\n"
|
+ "{PAUSE3}\n A Link to the Past"
|
||||||
+ "{PAUSE3}\nLink awakens to his uncle leaving the house.\n{PAUSE3}\nHe just runs out the door,\n"
|
+ "{PAUSE3}\n Randomizer"
|
||||||
+ "{PAUSE3}\ninto the rainy night.\n{PAUSE3}\n{CHANGEPIC}\nGanon has moved around all the items in Hyrule.\n"
|
+ "{PAUSE3}\n\n\n"
|
||||||
+ "{PAUSE7}\nYou will have to find all the items necessary to beat Ganon.\n"
|
+ "{PAUSE3}\nAfter mostly disregarding what happened in the first two games,"
|
||||||
+ "{PAUSE7}\nThis is your chance to be a hero.\n{PAUSE3}\n{CHANGEPIC}\n"
|
+ "{PAUSE3}\nLink awakens to his uncle leaving the house."
|
||||||
+ "You must get the 7 crystals to beat Ganon.\n{PAUSE9}\n{CHANGEPIC}", False)
|
+ "{PAUSE3}\nHe just runs out the door, into the rainy night."
|
||||||
|
+ "{PAUSE3} {CHANGEPIC}\nGanon has moved around all the items in Hyrule."
|
||||||
|
+ "{PAUSE7}\nYou will have to find all the items necessary to beat Ganon."
|
||||||
|
+ "{PAUSE7}\nThis is your chance to be a hero."
|
||||||
|
+ "{PAUSE3} {CHANGEPIC}\nYou must get the 7 crystals to beat Ganon."
|
||||||
|
+ "{PAUSE9} {CHANGEPIC}", False)
|
||||||
text['intro_throne_room'] = CompressedTextMapper.convert("{IBOX}\nLook at this Stalfos on the throne.", False)
|
text['intro_throne_room'] = CompressedTextMapper.convert("{IBOX}\nLook at this Stalfos on the throne.", False)
|
||||||
text['intro_zelda_cell'] = CompressedTextMapper.convert("{IBOX}\nIt is your time to shine!", False)
|
text['intro_zelda_cell'] = CompressedTextMapper.convert("{IBOX}\nIt is your time to shine!", False)
|
||||||
text['intro_agahnim'] = CompressedTextMapper.convert("{IBOX}\nAlso, you need to defeat this guy!", False)
|
text['intro_agahnim'] = CompressedTextMapper.convert("{IBOX}\nAlso, you need to defeat this guy!", False)
|
||||||
|
|||||||
Reference in New Issue
Block a user