mirror of
https://codeberg.org/icewind/vmdl.git
synced 2026-06-03 16:44:11 +02:00
bitflags 2
This commit is contained in:
parent
8d8f7e6158
commit
31fc82bbdb
5 changed files with 29 additions and 19 deletions
4
Cargo.lock
generated
4
Cargo.lock
generated
|
|
@ -2874,10 +2874,10 @@ checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f"
|
|||
|
||||
[[package]]
|
||||
name = "vmdl"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
dependencies = [
|
||||
"arrayvec 0.7.4",
|
||||
"bitflags 1.3.2",
|
||||
"bitflags 2.4.1",
|
||||
"bytemuck",
|
||||
"cgmath",
|
||||
"clap 4.4.11",
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[package]
|
||||
name = "vmdl"
|
||||
version = "0.1.0"
|
||||
version = "0.1.1"
|
||||
edition = "2021"
|
||||
description = "Rust parser for valve model files."
|
||||
repository = "https://github.com/icewind1991/vmdl"
|
||||
|
|
@ -12,7 +12,7 @@ rust-version = "1.62.0"
|
|||
arrayvec = "0.7.2"
|
||||
thiserror = "1.0.37"
|
||||
static_assertions = "1.1.0"
|
||||
bitflags = "1.3.2"
|
||||
bitflags = "2.4.1"
|
||||
itertools = "0.12.0"
|
||||
tracing = "0.1.37"
|
||||
bytemuck = { version = "1.14.0", features = ["derive"] }
|
||||
|
|
|
|||
|
|
@ -174,10 +174,12 @@ pub struct StudioHeader {
|
|||
unused3: i32,
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
#[derive(Zeroable, Pod)]
|
||||
#[derive(Zeroable, Pod, Copy, Clone, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct ModelFlags: u32 {
|
||||
pub struct ModelFlags(u32);
|
||||
|
||||
bitflags! {
|
||||
impl ModelFlags: u32 {
|
||||
const AUTOGENERATED_HITBOX = 0x00000001;
|
||||
const USES_ENV_CUBEMAP = 0x00000002;
|
||||
const FORCE_OPAQUE = 0x00000004;
|
||||
|
|
|
|||
|
|
@ -33,10 +33,12 @@ pub struct Bone {
|
|||
reserved: [i32; 8], // remove as appropriate
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
#[derive(Zeroable, Pod)]
|
||||
#[derive(Zeroable, Pod, Copy, Clone, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct BoneFlags: u32 {
|
||||
pub struct BoneFlags(u32);
|
||||
|
||||
bitflags! {
|
||||
impl BoneFlags: u32 {
|
||||
const BONE_PHYSICALLY_SIMULATED = 0x00000001;
|
||||
const BONE_PHYSICS_PROCEDURAL = 0x00000002;
|
||||
const BONE_ALWAYS_PROCEDURAL = 0x00000004;
|
||||
|
|
|
|||
|
|
@ -102,10 +102,12 @@ impl MeshHeader {
|
|||
}
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
#[derive(Zeroable, Pod)]
|
||||
#[derive(Clone, Copy, Zeroable, Pod, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct MeshFlags: u8 {
|
||||
pub struct MeshFlags(u8);
|
||||
|
||||
bitflags! {
|
||||
impl MeshFlags: u8 {
|
||||
const IS_TEETH = 0x01;
|
||||
const IS_EYES = 0x02;
|
||||
}
|
||||
|
|
@ -149,10 +151,12 @@ impl StripGroupHeader {
|
|||
}
|
||||
}
|
||||
|
||||
bitflags! {
|
||||
#[derive(Zeroable, Pod)]
|
||||
#[derive(Clone, Copy, Zeroable, Pod, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct StripGroupFlags: u8 {
|
||||
pub struct StripGroupFlags(u8);
|
||||
|
||||
bitflags! {
|
||||
impl StripGroupFlags: u8 {
|
||||
const IS_FLEXED = 0x01;
|
||||
const IS_HWSKINNED = 0x02;
|
||||
const IS_DELTA_FLEXED = 0x04;
|
||||
|
|
@ -176,10 +180,12 @@ pub struct StripHeader {
|
|||
|
||||
static_assertions::const_assert_eq!(size_of::<StripHeader>(), 27);
|
||||
|
||||
bitflags! {
|
||||
#[derive(Zeroable, Pod)]
|
||||
#[derive(Clone, Copy, Zeroable, Pod, Debug)]
|
||||
#[repr(C)]
|
||||
pub struct StripFlags: u8 {
|
||||
pub struct StripFlags(u8);
|
||||
|
||||
bitflags! {
|
||||
impl StripFlags: u8 {
|
||||
const IS_TRI_LIST = 0x01;
|
||||
const IS_TRI_STRIP = 0x02;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue