Skip to content

Commit

Permalink
Add no collision flag. (#75)
Browse files Browse the repository at this point in the history
  • Loading branch information
Vinjul1704 authored Jun 6, 2024
1 parent 2da9915 commit 9e10851
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion jdsd_dsiii_practice_tool.toml
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ commands = [
{ target = "ctrl+n" },
{ flag = "ai_disable", hotkey = "f1" },
{ flag = "gravity", hotkey = "f2" },
{ flag = "evt_disable", hotkey = "f3" },
{ flag = "collision", hotkey = "f3" },
{ flag = "evt_disable", hotkey = "f9" },
{ quitout = "p" }
]

Expand Down
2 changes: 2 additions & 0 deletions lib/libds3/src/pointers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ pub struct PointerChains {
pub debug_sphere_1: Bitflag<u8>,
pub debug_sphere_2: Bitflag<u8>,
pub gravity: Bitflag<u8>,
pub collision: Bitflag<u8>,
pub speed: PointerChain<f32>,
pub position: (PointerChain<f32>, PointerChain<[f32; 3]>),
pub character_stats: PointerChain<CharacterStats>,
Expand Down Expand Up @@ -301,6 +302,7 @@ impl From<BaseAddresses> for PointerChains {
debug_sphere_1: bitflag!(0b1; base_hbd, 0x30),
debug_sphere_2: bitflag!(0b1; base_hbd, 0x31),
gravity: bitflag!(0b1000000; world_chr_man, 0x80, 0x1a08),
collision: bitflag!(0b1; world_chr_man, 0x40, 0x0, 0x50, 0x187),
speed: pointer_chain!(world_chr_man, 0x80, xa as _, 0x28, offs_speed as _),
position: (
pointer_chain!(world_chr_man, 0x40, 0x28, 0x74),
Expand Down
1 change: 1 addition & 0 deletions practice-tool/src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -328,6 +328,7 @@ impl TryFrom<String> for FlagSpec {
"debug_sphere_1" => Ok(FlagSpec::new("Debug sphere 1", |c| &c.debug_sphere_1)),
"debug_sphere_2" => Ok(FlagSpec::new("Debug sphere 2", |c| &c.debug_sphere_2)),
"gravity" => Ok(FlagSpec::new("No Gravity", |c| &c.gravity)),
"collision" => Ok(FlagSpec::new("No Collision", |c| &c.collision)),
e => Err(format!("\"{}\" is not a valid flag specifier", e)),
}
}
Expand Down

0 comments on commit 9e10851

Please sign in to comment.