Compare commits
3 Commits
dependabot
...
nres
Author | SHA1 | Date | |
---|---|---|---|
d274602104
|
|||
88faa6e3ea | |||
8d8653133b
|
25
Cargo.lock
generated
25
Cargo.lock
generated
@ -238,9 +238,9 @@ checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap"
|
name = "clap"
|
||||||
version = "4.5.31"
|
version = "4.5.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "027bb0d98429ae334a8698531da7077bdf906419543a35a55c2cb1b66437d767"
|
checksum = "92b7b18d71fad5313a1e320fa9897994228ce274b60faa4d694fe0ea89cd9e6d"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"clap_builder",
|
"clap_builder",
|
||||||
"clap_derive",
|
"clap_derive",
|
||||||
@ -248,9 +248,9 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "clap_builder"
|
name = "clap_builder"
|
||||||
version = "4.5.31"
|
version = "4.5.30"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "5589e0cba072e0f3d23791efac0fd8627b49c829c196a492e88168e6a669d863"
|
checksum = "a35db2071778a7344791a4fb4f95308b5673d219dee3ae348b86642574ecc90c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anstream",
|
"anstream",
|
||||||
"anstyle",
|
"anstyle",
|
||||||
@ -290,9 +290,9 @@ checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "console"
|
name = "console"
|
||||||
version = "0.15.11"
|
version = "0.15.10"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "054ccb5b10f9f2cbf51eb355ca1d05c2d279ce1804688d0db74b4733a5aeafd8"
|
checksum = "ea3c6ecd8059b57859df5c69830340ed3c41d30e3da0c1cbed90a96ac853041b"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encode_unicode",
|
"encode_unicode",
|
||||||
"libc",
|
"libc",
|
||||||
@ -654,9 +654,9 @@ checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "log"
|
name = "log"
|
||||||
version = "0.4.27"
|
version = "0.4.26"
|
||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
|
checksum = "30bde2b3dc3671ae49d8e2e9f044c7c005836e7a023ee57cffa25ab82764bb9e"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "loop9"
|
name = "loop9"
|
||||||
@ -843,15 +843,6 @@ version = "4.2.0"
|
|||||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564"
|
checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564"
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "packer"
|
|
||||||
version = "0.1.0"
|
|
||||||
dependencies = [
|
|
||||||
"byteorder",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "paste"
|
name = "paste"
|
||||||
version = "1.0.15"
|
version = "1.0.15"
|
||||||
|
@ -1,12 +1,6 @@
|
|||||||
[workspace]
|
[workspace]
|
||||||
resolver = "2"
|
resolver = "2"
|
||||||
members = [
|
members = ["libs/*", "tools/*"]
|
||||||
"libnres",
|
|
||||||
"nres-cli",
|
|
||||||
"packer",
|
|
||||||
"texture-decoder",
|
|
||||||
"unpacker",
|
|
||||||
]
|
|
||||||
|
|
||||||
[profile.release]
|
[profile.release]
|
||||||
codegen-units = 1
|
codegen-units = 1
|
||||||
|
@ -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"
|
|
@ -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();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
10
libs/nres/Cargo.toml
Normal file
10
libs/nres/Cargo.toml
Normal file
@ -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"
|
@ -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"
|
|
14
tools/nres-cli/Cargo.toml
Normal file
14
tools/nres-cli/Cargo.toml
Normal file
@ -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"
|
@ -3,4 +3,4 @@
|
|||||||
## Commands
|
## Commands
|
||||||
|
|
||||||
- `extract` - Extract game resources from a "NRes" file.
|
- `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.
|
@ -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).
|
Files can be replaced and packed back using the [packer](../packer).
|
||||||
The newly obtained game resource files are correctly processed by the game engine.
|
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.
|
Reference in New Issue
Block a user