-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathNS_010056B024B92000_Handsome_Laundering_-the_mystic_lover-.js
More file actions
51 lines (44 loc) · 1.81 KB
/
Copy pathNS_010056B024B92000_Handsome_Laundering_-the_mystic_lover-.js
File metadata and controls
51 lines (44 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
// ==UserScript==
// @name [010056B024B92000] Handsome Laundering -the mystic lover- (ハンサムロンダリング -the mystic lover-)
// @version 1.0.0, 1.1.0
// @author Mansive
// @description
// * MintLip
// * Edia Co., Ltd.
// *
// ==/UserScript==
const gameVer = "1.1.0";
const { setHook } = require("./libYuzu.js");
const mainHandler = trans.send(handler, "200+"); // join 200ms
setHook(
{
"1.0.0": {
[0x8348cc98 - 0x80004000]: mainHandler.bind_(null, 0, "text"),
[0x83490218 - 0x80004000]: mainHandler.bind_(null, 0, "choice"),
[0x817f4c4c - 0x80004000]: mainHandler.bind_(null, 0, "dict word"),
[0x817f4ca0 - 0x80004000]: mainHandler.bind_(null, 0, "dict meaning"),
[0x817c8818 - 0x80004000]: mainHandler.bind_(null, 0, "character select"),
},
"1.1.0": {
[0x8348ccd8 - 0x80004000]: mainHandler.bind_(null, 0, "text"),
[0x83490258 - 0x80004000]: mainHandler.bind_(null, 0, "choice"),
[0x817f4c8c - 0x80004000]: mainHandler.bind_(null, 0, "dict word"),
// [0x817f4e20 - 0x80004000]: mainHandler.bind_(null, 0, "dict meaning"), // false
[0x817f4ce0 - 0x80004000]: mainHandler.bind_(null, 0, "dict meaning"),
[0x817c8858 - 0x80004000]: mainHandler.bind_(null, 0, "character select"),
},
}[(globalThis.gameVer = globalThis.gameVer ?? gameVer)],
);
function handler(regs, index, hookname) {
console.log("onEnter: " + hookname);
const address = regs[index].value;
//console.log(hexdump(address, { header: false, ansi: false, length: 0x50 }));
// console.warn(JSON.stringify(address.add(0x14).readUtf16String()));
const s = address
.add(0x14)
.readUtf16String()
.replace(/\\n(\u{3000})?/gu, "\n") // add newlines
// .replace(/\\n(\u{3000})?/gu, "") // remove newlines
.replace(/<[^>]+>/g, "");
return s;
}