1
Fork 0
mirror of https://github.com/redstrate/Physis.git synced 2025-07-05 01:57:45 +00:00
Commit graph

33 commits

Author SHA1 Message Date
d58a216462 Shrink the dependency and feature complexity, auto-cleanup and more
We had a few odd dependencies that caused nothing but pain in dependent projects
like libphysis. One of these was libunshield (a C library) that our game_install
feature used, but to be honest this was the wrong library to put this code. It
was really only ever used by Astra, and should live there instead - there's no
reason to have it shared between applications (and it's small enough to be
copied if *you* need it.) Also that also killed the system-deps dependency which
had a significant impact on our build time.

Another dependency was replaced: libz-sys. This is replaced by the pure Rust
libz-rs (through libz-rs-sys) which should simplify deploying physis without
having to worry about manually linking libz or other nonsense. Some leftover
copied code from flate2 can also be removed.

I also removed the visual_data feature as Astra ended up using it anyway, and
the distinction doesn't make much sense now. It was previously to gate some
dependencies needed for visual data extraction, but the bitflags and half crates
are small. I can look into splitting the crate up into more features if needed
later.

A dependency that was erroneously included in the refactoring was quote, which
has been removed. Also ran cargo fmt, clippy too.
2025-03-11 16:29:24 -04:00
bb7c74fec8 Redesign how IndexFile parsing works, again
Now it reads much more of the index file format, and tries to handle
index1/index2 differences more opaquely. I'm not yet happy with the API, it
needs a bit more work.
2025-03-06 18:52:26 -05:00
ee5a484730 Implement BinWrite for BlockHeader 2024-06-29 12:37:14 -04:00
ec04c13fbd Silence more dead code warnings
This is intentional, for various reasons between binrw limitations and
code that isn't used directly in Physis.
2024-06-29 09:33:23 -04:00
a1a50de62e Support chunked dat/index files
Needed for grabbing later expansion content that's split between chunks.
2024-05-04 14:20:45 -04:00
d5b3b8a468 Run cargo fmt 2024-04-20 13:18:03 -04:00
6e50f03cd9 Fix yet more clippy warnings 2024-04-20 13:17:11 -04:00
58cec6c91f Remove some unused imports 2024-04-16 22:08:46 -04:00
3b6c4e83df Remove panic in DAT file reading, and add invalid data test 2024-04-16 21:49:26 -04:00
74940c0436 Don't call unwrap() nearly as much in reading DAT files 2024-04-16 21:33:09 -04:00
f067b653b1 Add common functions for converting bool back and forth from u8/16
Sort of unnecessary, but these are also tested.
2024-04-16 21:03:26 -04:00
ecc872ead1 Use better constant values for model file header and vertex element 2024-02-25 08:41:03 -05:00
0b0850c574 Use custom binrw parsers/writers for VertexDeclarations
Eventually I want to consolidate the model headers, and this makes it,
so we only need a ModelFileHeader::read or write call without a separate
step.
2023-12-13 17:19:06 -05:00
7a75c170cc Make a semantic difference between owned and non-owned byte data 2023-10-13 16:16:04 -04:00
cb19e3781a Allow compilation without visual_data feature enabled 2023-09-24 16:04:39 -04:00
2000b978b3 Ensure compliance with REUSE, add to CI 2023-08-06 08:25:04 -04:00
69c3ca3bf9 Upgrade dependencies, including moving to binrw 0.11 which breaks stuff
The one exception is bitflags, because 2.0 has breaking changes I can't
work around...
2023-03-31 17:30:30 -04:00
425f755850 Fix clippy warnings about unnecessary deref, useless casts 2023-02-20 16:07:48 -05:00
67d2f035c3 Reformat code with rustfmt 2022-10-20 11:45:55 -04:00
a9fa6d714a Use read_le instead of manually passing ReadOptions 2022-10-17 19:24:02 -04:00
c3c3df7c68 More small warning changes 2022-10-13 16:11:20 -04:00
e86d910594 Update binrw to 0.10.0
This introduces a new breaking change, namely that all endianness must
be known. I've done the best I can, but I'll be checking soon.
2022-10-13 16:03:46 -04:00
9819f87fcc Suppress some warnings 2022-09-15 16:26:31 -04:00
d9e79e563a Reformat code 2022-08-16 11:52:07 -04:00
c7184cb36f Fix Clippy warnings and errors 2022-08-16 11:50:18 -04:00
6554dee2f1 Decompress and return rgba data for textures 2022-08-11 15:03:12 -04:00
99fc3165e5 Document FileType enum 2022-08-09 19:53:17 -04:00
a471ce1080 Separate standard, model, etc. reading into their own methods 2022-08-09 19:50:37 -04:00
7292ad930a Add Texture structure, begin reading header 2022-08-09 19:31:32 -04:00
aeed62fb4c Implement MDL parsing
The actual vertex output is untested, but the headers parse fine it
seems. A lot of this is ported straight from C++, so more refactoring
is expected.
2022-07-28 14:11:02 -04:00
c36c4b7470 Document more public APIs in preparation for docs release 2022-07-27 21:41:05 -04:00
be9c850fc1 Remove some warnings 2022-07-27 21:21:50 -04:00
389c3fe00b Add initial files 2022-07-19 19:29:41 -04:00