Skip to content

Commit

Permalink
Rework how we set up the menu so we only have to write the fn once
Browse files Browse the repository at this point in the history
  • Loading branch information
asimon-1 committed Nov 21, 2024
1 parent 858d351 commit b3ef93e
Show file tree
Hide file tree
Showing 3 changed files with 589 additions and 737 deletions.
8 changes: 4 additions & 4 deletions src/training/save_states.rs
Original file line number Diff line number Diff line change
Expand Up @@ -580,8 +580,8 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
SaveDamage::RANDOM => {
// Gen random value
let pct: f32 = get_random_float(
read(&MENU).save_damage_limits_player.0 as f32,
read(&MENU).save_damage_limits_player.1 as f32,
read(&MENU).save_damage_limits_player.LOWER as f32,
read(&MENU).save_damage_limits_player.UPPER as f32,
);
set_damage(module_accessor, pct);
}
Expand All @@ -599,8 +599,8 @@ pub unsafe fn save_states(module_accessor: &mut app::BattleObjectModuleAccessor)
SaveDamage::RANDOM => {
// Gen random value
let pct: f32 = get_random_float(
read(&MENU).save_damage_limits_cpu.0 as f32,
read(&MENU).save_damage_limits_cpu.1 as f32,
read(&MENU).save_damage_limits_cpu.UPPER as f32,
read(&MENU).save_damage_limits_cpu.LOWER as f32,
);
set_damage(module_accessor, pct);
}
Expand Down
Loading

0 comments on commit b3ef93e

Please sign in to comment.