Skip to content

Commit

Permalink
Add get_heatseeker_target_y
Browse files Browse the repository at this point in the history
  • Loading branch information
VirxEC committed Jul 6, 2024
1 parent 07c3605 commit 7c0fafe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rl_ball_sym_dll"
version = "0.1.3"
version = "0.1.4"
edition = "2021"

[lib]
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@ impl From<Ball> for BallSlice {
}
}

#[no_mangle]
pub extern "C" fn get_heatseeker_target_y() -> f32 {
let state = GAME_AND_BALL.read().unwrap();
state.ball.get_heatseeker_target().y
}

#[no_mangle]
pub extern "C" fn set_heatseeker_target(blue_goal: u8) {
let mut state = GAME_AND_BALL.write().unwrap();
Expand Down

0 comments on commit 7c0fafe

Please sign in to comment.