Skip to content

Commit

Permalink
update for rollback patch 1.02
Browse files Browse the repository at this point in the history
  • Loading branch information
super-continent authored Feb 17, 2023
1 parent bee5d0c commit 1b14f38
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/game/hooks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,8 @@ pub unsafe fn init_game_hooks() -> Result<(), detour::Error> {
unsafe fn update_battle_hook(game_state: *mut u8, update_draw: bool) {
puffin::profile_function!();

let state: *mut *mut u8 = offset::GAME_STATE.get_address() as *mut *mut u8;
let _state_ptr: *mut u8 = (*state as *mut u8).offset(4);
// let state: *mut *mut u8 = offset::GAME_STATE.get_address() as *mut *mut u8;
// let _state_ptr: *mut u8 = (*state as *mut u8).offset(4);

{
puffin::profile_scope!("AREDGameInfo_Battle::UpdateBattle");
Expand Down
13 changes: 6 additions & 7 deletions src/game/offset.rs
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
#![allow(dead_code)]
use crate::{helpers::{Offset}};

pub const FN_LOAD_BBSCRIPT: Offset = Offset::new(0xBD6150);
/// BBSAnalyzeExe
pub const FN_LOAD_BBSCRIPT: Offset = Offset::new(0xBD5150);
/// BattleState::ControlBattleObject(state *)
pub const FN_CONTROL_BATTLE_OBJECT: Offset = Offset::new(0x9E7310);
pub const FN_CONTROL_BATTLE_OBJECT: Offset = Offset::new(0x9E7370);
/// AREDGameInfo_Battle::UpdateBattle(state *)
pub const FN_UPDATE_BATTLE: Offset = Offset::new(0xA5E150);
pub const FN_SETUP: Offset = Offset::new(0xA48660);
pub const GAME_STATE: Offset = Offset::new(0x1987724);
pub const RNG: Offset = Offset::new(0x1767154);
pub const CAMERA: Offset = Offset::new(0x17679A0);
pub const FN_UPDATE_BATTLE: Offset = Offset::new(0xA5E7C0);

// pub const GAME_STATE: Offset = Offset::new(0x1987724);

0 comments on commit 1b14f38

Please sign in to comment.