diff options
author | Valentin Popov <valentin@popov.link> | 2025-02-08 04:11:02 +0300 |
---|---|---|
committer | Valentin Popov <valentin@popov.link> | 2025-02-08 04:11:02 +0300 |
commit | 8d8653133bf3a12ac58c0e4f34624e9beac11751 (patch) | |
tree | ac0831704db9f138a90872b530eabda457db1829 | |
parent | 94d2f8a512312b8aff25672760b687e6d90c1ec9 (diff) | |
download | fparkan-8d8653133bf3a12ac58c0e4f34624e9beac11751.tar.xz fparkan-8d8653133bf3a12ac58c0e4f34624e9beac11751.zip |
Обновление структуры проекта
-rw-r--r-- | Cargo.lock | 9 | ||||
-rw-r--r-- | Cargo.toml | 8 | ||||
-rw-r--r-- | libnres/Cargo.toml | 16 | ||||
-rw-r--r-- | libnres/README.md | 25 | ||||
-rw-r--r-- | libs/nres/Cargo.toml | 10 | ||||
-rw-r--r-- | libs/nres/src/converter.rs (renamed from libnres/src/converter.rs) | 0 | ||||
-rw-r--r-- | libs/nres/src/error.rs (renamed from libnres/src/error.rs) | 0 | ||||
-rw-r--r-- | libs/nres/src/lib.rs (renamed from libnres/src/lib.rs) | 0 | ||||
-rw-r--r-- | libs/nres/src/reader.rs (renamed from libnres/src/reader.rs) | 0 | ||||
-rw-r--r-- | nres-cli/Cargo.toml | 20 | ||||
-rw-r--r-- | tools/nres-cli/Cargo.toml | 14 | ||||
-rw-r--r-- | tools/nres-cli/README.md (renamed from nres-cli/README.md) | 2 | ||||
-rw-r--r-- | tools/nres-cli/src/main.rs (renamed from nres-cli/src/main.rs) | 0 | ||||
-rw-r--r-- | tools/texture-decoder/Cargo.toml (renamed from texture-decoder/Cargo.toml) | 0 | ||||
-rw-r--r-- | tools/texture-decoder/README.md (renamed from texture-decoder/README.md) | 0 | ||||
-rw-r--r-- | tools/texture-decoder/src/main.rs (renamed from texture-decoder/src/main.rs) | 0 | ||||
-rw-r--r-- | tools/unpacker/Cargo.toml (renamed from unpacker/Cargo.toml) | 0 | ||||
-rw-r--r-- | tools/unpacker/README.md (renamed from unpacker/README.md) | 2 | ||||
-rw-r--r-- | tools/unpacker/src/main.rs (renamed from unpacker/src/main.rs) | 0 |
19 files changed, 27 insertions, 79 deletions
@@ -844,15 +844,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "fb37767f6569cd834a413442455e0f066d0d522de8630436e2a1761d9726ba56" [[package]] -name = "packer" -version = "0.1.0" -dependencies = [ - "byteorder", - "serde", - "serde_json", -] - -[[package]] name = "paste" version = "1.0.15" source = "registry+https://github.com/rust-lang/crates.io-index" @@ -1,12 +1,6 @@ [workspace] resolver = "2" -members = [ - "libnres", - "nres-cli", - "packer", - "texture-decoder", - "unpacker", -] +members = ["libs/*", "tools/*"] [profile.release] codegen-units = 1 diff --git a/libnres/Cargo.toml b/libnres/Cargo.toml deleted file mode 100644 index 99539e7..0000000 --- a/libnres/Cargo.toml +++ /dev/null @@ -1,16 +0,0 @@ -[package] -name = "libnres" -version = "0.1.4" -description = "Library for NRes files" -authors = ["Valentin Popov <valentin@popov.link>"] -homepage = "https://git.popov.link/valentineus/fparkan" -repository = "https://git.popov.link/valentineus/fparkan.git" -license = "GPL-2.0" -edition = "2021" -keywords = ["gamedev", "library", "nres"] - -[dependencies] -byteorder = "1.4" -log = "0.4" -miette = "7.0" -thiserror = "2.0" diff --git a/libnres/README.md b/libnres/README.md deleted file mode 100644 index 065bd40..0000000 --- a/libnres/README.md +++ /dev/null @@ -1,25 +0,0 @@ -# Library for NRes files (Deprecated) - -Library for viewing and retrieving game resources of the game **"Parkan: Iron Strategy"**. -All versions of the game are supported: Demo, IS, IS: Part 1, IS: Part 2. -Supports files with `lib`, `trf`, `rlb` extensions. - -The files `gamefont.rlb` and `sprites.lib` are not supported. -This files have an unknown signature. - -## Example - -Example of extracting game resources: - -```rust -fn main() { - let file = std::fs::File::open("./voices.lib").unwrap(); - // Extracting the list of files - let list = libnres::reader::get_list(&file).unwrap(); - - for element in list { - // Extracting the contents of the file - let data = libnres::reader::get_file(&file, &element).unwrap(); - } -} -``` diff --git a/libs/nres/Cargo.toml b/libs/nres/Cargo.toml new file mode 100644 index 0000000..804f5c0 --- /dev/null +++ b/libs/nres/Cargo.toml @@ -0,0 +1,10 @@ +[package] +name = "libnres" +version = "0.1.4" +edition = "2021" + +[dependencies] +byteorder = "1.4" +log = "0.4" +miette = "7.0" +thiserror = "2.0" diff --git a/libnres/src/converter.rs b/libs/nres/src/converter.rs index bbf0535..bbf0535 100644 --- a/libnres/src/converter.rs +++ b/libs/nres/src/converter.rs diff --git a/libnres/src/error.rs b/libs/nres/src/error.rs index 440ab06..440ab06 100644 --- a/libnres/src/error.rs +++ b/libs/nres/src/error.rs diff --git a/libnres/src/lib.rs b/libs/nres/src/lib.rs index 40c0b32..40c0b32 100644 --- a/libnres/src/lib.rs +++ b/libs/nres/src/lib.rs diff --git a/libnres/src/reader.rs b/libs/nres/src/reader.rs index 2a450ee..2a450ee 100644 --- a/libnres/src/reader.rs +++ b/libs/nres/src/reader.rs diff --git a/nres-cli/Cargo.toml b/nres-cli/Cargo.toml deleted file mode 100644 index a6d863c..0000000 --- a/nres-cli/Cargo.toml +++ /dev/null @@ -1,20 +0,0 @@ -[package] -name = "nres-cli" -version = "0.2.3" -description = "Console tool for NRes files" -authors = ["Valentin Popov <valentin@popov.link>"] -homepage = "https://git.popov.link/valentineus/fparkan" -repository = "https://git.popov.link/valentineus/fparkan.git" -license = "GPL-2.0" -edition = "2021" -keywords = ["cli", "gamedev", "nres"] - -[dependencies] -byteorder = "1.4" -clap = { version = "4.2", features = ["derive"] } -console = "0.15" -dialoguer = { version = "0.11", features = ["completion"] } -indicatif = "0.17" -libnres = { version = "0.1", path = "../libnres" } -miette = { version = "7.0", features = ["fancy"] } -tempdir = "0.3" diff --git a/tools/nres-cli/Cargo.toml b/tools/nres-cli/Cargo.toml new file mode 100644 index 0000000..dd0ced6 --- /dev/null +++ b/tools/nres-cli/Cargo.toml @@ -0,0 +1,14 @@ +[package] +name = "nres-cli" +version = "0.2.3" +edition = "2021" + +[dependencies] +byteorder = "1.4" +clap = { version = "4.2", features = ["derive"] } +console = "0.15" +dialoguer = { version = "0.11", features = ["completion"] } +indicatif = "0.17" +libnres = { version = "0.1", path = "../../libs/nres" } +miette = { version = "7.0", features = ["fancy"] } +tempdir = "0.3" diff --git a/nres-cli/README.md b/tools/nres-cli/README.md index 65a6602..fee1420 100644 --- a/nres-cli/README.md +++ b/tools/nres-cli/README.md @@ -3,4 +3,4 @@ ## Commands - `extract` - Extract game resources from a "NRes" file. -- `ls` - Get a list of files in a "NRes" file. +- `ls` - Get a list of files in a "NRes" file.
\ No newline at end of file diff --git a/nres-cli/src/main.rs b/tools/nres-cli/src/main.rs index 85086cb..85086cb 100644 --- a/nres-cli/src/main.rs +++ b/tools/nres-cli/src/main.rs diff --git a/texture-decoder/Cargo.toml b/tools/texture-decoder/Cargo.toml index 0d11da6..0d11da6 100644 --- a/texture-decoder/Cargo.toml +++ b/tools/texture-decoder/Cargo.toml diff --git a/texture-decoder/README.md b/tools/texture-decoder/README.md index 8fca059..8fca059 100644 --- a/texture-decoder/README.md +++ b/tools/texture-decoder/README.md diff --git a/texture-decoder/src/main.rs b/tools/texture-decoder/src/main.rs index 26c7edd..26c7edd 100644 --- a/texture-decoder/src/main.rs +++ b/tools/texture-decoder/src/main.rs diff --git a/unpacker/Cargo.toml b/tools/unpacker/Cargo.toml index adb64ec..adb64ec 100644 --- a/unpacker/Cargo.toml +++ b/tools/unpacker/Cargo.toml diff --git a/unpacker/README.md b/tools/unpacker/README.md index 2c6be02..311e0eb 100644 --- a/unpacker/README.md +++ b/tools/unpacker/README.md @@ -38,4 +38,4 @@ It is essential to preserve the file index for the game to function correctly, a Files can be replaced and packed back using the [packer](../packer). The newly obtained game resource files are correctly processed by the game engine. -For example, sounds and 3D models of warbots' weapons were successfully replaced. +For example, sounds and 3D models of warbots' weapons were successfully replaced.
\ No newline at end of file diff --git a/unpacker/src/main.rs b/tools/unpacker/src/main.rs index 2a84688..2a84688 100644 --- a/unpacker/src/main.rs +++ b/tools/unpacker/src/main.rs |