ra2_shp/
lib.rs

1#![deny(missing_debug_implementations, missing_copy_implementations)]
2#![warn(missing_docs, rustdoc::missing_crate_level_docs)]
3#![doc = include_str!("../readme.md")]
4#![doc(html_logo_url = "https://avatars.githubusercontent.com/u/208321371")]
5#![doc(html_favicon_url = "https://avatars.githubusercontent.com/u/208321371")]
6
7//! RA2 MIX file format library
8//!
9//! This library provides functionality for reading and writing Red Alert 2 MIX files.
10//! It supports both encrypted and unencrypted MIX files, and can extract files from MIX archives.
11
12mod frames;
13mod reader;
14
15pub use crate::{
16    frames::ShpFrame,
17    reader::{ShpReader, shp2apng, shp2png},
18};
19
20// 文件头结构体
21#[derive(Copy, Clone, Debug)]
22pub struct ShpHeader {
23    pub reserved: u16,         // 保留字 (必须为 0)
24    pub width: u16,            // 宽度
25    pub height: u16,           // 高度
26    pub number_of_frames: u16, // 帧数
27}