overlay-toolkit 0.12.0 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/helper.d.ts +2 -0
- package/dist/memory.d.ts +49 -0
- package/dist/otk.d.ts +33 -2
- package/dist/overlay-toolkit.js +346 -234
- package/dist/overlay-toolkit.umd.cjs +1 -1
- package/package.json +4 -1
package/dist/helper.d.ts
ADDED
package/dist/memory.d.ts
ADDED
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
interface SigScanData {
|
|
2
|
+
base: number;
|
|
3
|
+
addr: number;
|
|
4
|
+
bytes: string;
|
|
5
|
+
mask: boolean[];
|
|
6
|
+
}
|
|
7
|
+
interface MemoryReadData {
|
|
8
|
+
addr: number;
|
|
9
|
+
len: number;
|
|
10
|
+
bytes: string;
|
|
11
|
+
value?: number;
|
|
12
|
+
}
|
|
13
|
+
export declare class MemoryScanResult {
|
|
14
|
+
addr: number;
|
|
15
|
+
base: number;
|
|
16
|
+
bytes: Uint8Array;
|
|
17
|
+
mask: boolean[];
|
|
18
|
+
get valid(): boolean;
|
|
19
|
+
constructor(scan: SigScanData);
|
|
20
|
+
private getNthRange;
|
|
21
|
+
/**
|
|
22
|
+
* get nth masked (??) data
|
|
23
|
+
* @param index
|
|
24
|
+
* @returns data slice
|
|
25
|
+
*/
|
|
26
|
+
getNthMasked(index: number): Uint8Array | null;
|
|
27
|
+
/**
|
|
28
|
+
* get nth masked (??) data in DataView
|
|
29
|
+
* @param index
|
|
30
|
+
* @returns dataview
|
|
31
|
+
*/
|
|
32
|
+
getDataView(index: number): DataView | null;
|
|
33
|
+
/**
|
|
34
|
+
* get relative pointer to another object, usually LEA, call, ...
|
|
35
|
+
* @param index
|
|
36
|
+
* @returns
|
|
37
|
+
*/
|
|
38
|
+
getRelativePointer(index: number): number;
|
|
39
|
+
}
|
|
40
|
+
export declare class MemoryReadResult {
|
|
41
|
+
addr: number;
|
|
42
|
+
length: number;
|
|
43
|
+
bytes: Uint8Array;
|
|
44
|
+
value?: number;
|
|
45
|
+
get valid(): boolean;
|
|
46
|
+
constructor(data: MemoryReadData);
|
|
47
|
+
get dataView(): DataView;
|
|
48
|
+
}
|
|
49
|
+
export {};
|
package/dist/otk.d.ts
CHANGED
|
@@ -2,6 +2,7 @@ import { OverlayHID } from './hid';
|
|
|
2
2
|
import { OverlayCallMessage, OverlayPluginAPI } from './overlay';
|
|
3
3
|
import { FileSystem } from './file_system';
|
|
4
4
|
import { PacketFilter, PacketHandler } from './packet';
|
|
5
|
+
import { MemoryReadResult, MemoryScanResult } from './memory';
|
|
5
6
|
export interface DispatchMessage {
|
|
6
7
|
type: string;
|
|
7
8
|
}
|
|
@@ -9,6 +10,16 @@ export interface GameVersion {
|
|
|
9
10
|
version: string;
|
|
10
11
|
lang: number;
|
|
11
12
|
}
|
|
13
|
+
export interface PluginVersion {
|
|
14
|
+
/**
|
|
15
|
+
* plugin version
|
|
16
|
+
*/
|
|
17
|
+
version: string;
|
|
18
|
+
/**
|
|
19
|
+
* tools that plugin provided
|
|
20
|
+
*/
|
|
21
|
+
tools?: string[];
|
|
22
|
+
}
|
|
12
23
|
export declare class OverlayToolkit {
|
|
13
24
|
/**
|
|
14
25
|
* HID interface
|
|
@@ -54,15 +65,35 @@ export declare class OverlayToolkit {
|
|
|
54
65
|
*/
|
|
55
66
|
GetGameVersion(): Promise<GameVersion>;
|
|
56
67
|
/**
|
|
57
|
-
*
|
|
58
|
-
* @returns
|
|
68
|
+
* Get plugin version
|
|
69
|
+
* @returns the plugin version
|
|
59
70
|
*/
|
|
60
71
|
GetPluginVersion(): Promise<string>;
|
|
72
|
+
/**
|
|
73
|
+
* Get plugin version and tool list
|
|
74
|
+
* @returns the plugin info
|
|
75
|
+
*/
|
|
76
|
+
GetPluginInfo(): Promise<PluginVersion>;
|
|
61
77
|
/**
|
|
62
78
|
* Open URL in default browser
|
|
63
79
|
* @param url URL to open
|
|
64
80
|
*/
|
|
65
81
|
OpenBrowser(url: string): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Search memory sig in program TEXT section
|
|
84
|
+
* @param sig sig to scan. e.g. "e8 ?? ?? ?? ??"
|
|
85
|
+
* @param startAddr optional. address to start search, absolute address
|
|
86
|
+
* @param offset optional. address to start search, relative to text begin
|
|
87
|
+
* @returns
|
|
88
|
+
*/
|
|
89
|
+
MemoryScanSig(sig: string, offset: number, startAddr?: number): Promise<MemoryScanResult>;
|
|
90
|
+
/**
|
|
91
|
+
* Read memory with address and length
|
|
92
|
+
* @param addr address to read
|
|
93
|
+
* @param length length to read. 0x10000 maximum
|
|
94
|
+
* @returns
|
|
95
|
+
*/
|
|
96
|
+
MemoryRead(addr: number, length: number): Promise<MemoryReadResult>;
|
|
66
97
|
/**
|
|
67
98
|
* Call start overlay events
|
|
68
99
|
*
|