diff --git a/README.md b/README.md index e88ecf0..3107a83 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # cs2-dumper -An external offset/interface dumper for Counter-Strike 2, with support for both Windows & Linux. +An external offset/interface dumper for Counter-Strike 2, with support for both Windows & Linux (soon). Powered by [memflow](https://github.com/memflow/memflow). @@ -21,11 +21,12 @@ E.g. `./cs2-dumper -c pcileech -a device=fpga -vvv` ### Available Arguments -- `-v...`: Increase logging verbosity. Can be specified multiple times. - `-c, --connector `: The name of the memflow connector to use. -- `-a, --connector-args `: Additional arguments to supply to the connector. +- `-a, --connector-args `: Additional arguments to pass to the connector. +- `-f, --file-types `: The types of files to generate. Default: `cs`, `hpp`, `json`, `rs`. - `-o, --output `: The output directory to write the generated files to. Default: `output`. - `-i, --indent-size `: The number of spaces to use per indentation level. Default: `4`. +- `-v...`: Increase logging verbosity. Can be specified multiple times. - `-h, --help`: Print help. - `-V, --version`: Print version. diff --git a/src/analysis/buttons.rs b/src/analysis/buttons.rs index 2eb6689..5fc577b 100644 --- a/src/analysis/buttons.rs +++ b/src/analysis/buttons.rs @@ -10,7 +10,6 @@ use serde::{Deserialize, Serialize}; use crate::error::{Error, Result}; use crate::source2::KeyButton; -/// Represents a keyboard button. #[derive(Debug, Deserialize, Serialize)] pub struct Button { pub name: String, diff --git a/src/analysis/interfaces.rs b/src/analysis/interfaces.rs index 6e12b8f..bbe5ccf 100644 --- a/src/analysis/interfaces.rs +++ b/src/analysis/interfaces.rs @@ -14,7 +14,6 @@ use crate::source2::InterfaceReg; pub type InterfaceMap = BTreeMap>; -/// Represents an exposed interface. #[derive(Debug, Deserialize, Serialize)] pub struct Interface { pub name: String, diff --git a/src/analysis/mod.rs b/src/analysis/mod.rs index 56793a9..619bef9 100644 --- a/src/analysis/mod.rs +++ b/src/analysis/mod.rs @@ -3,7 +3,33 @@ pub use interfaces::*; pub use offsets::*; pub use schemas::*; -pub mod buttons; -pub mod interfaces; -pub mod offsets; -pub mod schemas; +use memflow::prelude::v1::*; + +use crate::error::Result; + +mod buttons; +mod interfaces; +mod offsets; +mod schemas; + +#[derive(Debug)] +pub struct AnalysisResult { + pub buttons: Vec