More Fixes
This commit is contained in:
parent
5730267135
commit
95e24d13fa
@ -123,7 +123,8 @@ export function load(target: Struct, name: string, isExtended: boolean) {
|
|||||||
}
|
}
|
||||||
case 'vtable': {
|
case 'vtable': {
|
||||||
// Set VTable Address
|
// Set VTable Address
|
||||||
if (!isExtended) {
|
target.ensureVTable();
|
||||||
|
if (!isExtended && args.length > 0) {
|
||||||
target.setVTableAddress(safeParseInt(args));
|
target.setVTableAddress(safeParseInt(args));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -32,7 +32,7 @@ export class Struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ensure VTable Exists
|
// Ensure VTable Exists
|
||||||
#ensureVTable() {
|
ensureVTable() {
|
||||||
if (this.#vtable === null) {
|
if (this.#vtable === null) {
|
||||||
this.#vtable = new VTable(this.#name);
|
this.#vtable = new VTable(this.#name);
|
||||||
this.addProperty(this.#vtable);
|
this.addProperty(this.#vtable);
|
||||||
@ -97,7 +97,7 @@ export class Struct {
|
|||||||
throw new Error();
|
throw new Error();
|
||||||
}
|
}
|
||||||
if (isVirtual) {
|
if (isVirtual) {
|
||||||
this.#ensureVTable();
|
this.ensureVTable();
|
||||||
this.#vtable!.add(method);
|
this.#vtable!.add(method);
|
||||||
} else {
|
} else {
|
||||||
this.#methods.push(method);
|
this.#methods.push(method);
|
||||||
@ -119,11 +119,11 @@ export class Struct {
|
|||||||
|
|
||||||
// Configure VTable
|
// Configure VTable
|
||||||
setVTableSize(size: number, isExact: boolean) {
|
setVTableSize(size: number, isExact: boolean) {
|
||||||
this.#ensureVTable();
|
this.ensureVTable();
|
||||||
this.#vtable!.setSize(size, isExact);
|
this.#vtable!.setSize(size, isExact);
|
||||||
}
|
}
|
||||||
setVTableAddress(address: number) {
|
setVTableAddress(address: number) {
|
||||||
this.#ensureVTable();
|
this.ensureVTable();
|
||||||
this.#vtable!.setAddress(address);
|
this.#vtable!.setAddress(address);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user