-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
155 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
use crate::hooks::{ | ||
draw_game, draw_game_paused, entity_iso_xpos, entity_iso_ypos, entity_linear_xpos, | ||
entity_linear_ypos, game_loop_sleep_hook, ModulePatches, PatchSets, | ||
}; | ||
use bin_patch::{patch_source, Patch}; | ||
use d2interface::{self as d2, v108::Entity}; | ||
|
||
#[rustfmt::skip] | ||
pub(super) const PATCHES: PatchSets = PatchSets { | ||
menu_fps: &[ModulePatches::new( | ||
d2::Module::Win, | ||
&[ | ||
// Draw menu framerate | ||
Patch::call_c(0xe9f4, patch_source!(" | ||
8d4c2414 | ||
51 | ||
ff15 $c8d1916f | ||
8d54241c | ||
52 | ||
ff15 $80d1916f | ||
8b742414 | ||
8b7c2418 | ||
8bc6 | ||
8bcf | ||
2bc3 | ||
6a00 | ||
1bcd | ||
6a19 | ||
51 | ||
50 | ||
e83b610000 | ||
3b542420 | ||
7c27 | ||
7f06 | ||
3b44241c | ||
761f | ||
8b442444 | ||
8bde | ||
85c0 | ||
8bef | ||
740e | ||
8b542410 | ||
8bca | ||
42 | ||
51 | ||
89542414 | ||
ffd0 | ||
e84e060000 | ||
"), super::v100::draw_menu_100_asm_stub), | ||
// Menu char frame rate | ||
Patch::call_c(0x1b6a, patch_source!(" | ||
8b4e10 | ||
8b4608 | ||
8b560c | ||
03c1 | ||
894608 | ||
"), super::v100::update_menu_char_frame_100_asm_stub), | ||
], | ||
)], | ||
game_fps: &[ModulePatches::new( | ||
d2::Module::Client, | ||
&[ | ||
// Game loop sleep patch | ||
Patch::call_c(0x257c, patch_source!(" | ||
a1 $5047ba6f | ||
85c0 | ||
7508 | ||
6a00 | ||
ff15 $a4bfb96f | ||
"), game_loop_sleep_hook), | ||
// Draw paused game framerate | ||
Patch::call_c(0x9398, patch_source!("ff15 $c4ebbd6f"), draw_game_paused), | ||
// Draw game framerate & entity sync | ||
Patch::call_c(0x9abf, patch_source!(" | ||
392d $50eebd6f | ||
752b | ||
e884470800 | ||
85c0 | ||
742e | ||
33c9 | ||
ff15 $c4ebbd6f | ||
8b0d $d4ebbd6f | ||
a1 $ecebbd6f | ||
41 | ||
40 | ||
890d $d4ebbd6f | ||
a3 $ecebbd6f | ||
eb0c | ||
396c2414 | ||
7406 | ||
ff05 $f4ebbd6f | ||
"), draw_game::<Entity>), | ||
], | ||
)], | ||
game_smoothing: &[ | ||
ModulePatches::new( | ||
d2::Module::Client, | ||
&[ | ||
// Course entity mouse detection | ||
Patch::call_std1(0x8da3c, patch_source!("e8990e0300"), entity_iso_xpos::<Entity>), | ||
Patch::call_std1(0x8da44, patch_source!("e88b0e0300"), entity_iso_ypos::<Entity>), | ||
// Animated entity mouse detection refinement | ||
Patch::call_std1(0x8dee6, patch_source!("e8ef090300"), entity_iso_xpos::<Entity>), | ||
Patch::call_std1(0x8df0d, patch_source!("e8c2090300"), entity_iso_ypos::<Entity>), | ||
// Npc mouse over perspective | ||
Patch::call_std1(0xbde57, patch_source!("e80c0a0000"), entity_linear_xpos::<Entity>), | ||
Patch::call_std1(0xbde50, patch_source!("e80d0a0000"), entity_linear_ypos::<Entity>), | ||
// Npc mouse over | ||
Patch::call_std1(0xbdea4, patch_source!("e8310a0000"), entity_iso_xpos::<Entity>), | ||
Patch::call_std1(0xbdeb7, patch_source!("e8180a0000"), entity_iso_ypos::<Entity>), | ||
], | ||
), | ||
ModulePatches::new( | ||
d2::Module::Common, | ||
&[ | ||
Patch::call_c(0x5f3b7, patch_source!(" | ||
893e | ||
8d442414 | ||
"), super::v100::intercept_teleport_100_asm_stub), | ||
], | ||
), | ||
], | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
use crate::{module::Ordinal::Ordinal, Addresses}; | ||
|
||
pub use crate::v107::{ | ||
DyPos, Entity, EntityPos, EntityTable, EntityTables, Room, StaticPos, BASE_ADDRESSES, | ||
}; | ||
|
||
pub const ADDRESSES: Addresses = Addresses { | ||
player: 0x1245e0, | ||
env_splashes: 0x10eb6c, | ||
env_bubbles: 0x10eb70, | ||
client_updates: 0x10ebd8, | ||
game_type: 0x10edd0, | ||
active_entities: 0x122de0, | ||
draw_game_fn: 0x10ebc4, | ||
client_fps_frames: 0x10ebec, | ||
client_total_frames: 0x10ebd4, | ||
// Doesn't exist in this version | ||
apply_pos_change: 0, | ||
in_perspective: Ordinal(10010), | ||
hwnd: Ordinal(10027), | ||
server_update_time: 0xee68c, | ||
draw_menu: Ordinal(10019), | ||
}; |