Skip to content
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

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

Conversation

Crauzer
Copy link
Member

@Crauzer Crauzer commented Nov 11, 2024

  • Create utils functions for modpkg

@Crauzer Crauzer added the enhancement New feature or request label Nov 11, 2024
@Crauzer Crauzer self-assigned this Nov 11, 2024
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()) {
Copy link
Member Author

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

@Crauzer Crauzer mentioned this pull request Nov 11, 2024
4 tasks
crates/league-modpkg/src/read.rs Outdated Show resolved Hide resolved
crates/league-modpkg/src/chunk.rs Show resolved Hide resolved
crates/league-modpkg/src/read.rs Outdated Show resolved Hide resolved
return Err(ModpkgError::MissingBaseLayer);
}

let chunks = Self::read_chunks(reader, chunk_count)?;

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

@Crauzer
Copy link
Member Author

Crauzer commented Nov 12, 2024

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

@moonshadow565
Copy link

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?

@Crauzer
Copy link
Member Author

Crauzer commented Nov 13, 2024

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

3 participants