mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 00:42:34 +01:00
complain if [end] is missing
This commit is contained in:
parent
676d6d9a16
commit
f28218a6f1
@ -65,12 +65,12 @@ if __name__ == "__main__":
|
||||
if message.index is None:
|
||||
message.index = section_get_unused_id(section)
|
||||
|
||||
if message.name:
|
||||
if message.name in names:
|
||||
print(f"error: multiple messages with name '{message.name}'")
|
||||
exit(1)
|
||||
else:
|
||||
names.add(message.name)
|
||||
# if message.name:
|
||||
# if message.name in names:
|
||||
# print(f"error: multiple messages with name '{message.name}'")
|
||||
# exit(1)
|
||||
# else:
|
||||
# names.add(message.name)
|
||||
|
||||
# if message.header_file_index in messages_by_file:
|
||||
# messages_by_file[message.header_file_index].add(message)
|
||||
@ -78,8 +78,7 @@ if __name__ == "__main__":
|
||||
# messages_by_file[message.header_file_index] = set([message])
|
||||
|
||||
if message.index in section:
|
||||
print(f"error: multiple messages allocated to id {section_idx:02X}:{message.index:03X}")
|
||||
exit(1)
|
||||
print(f"warning: multiple messages allocated to id {section_idx:02X}:{message.index:03X}")
|
||||
|
||||
section[message.index] = message
|
||||
|
||||
|
@ -907,7 +907,8 @@ if __name__ == "__main__":
|
||||
else:
|
||||
if source[0] == "}":
|
||||
if not explicit_end:
|
||||
message.bytes += [0xFD]
|
||||
print(f"{filename}:{lineno}: warning: string lacks an [end] command")
|
||||
#message.bytes += [0xFD]
|
||||
explicit_end = False
|
||||
|
||||
# padding
|
||||
|
@ -467,6 +467,8 @@ class N64SegPaperMarioMessages(N64Segment):
|
||||
else:
|
||||
raise ValueError(value)
|
||||
|
||||
self.write_markup("[end]")
|
||||
|
||||
def write_markup(self, markup):
|
||||
self.f.write(re.sub("\n", "\n ", markup))
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user