aboutsummaryrefslogtreecommitdiff
path: root/crates/nres
Commit message (Collapse)AuthorAgeFilesLines
* feat(render-core): add default UV scale and refactor UV mapping logicValentin Popov9 days1-23/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Introduced a constant `DEFAULT_UV_SCALE` for UV scaling. - Refactored UV mapping in `build_render_mesh` to use the new constant. - Simplified `compute_bounds` functions by extracting common logic into `compute_bounds_impl`. test(render-core): add tests for rendering with empty and multi-node models - Added tests to verify behavior when building render meshes from models with no slots and multiple nodes. - Ensured UV scaling is correctly applied in tests. feat(render-demo): add FOV argument and improve error handling - Added a `--fov` command-line argument to set the field of view. - Enhanced error messages for texture resolution failures. - Updated MVP computation to use the new FOV parameter. fix(rsli): improve error handling in LZH decompression - Added checks to prevent out-of-bounds access in LZH decoding logic. refactor(texm): streamline texture parsing and decoding tests - Created a helper function `build_texm_payload` for constructing test payloads. - Added tests for various texture formats including RGB565, RGB556, ARGB4444, and Luminance Alpha. - Improved error handling for invalid TEXM headers and mip bounds.
* fix(deps): update all digest updatesrenovate[bot]2026-02-121-1/+1
|
* feat: добавить поддержку атомарной замены ↵Valentin Popov2026-02-123-12/+75
| | | | файлов для Windows и тесты на максимальную длину имени
* feat: обновить методы обработки данных и ↵Valentin Popov2026-02-121-1/+8
| | | | улучшить обработку ошибок в библиотеке
* feat: добавить тесты для проверки ↵Valentin Popov2026-02-121-0/+161
| | | | структурных инвариантов и корректности сортировки в RsLi
* fix: обработка выхода за пределы индекса ↵Valentin Popov2026-02-102-2/+53
| | | | сортировки в архиве и улучшение декодирования LZSS с поддержкой XOR
* Implement LZSS decompression with optional XOR decryptionValentin Popov2026-02-101-17/+0
| | | | | | | | | - Added `lzss_decompress_simple` function for LZSS decompression in `lzss.rs`. - Introduced `XorState` struct and `xor_stream` function for XOR decryption in `xor.rs`. - Updated `mod.rs` to include new LZSS and XOR modules. - Refactored `parse_library` function in `parse.rs` to utilize the new XOR decryption functionality. - Cleaned up and organized code in `lib.rs` by removing redundant functions and structures. - Added tests for new functionality in `tests.rs`.
* feat: добавить библиотеку common с ресурсами и ↵Valentin Popov2026-02-104-58/+85
| | | | буферами вывода; обновить зависимости в nres и rsli
* feat: добавить новые тесты для обработки ↵Valentin Popov2026-02-101-0/+205
| | | | не-NRes байтов и минимальной структуры архива
* fix: добавить проверку на наличие архивов в ↵Valentin Popov2026-02-101-2/+8
| | | | тестах для nres и rsli
* feat: добавить README для библиотеки nres с ↵Valentin Popov2026-02-101-0/+42
| | | | описанием функционала и тестирования
* Refactor tests and move them to a dedicated moduleValentin Popov2026-02-102-244/+548
| | | | | | | | | - Moved the test suite from `lib.rs` to a new `tests.rs` file for better organization. - Added a `SyntheticRsliEntry` struct to facilitate synthetic test cases. - Introduced `RsliBuildOptions` struct to manage options for building RsLi byte arrays. - Implemented various utility functions for file handling, data compression, and bit manipulation. - Enhanced the `rsli_read_unpack_and_repack_all_files` test to validate all RsLi archives. - Added new tests for synthetic entries covering all packing methods, overlay handling, and validation error cases.
* feat: add initial implementation of rsli crateValentin Popov2026-02-104-0/+1011
- Created Cargo.toml for the rsli crate with flate2 dependency. - Implemented ResourceData enum for handling borrowed and owned byte slices. - Added OutputBuffer trait and its Vec<u8> implementation for writing data. - Defined a comprehensive Error enum for error handling in the library. - Developed the Library struct to manage resource entries and provide methods for loading and unpacking resources. - Implemented various packing methods and decompression algorithms, including LZSS and Deflate. - Added tests for validating the functionality of the rsli library against sample data.