@@ -13,75 +13,75 @@ A collection of crates handling World of Warcraft file formats for WoW 1.12.1,
1313
1414</div >
1515
16- ` warcraft-rs ` is part of a fantastic Rust WoW community. Be sure to check out
17- [ awesome-wow-rust] ( https://github.com/arlyon/awesome-wow-rust ) for more cool
18- projects and a link to official WoW Rust Discord.
16+ ` warcraft-rs ` is part of the Rust WoW community. See
17+ [ awesome-wow-rust] ( https://github.com/arlyon/awesome-wow-rust ) for other
18+ projects and a link to the WoW Rust Discord.
1919
2020## Features
2121
2222### 📦 Format Support
2323
2424- ** MPQ Archives** - Read, write, modify, rebuild and compare MPQ archive files (v1-v4)
25- - ✅ ** Full StormLib Compatibility** - 100% bidirectional compatibility with reference implementation
26- - ✅ ** 100% WoW Version Support** - Tested with all versions from 1.12.1 through 5.4.8
25+ - ✅ ** StormLib Compatibility** - Bidirectional compatibility with reference implementation
26+ - ✅ ** WoW Version Support** - Tested with versions 1.12.1 through 5.4.8
2727 - ✏️ ** Archive Modification** - Add, remove, and rename files with automatic listfile/attributes updates
28- - 🔄 ** Archive Rebuilding** - Recreate archives 1:1 with format upgrades and optimization
28+ - 🔄 ** Archive Rebuilding** - Recreate archives with format upgrades and optimization
2929 - 🔍 ** Archive Comparison** - Compare archives for differences in metadata, files, and content
30- - 🔐 ** Digital Signatures** - Generate and verify archive signatures for integrity protection
31- - 🎮 ** Official WoW Archive Support** - Handles all Blizzard-specific quirks and format variations
30+ - 🔐 ** Digital Signatures** - Generate and verify archive signatures
31+ - 🎮 ** Official WoW Archive Support** - Handles Blizzard-specific quirks and format variations
3232- ** DBC Database** - Parse client database files
3333- ** BLP Textures** - Handle texture files
3434- ** M2 Models** - Work with character and creature models
3535- ** WMO Objects** - Process world map objects (buildings, structures)
36- - ✅ ** Full Format Support** - Parse and write root and group files
37- - ✅ ** All WoW Versions** - Supports v17 (Classic) through v27 (The War Within)
36+ - ✅ ** Format Support** - Parse and write root and group files
37+ - ✅ ** WoW Versions** - Supports v17 (Classic) through v27 (The War Within)
3838 - 🔄 ** Version Conversion** - Convert between expansions (Classic → Cataclysm, etc.)
3939 - 🏗️ ** Builder API** - Create WMO files programmatically
40- - 🔍 ** Comprehensive Validation** - Field-level and structural checks
40+ - 🔍 ** Validation** - Field-level and structural checks
4141- ** ADT Terrain** - Parse terrain and map data
4242- ** WDT Maps** - World map definitions and tile layouts
4343- ** WDL Maps** - Low-resolution terrain heightmaps
4444
4545### 🛠️ Command-Line Tools
4646
47- Each format comes with its own CLI tool for common operations :
47+ CLI tools for each format :
4848
4949``` bash
5050# MPQ archive manipulation
5151warcraft-rs mpq list archive.mpq
5252warcraft-rs mpq extract archive.mpq --output ./extracted
5353warcraft-rs mpq create new.mpq --add file1.txt --add file2.dat
5454warcraft-rs mpq info archive.mpq
55- warcraft-rs mpq tree archive.mpq # NEW! Visualize archive structure
55+ warcraft-rs mpq tree archive.mpq # Visualize archive structure
5656
57- # Archive rebuild and comparison (NEW!)
57+ # Archive rebuild and comparison
5858warcraft-rs mpq rebuild original.mpq rebuilt.mpq --upgrade-to v4
5959warcraft-rs mpq compare original.mpq rebuilt.mpq --content-check
6060
6161# WDL terrain data manipulation
6262warcraft-rs wdl validate terrain.wdl
6363warcraft-rs wdl info terrain.wdl
6464warcraft-rs wdl convert terrain.wdl terrain_new.wdl --to wotlk
65- warcraft-rs wdl tree terrain.wdl # NEW! Visualize WDL structure
65+ warcraft-rs wdl tree terrain.wdl # Visualize WDL structure
6666
6767# WDT map operations
6868warcraft-rs wdt info map.wdt
6969warcraft-rs wdt validate map.wdt
7070warcraft-rs wdt convert map.wdt map_new.wdt --to wotlk
7171warcraft-rs wdt tiles map.wdt
72- warcraft-rs wdt tree map.wdt # NEW! Visualize WDT structure
72+ warcraft-rs wdt tree map.wdt # Visualize WDT structure
7373
7474# ADT terrain operations
7575warcraft-rs adt info terrain.adt
7676warcraft-rs adt validate terrain.adt --level strict
7777warcraft-rs adt convert classic.adt cata.adt --to cataclysm
78- warcraft-rs adt tree terrain.adt # NEW! Visualize ADT structure
78+ warcraft-rs adt tree terrain.adt # Visualize ADT structure
7979
8080# WMO object operations
8181warcraft-rs wmo info building.wmo
8282warcraft-rs wmo validate building.wmo --warnings
8383warcraft-rs wmo convert classic.wmo modern.wmo --to 21
84- warcraft-rs wmo tree building.wmo # NEW! Visualize WMO structure
84+ warcraft-rs wmo tree building.wmo # Visualize WMO structure
8585warcraft-rs wmo edit building.wmo --set-flag has-fog
8686warcraft-rs wmo build new.wmo --from config.yaml
8787
@@ -93,7 +93,7 @@ warcraft-rs m2 info model.m2
9393
9494### 📚 Library Usage
9595
96- All formats can also be used as Rust libraries:
96+ Using formats as Rust libraries:
9797
9898``` rust
9999use wow_mpq :: {Archive , ArchiveBuilder , MutableArchive , AddFileOptions };
@@ -126,29 +126,33 @@ println!("ADT version: {:?}", adt.version);
126126println! (" Terrain chunks: {}" , adt . mcnk_chunks (). len ());
127127
128128// Validate the ADT file
129- adt . validate_with_report (ValidationLevel :: Standard )? ;
129+ let report = adt . validate_with_report (ValidationLevel :: Standard )? ;
130+ println! (" Validation passed with {} warnings" , report . warnings. len ());
130131```
131132
132133``` rust
133134// WMO object parsing and manipulation
134- use wow_wmo :: {WmoRoot , WmoGroup , WmoParser , WmoWriter , WmoVersion };
135+ use wow_wmo :: {WmoParser , WmoWriter , WmoVersion , WmoConverter };
135136use std :: fs;
137+ use std :: io :: Cursor ;
136138
137139// Parse WMO root file
138140let data = fs :: read (" building.wmo" )? ;
139- let wmo = WmoParser :: parse_root (& data )? ;
141+ let mut cursor = Cursor :: new (& data );
142+ let parser = WmoParser :: new ();
143+ let wmo = parser . parse_root (& mut cursor )? ;
140144println! (" WMO version: v{}" , wmo . version. to_raw ());
141145println! (" Groups: {}" , wmo . groups. len ());
142146println! (" Materials: {}" , wmo . materials. len ());
143147
144148// Convert to a different version
145- let mut wmo = wmo ;
146- wmo . convert_to ( WmoVersion :: Cataclysm )? ;
149+ let converter = WmoConverter :: new () ;
150+ let converted_wmo = converter . convert ( & wmo , WmoVersion :: Cataclysm )? ;
147151
148152// Save the converted file
149153let writer = WmoWriter :: new ();
150154let mut output = Vec :: new ();
151- writer . write_root (& mut output , & wmo , WmoVersion :: Cataclysm )? ;
155+ writer . write_root (& mut output , & converted_wmo , WmoVersion :: Cataclysm )? ;
152156fs :: write (" building_cata.wmo" , output )? ;
153157```
154158
@@ -195,7 +199,7 @@ warcraft-rs mpq tree patch.mpq --depth 3 # Visualize archive structure
195199# Extract files
196200warcraft-rs mpq extract patch.mpq --output ./extracted --preserve-paths
197201
198- # Rebuild and modernize an archive
202+ # Rebuild an archive
199203warcraft-rs mpq rebuild old.mpq modern.mpq --upgrade-to v4 --compression lzma
200204
201205# Verify the rebuild
@@ -210,25 +214,24 @@ warcraft-rs wmo tree building.wmo --show-refs # See WMO structure with reference
210214
211215## Documentation
212216
213- Comprehensive documentation is available in the ` docs/ ` directory:
217+ Documentation in the ` docs/ ` directory:
214218
215219- [ Getting Started] ( docs/getting-started/quick-start.md )
216220- [ Format Documentation] ( docs/formats/ )
217221- [ API Reference] ( docs/api/ )
218222- [ Examples and Guides] ( docs/guides/ )
219- - ** [ 📦 MPQ CLI Usage Guide] ( docs/guides/mpq-cli-usage.md ) ** - Complete CLI
220- reference with rebuild and compare examples
223+ - ** [ 📦 MPQ CLI Usage Guide] ( docs/guides/mpq-cli-usage.md ) ** - CLI
224+ reference with examples
221225 - ** [ 📦 MPQ Archives Guide] ( docs/guides/mpq-archives.md ) ** - Programming guide
222226 with rebuild and comparison APIs
223227 - ** [ 🔍 StormLib vs wow-mpq] ( docs/guides/stormlib-differences.md ) ** - Technical
224228 comparison with the reference implementation
225- - ** [ 🏰 WMO CLI Usage Guide] ( docs/guides/wmo-cli-usage.md ) ** - Complete guide
229+ - ** [ 🏰 WMO CLI Usage Guide] ( docs/guides/wmo-cli-usage.md ) ** - Guide
226230 for working with World Map Objects
227231
228232## 🤝 Contributing
229233
230- We welcome contributions! Please see our [ Contributing Guide] ( CONTRIBUTING.md ) for
231- details on:
234+ See the [ Contributing Guide] ( CONTRIBUTING.md ) for:
232235
233236- Setting up your development environment
234237- Finding issues to work on
@@ -247,7 +250,7 @@ This project uses GitHub Actions for continuous integration:
247250
248251### Contributors
249252
250- Special thanks to all our [ contributors] ( CONTRIBUTORS.md ) !
253+ Thanks to all [ contributors] ( CONTRIBUTORS.md ) .
251254
252255---
253256
0 commit comments