-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: rework modpkg format #24
base: main
Are you sure you want to change the base?
Conversation
Crauzer
commented
Nov 11, 2024
•
edited
Loading
edited
- Create utils functions for modpkg
let wad_paths: Vec<String> = rmp_serde::from_slice(&wad_paths)?; | ||
|
||
let layers: Vec<String> = rmp_serde::from_slice(&layers)?; | ||
if !layers.contains(&"base".to_string()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This check is not correct, need to fix
return Err(ModpkgError::MissingBaseLayer); | ||
} | ||
|
||
let chunks = Self::read_chunks(reader, chunk_count)?; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i would appreciate if there was alignment check to make sure chunks are aligned to 8 here
not strictly required but it's a nice thing to do
btw I'm probably in favor of doing our own serialization for metadata and strings, there seem to be differences between msgpack libraries in how they handle enums for example, so I'd like to avoid potential issues there |
what about having metadata and strings table being just chunks instead of dedicated fields? |
Sure, I don't think it should cause too much trouble for the user |