mirror of
https://github.com/pmret/papermario.git
synced 2024-11-18 08:52:40 +01:00
fix message headers
This commit is contained in:
parent
d687f84d35
commit
46d7a144e7
@ -389,6 +389,7 @@ async def main():
|
||||
msg_files = []
|
||||
for d in ASSET_DIRS:
|
||||
msg_files.extend(glob(d + "/**/*.msg", recursive=True))
|
||||
msg_files = list(set(msg_files)) # dedup
|
||||
for msg_file in msg_files:
|
||||
n.build(
|
||||
f"$builddir/{msg_file.split('/', 1)[1]}.bin",
|
||||
@ -397,7 +398,7 @@ async def main():
|
||||
implicit="tools/msg/parse_compile.py",
|
||||
)
|
||||
msg_headers = [add_generated_header(f"$builddir/include/{msg_file.split('/', 1)[1]}.h") for msg_file in msg_files]
|
||||
msg_bins = list(set([f"$builddir/{msg_file.split('/', 1)[1]}.bin" for msg_file in msg_files]))
|
||||
msg_bins = [f"$builddir/{msg_file.split('/', 1)[1]}.bin" for msg_file in msg_files]
|
||||
n.build(
|
||||
"$builddir/msg.bin",
|
||||
"msg_combine",
|
||||
|
@ -53,7 +53,7 @@ if __name__ == "__main__":
|
||||
sections.append([])
|
||||
section = sections[section_idx]
|
||||
|
||||
index = message.index if message.index is not None else len(section)
|
||||
message.index = index = message.index if message.index is not None else len(section)
|
||||
|
||||
if message.name:
|
||||
if message.name in names:
|
||||
@ -104,7 +104,7 @@ if __name__ == "__main__":
|
||||
)
|
||||
|
||||
for message in messages:
|
||||
h += f"#define MessageID_{message.name} MESSAGE_ID({message.section}, {message.index})\n"
|
||||
h += f"#define MSG_{message.name} MESSAGE_ID({message.section}, {message.index})\n"
|
||||
|
||||
h += "\n#endif\n"
|
||||
h_lines = h.splitlines()
|
||||
|
Loading…
Reference in New Issue
Block a user