Skip to content

Commit 1f0a9ff

Browse files
committed
Add idTech asset inspectors and sprite loader
Introduce dedicated idTech asset inspectors and sprite decoding support. Adds new src/formats/idtech_asset_loader.* (is_supported_idtech_asset_file, decode_idtech_asset_bytes, IdTechAssetDecodeResult) to parse SPR, SP2/SPR2, DM2, AAS and QVM metadata/summaries. Adds src/formats/sprite_loader.* to decode SPR/SP2 frame tables and images (with palette handling and animation timing). Update image/MIP handling: decode_miptex_image now accepts a texture name and detects index-255 transparency for '{' prefixed basenames; callers (image_loader.cpp and bsp_preview.cpp) pass file names through to texture decoders. Documentation and README updated to list the new supported formats and the UI behavior for opening nested containers.
1 parent d1afb8b commit 1f0a9ff

19 files changed

Lines changed: 2164 additions & 94 deletions

README.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@ This project is still training under the waterfall 💦🥋 (early development).
2020
- Audio: `wav`, `ogg`, `mp3` 🔊🎶
2121
- Video: `cin`, `roq`, `ogv` 🎞️🍿
2222
- Models: `mdl`, `md2`, `md3`, `iqm`, `md5mesh`, `lwo`, `obj` 🧊🧩
23+
- Sprites: `spr`, `sp2`/`spr2` (animated sprite preview + metadata/frame table insights) 🧾🎯
24+
- Demos: `dm2` (Quake II packet stream summary preview) 📼🧾
2325
- Maps: `bsp` (Quake/Quake II/Quake III/Quake Live) 🗺️🧭
24-
- Text/config: `cfg` and similar plain-text formats 🧾🖋️
26+
- Navigation/VM: `aas`, `qvm` (header/lump summary preview) 🧠📦
27+
- Text/config: `cfg`, `arena`, `bot`, `skin`, `shaderlist`, and similar plain-text formats 🧾🖋️
2528
- Tune 3D previews with grid/floor/none options, themed/grey/custom backgrounds, and wireframe/textured toggles
2629
- Quake II previews honor `_glow.png` glow maps for textures and models
2730
- WAD support: read/extract `WAD2` and `WAD3`, rebuild/write `WAD2`
@@ -111,6 +114,7 @@ meson compile -C build
111114
### GUI 🪟
112115
- Use **File → Open Archive…** or **File → Open Folder…** (opens in a tab).
113116
- Drag archives or folders onto the window to open them.
117+
- Double-click nested container files (`wad`, `wad2`, `wad3`, `pak`, `pk3`, `pk4`, `pkz`, `zip`) to open them in-place.
114118
- Drag files/folders into an open archive tab to add them.
115119
- Drag items out of PakFu to copy them to your file manager (exports via temp files).
116120

docs/DEPENDENCIES.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,13 @@
4545
- Cinematics (built-in decoders; used for thumbnails + playback widget):
4646
- CIN: id Quake II cinematic (PAL8 + optional PCM audio)
4747
- ROQ: id RoQ (vector quantized video + optional RoQ DPCM audio)
48+
49+
- idTech asset inspectors (built-in metadata parsers):
50+
- SPR: Quake/idTech2 sprite decode + animated preview + metadata/frame table summary
51+
- SP2 / SPR2: Quake II sprite frame references resolve to animated preview + metadata/frame table summary
52+
- DM2: Quake II demo packet stream summary
53+
- AAS: Quake III bot navigation header + lump summary
54+
- QVM: Quake III VM bytecode header + segment summary
55+
56+
- Text/script preview:
57+
- Includes Quake-style script/config assets such as `cfg`, `arena`, `bot`, `skin`, `shaderlist`, `shader`, and `menu`

src/formats/bsp_preview.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2525,7 +2525,7 @@ QHash<QString, QImage> extract_bsp_embedded_textures_bytes(const QByteArray& byt
25252525

25262526
const QByteArray mip_bytes = tex_lump.mid(base, static_cast<int>(slice_len));
25272527
QString mip_err;
2528-
const QImage img = decode_miptex_image(mip_bytes, quake_palette, 0, &mip_err);
2528+
const QImage img = decode_miptex_image(mip_bytes, quake_palette, 0, name, &mip_err);
25292529
if (!img.isNull()) {
25302530
out.insert(name, img);
25312531
}

0 commit comments

Comments
 (0)