62 Commits

Author SHA1 Message Date
4f7a8a149e Added dcb_io::IoThread.
`dcb_io::GameFile` now just stores a `T` instead of `CdRomCursor<T>`.
`GameFile` now has interior threaded mutability.
2021-05-31 06:05:21 +01:00
f25c6cd318 Added GameFile::open_file. 2021-05-28 19:24:04 +01:00
c3ff6dfa33 dcb_drv::Path::components now properly works and no longer returns the indeces.
Fixed `DirPtr::find_entry` not considering files properly.
Added `GameFile::swap_files`.
`dcb-file-editor` now supports swapping.
2021-05-28 04:11:53 +01:00
00072870ee Removed DrvFsCursors from GameFile.
Added `dcb_util::StringContainsCaseInsensitive`.
2021-05-28 01:36:26 +01:00
7bc80530cf Added minimal file swapping in dcb_drv.
Added `dcb_drv::Path`.
2021-05-27 19:07:34 +01:00
ed6c97c4c7 Started work on swappings files inside the game file. 2021-05-25 21:54:59 +01:00
6f4a55c083 dcb-file-editor now uses GameFile. 2021-05-24 00:39:47 +01:00
69236ca742 Added the ability for DrvFsCursor and GameFile to open files. 2021-05-22 23:45:21 +01:00
932867ffb8 Changed drive getters to use self. 2021-05-22 22:50:30 +01:00
935c1d272f Slightly revised bounds on GameFile. 2021-05-22 22:47:30 +01:00
eb52ba496d Revised dcb_io::GameFile to use cursors. 2021-05-22 22:45:18 +01:00
3485d10e21 Removed unnecessary features flags. 2021-04-29 15:20:28 +01:00
53963b5a7e Switched to a 120 max width. 2021-04-26 18:07:33 +01:00
2e44a3e382 clippy::map_err_ignore is now allowed. 2021-04-25 09:46:24 +01:00
4076e2a18b Added clippy::if_not_else to allowed lints. 2021-04-22 20:08:58 +01:00
de556f37da Added an allow of clippy::single_match_else. 2021-04-19 22:48:06 +01:00
558e4cbfb1 Fixed all extra lines in // Import sections. 2021-04-16 05:27:18 +01:00
991fa6ecce Fixed all documentation errors.
Renamed some errors to their function's name.
2021-04-10 05:41:58 +01:00
c10316b531 Updated to version 1.52.0-nightly. 2021-03-16 20:40:19 +00:00
7cba0aa52c Updated lints and features to 1.52.0-nightly. 2021-03-11 16:01:19 +00:00
9961c92ff9 Renamed Filesystem to FilesystemReader. 2021-01-30 21:21:42 +00:00
66f981d63f Moved drv and pak from dcb-io into their own crates. 2021-01-27 20:44:23 +00:00
8e194e967d Fixed bug in PakFileReader's impl.
Made `pak-extractor` no longer log to file and makde it used buffered input.
2021-01-27 11:26:53 +00:00
4f2415b4a5 Improved .PAK reading. 2021-01-27 10:37:35 +00:00
529263d5d3 Removed some bounds on DirWriterLister by hand-implementing derives. 2021-01-27 09:25:55 +00:00
5504ace431 Moved DirWriterLister to it's own module.
Removed currently superfluous `DirList` associated type, as it cannot be used without creating an infinite type.
2021-01-27 09:02:02 +00:00
dbb556f408 Renamed CdRom to CdRomReader and moved it to it's own module. 2021-01-26 19:30:26 +00:00
5fc311ff49 Made DirWriterLister now require the number of entries.
Refactored `drv-packer`.
2021-01-25 05:35:25 +00:00
1b3ca80cb3 Removed unnecessary error in drv. 2021-01-25 05:25:56 +00:00
20b3696635 Separated dir into a reader and writer. 2021-01-25 05:24:06 +00:00
24be074773 Documented entry a bit better. 2021-01-25 05:02:30 +00:00
df08fc85a6 Separated entry into two submodules for reader and writer. 2021-01-25 04:59:14 +00:00
21480ebb0e Made DirEntryReader return an Option when reading from bytes, instead of the caller checking for a specific error.
Improved documentation for `drv`.
2021-01-25 04:41:33 +00:00
3d54f23022 Improved DrvFsWriter interface by using the DirWriterList trait.
Fixed `DirWriter::write_entries` not writing all entries correctly.
Added `drv-packer` binary.
2021-01-25 00:23:12 +00:00
26972d128b Started work on .DRV filesystem writer. 2021-01-24 14:08:26 +00:00
15c2b5ac46 Improved implementation of Drv filesystem. 2021-01-24 12:31:20 +00:00
42b694ced0 Renamed DirEntry back, as it represents the dir entry itself on disk.
Added `to_bytes` implementation of `DirEntry`.
2021-01-24 11:46:05 +00:00
aa8f87ed64 Renamed some dcb_io::drv entries to reflect what they're doing better. 2021-01-24 11:20:40 +00:00
2c785bf73d drv-extractor now respects the dates of the files.
Added `DirEntry::seek_to`.
2021-01-24 10:48:09 +00:00
9222ef40d6 Changed the Bytes derive to have endianess per-field.
Started using the new derive.
2021-01-24 10:19:22 +00:00
baf40599a1 Added 3d model set extractor.
Figured out `Unknown0` in `PakEntry`'s kind.
2021-01-24 05:27:35 +00:00
cc2c1c9713 Added pak-extractor binary.
Changed `PakFile` layout.
2021-01-24 00:04:45 +00:00
466f0a5a33 Moved clippy::similar_names lint to crate allows. 2021-01-23 22:59:53 +00:00
de384d3bbf Added drv-extractor bin.
Made all functions that take a reader take it by mutable reference.
2021-01-23 22:34:32 +00:00
577939d6d8 PakFile can now be constructed from a reader. 2021-01-23 08:04:10 +00:00
80d3dc9a81 Updated GameFile to the new interface.
Fixed bug with `FileReader`'s `io::Seek` impl, where it didn't actually seek the file.
Fixed bug with `DirEntry::from_reader` impl, where it didn't read the remaining entry bytes.
2021-01-23 07:19:55 +00:00
3aea6d78e7 Updated iso9660's DirEntry to read files and directories better. 2021-01-23 05:41:14 +00:00
f2589d23d2 Updated .DRV filesystem to work with a generic reader and not read everything at once. 2021-01-23 04:08:55 +00:00
2766b4c4d5 Separated dcb-iso9660 into itself and dcb-cdrom-xa. 2021-01-21 21:12:27 +00:00
d637d6964e Renamed PakEntry::FileHeader to Animation2d.
Added `Animation2d` type and strarted working on it's deserialization.
2021-01-21 18:06:50 +00:00