-
Notifications
You must be signed in to change notification settings - Fork 30
/
NS_010079201BD88000_Tokimeki_Memorial_Girl's_Side_2nd_Season_for_Nintendo_Switch.js
63 lines (46 loc) · 2 KB
/
NS_010079201BD88000_Tokimeki_Memorial_Girl's_Side_2nd_Season_for_Nintendo_Switch.js
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
52
53
54
55
56
57
58
59
60
61
62
63
// ==UserScript==
// @name [010079201BD88000] Tokimeki Memorial Girl’s Side 2nd Season for Nintendo Switch
// @version 1.0.1
// @author [zooo]
// @description Yuzu
// * KONAMI
// * Unity (il2cpp)
// ==/UserScript==
const gameVer = '1.0.1';
trans.replace(function (s) {
return s
.replace(/▼/g, '♡') ;
});
//------------------------------------------------
const decoder = new TextDecoder('utf-16');
const { setHook } = require('./libYuzu.js');
const nameHandler = trans.send(handler, '300+'); // join 250ms
const dialogueHandler = trans.send(handler, '200+'); // join 200ms
setHook({
'1.0.1': {
[0x82058848 - 0x80004000]: dialogueHandler.bind_(null, 0, "dialogue1"),
[0x82058aa0 - 0x80004000]: dialogueHandler.bind_(null, 0, "dialogue2"),
[0x8205a244 - 0x80004000]: dialogueHandler.bind_(null, 0, "dialogue3"),
[0x826ee1d8 - 0x80004000]: dialogueHandler.bind_(null, 0, "choice"),
[0x8218e258 - 0x80004000]: dialogueHandler.bind_(null, 0, "news"),
[0x823b61d4 - 0x80004000]: dialogueHandler.bind_(null, 0, "mail"),
[0x82253454 - 0x80004000]: dialogueHandler.bind_(null, 0, "luckyitem"),
[0x82269240 - 0x80004000]: dialogueHandler.bind_(null, 0, "profile1"),
[0x82269138 - 0x80004000]: dialogueHandler.bind_(null, 0, "profile2"),
[0x822691ec - 0x80004000]: dialogueHandler.bind_(null, 0, "profile3"),
[0x82269198 - 0x80004000]: dialogueHandler.bind_(null, 0, "profile4"),
}
}[globalThis.gameVer = globalThis.gameVer ?? gameVer]);
function handler(regs, index, hookname) {
const reg = regs[index];
console.log('onEnter');
console.log('onEnter: ' + hookname);
const address = reg.value;
//console.log(hexdump(address, { header: false, ansi: false, length: 0x50 }));
/* processString */
const len = address.add(0x10).readU32() * 2;
let s = address.add(0x14).readUtf16String(len);
s = s.replaceAll(/[\s]/g,'');
s = s.replace(/\\n/g,'');
return s;
}