Compare commits
81 Commits
ee8a5fc02b
...
nres
Author | SHA1 | Date | |
---|---|---|---|
d274602104
|
|||
8bc39d10b1
|
|||
88faa6e3ea | |||
66705ba4f0 | |||
bb4c217ee2 | |||
c83822e353 | |||
130ee8df5b | |||
8d8653133b
|
|||
94d2f8a512
|
|||
215a093344
|
|||
3de1575082 | |||
aa8e1184bf | |||
feb7ebe722 | |||
becadef5ee | |||
a4b36e1aea | |||
c7b099b596 | |||
48a08445e7
|
|||
694de5edfa
|
|||
0dc37e9604
|
|||
3d2e970225 | |||
d90b9830bc
|
|||
f91e1bda22 | |||
e9a0fd718f | |||
509ce2d83d | |||
391756b77d | |||
035153c7c0 | |||
885a593829 | |||
7c3c8cc969 | |||
00c62a9909 | |||
c2899d27af | |||
e60fdd1958 | |||
dd6d440ba5 | |||
36a082ba18 | |||
09689a937c | |||
39f6479415 | |||
01a2a47370 | |||
4cd42afa37 | |||
298aa954b9 | |||
910deb6c17 | |||
4a22e2177e | |||
729c972573 | |||
250d78a955 | |||
03f2d762bb | |||
fcaa729544 | |||
8c2a6e2c19 | |||
daa2efba89 | |||
b5748505ef | |||
d305b1f005 | |||
2cfba4891c | |||
777d3814d3 | |||
784ceeebdf | |||
e3675555ea | |||
91104e214f | |||
9198b18652 | |||
1ad7949828 | |||
b98f01a810 | |||
fa88050a52 | |||
1123c8a56e | |||
2eb6333552 | |||
c5224e006f | |||
79599f3cf4 | |||
7acf99b9d6 | |||
ec542703b4 | |||
ee1cdda38b | |||
293a1de413 | |||
6635d4da9a | |||
f549769fcf | |||
c0a56acc0c | |||
a136dc5fa4 | |||
1b13f2acfc | |||
6c127ce028 | |||
bc2e051741 | |||
9abd2a4558 | |||
f267a56fd0 | |||
1d592418af | |||
3448f0f930 | |||
039ed238a6
|
|||
b7349f9df9
|
|||
12c7f0284e
|
|||
5c9a691495 | |||
bf8be5c045 |
15
.devcontainer/devcontainer.json
Normal file
15
.devcontainer/devcontainer.json
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
{
|
||||||
|
"image": "mcr.microsoft.com/devcontainers/rust:latest",
|
||||||
|
"customizations": {
|
||||||
|
"vscode": {
|
||||||
|
"extensions": [
|
||||||
|
"rust-lang.rust-analyzer"
|
||||||
|
]
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"runArgs": [
|
||||||
|
"--cap-add=SYS_PTRACE",
|
||||||
|
"--security-opt",
|
||||||
|
"seccomp=unconfined"
|
||||||
|
]
|
||||||
|
}
|
@ -1,26 +0,0 @@
|
|||||||
name: RenovateBot
|
|
||||||
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "@daily"
|
|
||||||
push:
|
|
||||||
branches:
|
|
||||||
- master
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
renovate:
|
|
||||||
container: ghcr.io/renovatebot/renovate:37
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- name: Checkout code
|
|
||||||
uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- name: Run renovate
|
|
||||||
run: |
|
|
||||||
renovate
|
|
||||||
env:
|
|
||||||
LOG_LEVEL: debug
|
|
||||||
RENOVATE_CONFIG_FILE: renovate.config.cjs
|
|
||||||
RENOVATE_REPOSITORIES: ${{ gitea.repository }}
|
|
||||||
RENOVATE_TOKEN: ${{ secrets.RENOVATE_TOKEN }}
|
|
14
.github/dependabot.yml
vendored
Normal file
14
.github/dependabot.yml
vendored
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
version: 2
|
||||||
|
updates:
|
||||||
|
- package-ecosystem: "cargo"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
- package-ecosystem: "github-actions"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
||||||
|
- package-ecosystem: "devcontainers"
|
||||||
|
directory: "/"
|
||||||
|
schedule:
|
||||||
|
interval: "weekly"
|
20
.renovaterc → .github/renovate.json
vendored
20
.renovaterc → .github/renovate.json
vendored
@ -1,24 +1,30 @@
|
|||||||
{
|
{
|
||||||
"assignees": [
|
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
|
||||||
"valentineus"
|
|
||||||
],
|
|
||||||
"extends": [
|
"extends": [
|
||||||
"config:recommended",
|
"config:recommended",
|
||||||
":disableDependencyDashboard"
|
":disableDependencyDashboard"
|
||||||
],
|
],
|
||||||
|
"assignees": [
|
||||||
|
"valentineus"
|
||||||
|
],
|
||||||
|
"labels": [
|
||||||
|
"dependencies",
|
||||||
|
"automated"
|
||||||
|
],
|
||||||
"packageRules": [
|
"packageRules": [
|
||||||
{
|
{
|
||||||
"groupName": "all digest updates",
|
"groupName": "all digest updates",
|
||||||
"groupSlug": "all-digest",
|
"groupSlug": "all-digest",
|
||||||
"matchPackagePatterns": [
|
|
||||||
"*"
|
|
||||||
],
|
|
||||||
"matchUpdateTypes": [
|
"matchUpdateTypes": [
|
||||||
"minor",
|
"minor",
|
||||||
"patch",
|
"patch",
|
||||||
"pin",
|
"pin",
|
||||||
"digest"
|
"digest"
|
||||||
]
|
],
|
||||||
|
"matchPackageNames": [
|
||||||
|
"*"
|
||||||
|
],
|
||||||
|
"automerge": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
0
.github/workflows/.gitkeep
vendored
0
.github/workflows/.gitkeep
vendored
15
.github/workflows/mirror.yml
vendored
Normal file
15
.github/workflows/mirror.yml
vendored
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
name: Mirror
|
||||||
|
on: [push]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
mirror:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- uses: yesolutions/mirror-action@master
|
||||||
|
with:
|
||||||
|
REMOTE: 'https://git.popov.link/fparkan.git'
|
||||||
|
GIT_USERNAME: ${{ secrets.GIT_USERNAME }}
|
||||||
|
GIT_PASSWORD: ${{ secrets.GIT_PASSWORD }}
|
12
.github/workflows/test.yml
vendored
Normal file
12
.github/workflows/test.yml
vendored
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
name: Test
|
||||||
|
on: [push, pull_request]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
test:
|
||||||
|
name: cargo test
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
- uses: dtolnay/rust-toolchain@stable
|
||||||
|
- run: cargo check --all
|
||||||
|
- run: cargo test --all-features
|
1282
Cargo.lock
generated
1282
Cargo.lock
generated
File diff suppressed because it is too large
Load Diff
@ -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 = "5.6"
|
|
||||||
thiserror = "1.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.10", features = ["completion"] }
|
|
||||||
indicatif = "0.17"
|
|
||||||
libnres = { version = "0.1", path = "../libnres" }
|
|
||||||
miette = { version = "5.6", features = ["fancy"] }
|
|
||||||
tempdir = "0.3"
|
|
@ -1,6 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
endpoint: "https://code.popov.link",
|
|
||||||
gitAuthor: "RenovateBot <renovatebot@noreply.localhost>",
|
|
||||||
optimizeForDisabled: true,
|
|
||||||
platform: "gitea",
|
|
||||||
};
|
|
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"
|
@ -5,4 +5,4 @@ edition = "2021"
|
|||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
byteorder = "1.4.3"
|
byteorder = "1.4.3"
|
||||||
image = "0.24.7"
|
image = "0.25.0"
|
Reference in New Issue
Block a user