aboutsummaryrefslogtreecommitdiff
path: root/libs/nres/src/lib.rs
diff options
context:
space:
mode:
authorValentin Popov <valentin@popov.link>2025-06-15 01:42:55 +0300
committerGitHub <noreply@github.com>2025-06-15 01:42:55 +0300
commit2273fd4263b91a877b043dacf4b9311c98d3bcbb (patch)
treee2502636adc081c2a71179402774fa90d5be8a9d /libs/nres/src/lib.rs
parentd4f104cf5ebca5acf4379e5108c635e008c0c82f (diff)
parentd274602104892e181205725c6b9c9082a9669942 (diff)
downloadfparkan-2273fd4263b91a877b043dacf4b9311c98d3bcbb.tar.xz
fparkan-2273fd4263b91a877b043dacf4b9311c98d3bcbb.zip
Merge pull request #7 from valentineus/nres
Обновление структуры проекта
Diffstat (limited to 'libs/nres/src/lib.rs')
-rw-r--r--libs/nres/src/lib.rs24
1 files changed, 24 insertions, 0 deletions
diff --git a/libs/nres/src/lib.rs b/libs/nres/src/lib.rs
new file mode 100644
index 0000000..40c0b32
--- /dev/null
+++ b/libs/nres/src/lib.rs
@@ -0,0 +1,24 @@
+/// First constant value of the NRes file ("NRes" characters in numeric)
+pub const FILE_TYPE_1: u32 = 1936020046;
+/// Second constant value of the NRes file
+pub const FILE_TYPE_2: u32 = 256;
+/// Size of the element item (in bytes)
+pub const LIST_ELEMENT_SIZE: u32 = 64;
+/// Minimum allowed file size (in bytes)
+pub const MINIMUM_FILE_SIZE: u32 = 16;
+
+static DEBUG: std::sync::atomic::AtomicBool = std::sync::atomic::AtomicBool::new(false);
+
+mod converter;
+mod error;
+pub mod reader;
+
+/// Get debug status value
+pub fn get_debug() -> bool {
+ DEBUG.load(std::sync::atomic::Ordering::Relaxed)
+}
+
+/// Change debug status value
+pub fn set_debug(value: bool) {
+ DEBUG.store(value, std::sync::atomic::Ordering::Relaxed)
+}