Compare commits
1 commit
Author | SHA1 | Date | |
---|---|---|---|
6312875616 |
2 changed files with 2 additions and 15 deletions
|
@ -1,2 +1,2 @@
|
||||||
# yixuan-patch
|
# vivian-patch
|
||||||
|
|
||||||
|
|
|
@ -6,7 +6,6 @@ use super::{ModuleInitError, NapModule, NapModuleContext};
|
||||||
const SET_DITHER_CONFIG: usize = 0x8CA93D0;
|
const SET_DITHER_CONFIG: usize = 0x8CA93D0;
|
||||||
const DITHER_CONFIG_AVATAR_USING_DITHER_ALPHA: usize = 0x49;
|
const DITHER_CONFIG_AVATAR_USING_DITHER_ALPHA: usize = 0x49;
|
||||||
|
|
||||||
const ON_ENTER_BIG_SCENE_SC_NOTIFY: usize = 0x104721E0;
|
|
||||||
const ON_ENTER_SCENE_SC_NOTIFY: usize = 0x86E6F80;
|
const ON_ENTER_SCENE_SC_NOTIFY: usize = 0x86E6F80;
|
||||||
const ENTER_SCENE_SC_NOTIFY_SCENE_DATA: usize = 0x10;
|
const ENTER_SCENE_SC_NOTIFY_SCENE_DATA: usize = 0x10;
|
||||||
const SCENE_DATA_SCENE_TYPE: usize = 0x74;
|
const SCENE_DATA_SCENE_TYPE: usize = 0x74;
|
||||||
|
@ -28,11 +27,6 @@ impl NapModule for NapModuleContext<CensorshipPatch> {
|
||||||
CensorshipPatch::on_enter_scene_sc_notify,
|
CensorshipPatch::on_enter_scene_sc_notify,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
self.interceptor.attach(
|
|
||||||
self.base.wrapping_add(ON_ENTER_BIG_SCENE_SC_NOTIFY),
|
|
||||||
CensorshipPatch::on_enter_big_scene_sc_notify,
|
|
||||||
)?;
|
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -42,8 +36,7 @@ impl CensorshipPatch {
|
||||||
if LAST_ENTER_SCENE_TYPE.load(Ordering::SeqCst) == SCENE_TYPE_HALL {
|
if LAST_ENTER_SCENE_TYPE.load(Ordering::SeqCst) == SCENE_TYPE_HALL {
|
||||||
if (*reg).rdx != 0 {
|
if (*reg).rdx != 0 {
|
||||||
println!("SetDitherConfig: disabling dither alpha");
|
println!("SetDitherConfig: disabling dither alpha");
|
||||||
*(((*reg).rdx as *mut u8).wrapping_add(DITHER_CONFIG_AVATAR_USING_DITHER_ALPHA)) =
|
*(((*reg).rdx as *mut u8).wrapping_add(DITHER_CONFIG_AVATAR_USING_DITHER_ALPHA)) = 0;
|
||||||
0;
|
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
println!("SetDitherConfig: not in hall, ignoring");
|
println!("SetDitherConfig: not in hall, ignoring");
|
||||||
|
@ -63,10 +56,4 @@ impl CensorshipPatch {
|
||||||
|
|
||||||
LAST_ENTER_SCENE_TYPE.store(scene_type, Ordering::SeqCst);
|
LAST_ENTER_SCENE_TYPE.store(scene_type, Ordering::SeqCst);
|
||||||
}
|
}
|
||||||
|
|
||||||
pub unsafe extern "win64" fn on_enter_big_scene_sc_notify(_: *mut Registers, _: usize) {
|
|
||||||
println!("EnterBigSceneScNotify");
|
|
||||||
|
|
||||||
LAST_ENTER_SCENE_TYPE.store(0, Ordering::SeqCst);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue