Skip to content

Conversation

@nocthir
Copy link
Contributor

@nocthir nocthir commented Oct 1, 2025

  • Introduce combined_alpha_map::CombinedAlphaMap for decoding/packing up to 3 terrain layer alpha maps into a single 64×64 RGBA structure.
  • Flatten McnkChunk.alpha_maps from Vec<Vec<u8>> to a single contiguous Vec<u8> matching on-disk MCAL layout.
  • Add McnkChunk::get_combined_alpha_map(has_big_alpha, fix_alpha) convenience constructor.
  • Remove legacy alpha conversion path (convert_alpha_maps) from mcnk_converter; now alpha data is passed through unchanged.
  • Update ADT builder to flatten per-layer alpha maps directly when constructing chunks.
  • Adjust MCNK writer to emit the flattened alpha buffer in one shot.
  • Simplify reader logic: read raw MCAL payload once (no per-layer slicing) and defer interpretation to CombinedAlphaMap.
  • Export CombinedAlphaMap via crate root.
  • Comprehensive unit tests for alpha ingestion.

- Introduce combined_alpha_map::CombinedAlphaMap for decoding/packing up
  to 3 terrain layer alpha maps into a single 64×64 RGBA structure.
- Flatten McnkChunk.alpha_maps from Vec<Vec<u8>> to a single contiguous
  Vec<u8> matching on-disk MCAL layout.
- Add McnkChunk::get_combined_alpha_map(has_big_alpha, fix_alpha)
  convenience constructor.
- Remove legacy alpha conversion path (convert_alpha_maps) from
  mcnk_converter; now alpha data is passed through unchanged.
- Update ADT builder to flatten per-layer alpha maps directly when
  constructing chunks.
- Adjust MCNK writer to emit the flattened alpha buffer in one shot.
- Simplify reader logic: read raw MCAL payload once (no per-layer slicing)
  and defer interpretation to CombinedAlphaMap.
- Export CombinedAlphaMap via crate root.
- Comprehensive unit tests for alpha ingestion.
@danielsreichenbach
Copy link
Member

This looks nicely done to me, so thanks very much for that. I will merge this for now, and spend a wee bit of time later to see if I can get this checked for later ADT versions.

@danielsreichenbach danielsreichenbach merged commit b78435c into wowemulation-dev:main Oct 4, 2025
18 of 19 checks passed
@nocthir nocthir deleted the combined-alpha-map branch October 4, 2025 10:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants