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': {
|
||||
// Set VTable Address
|
||||
if (!isExtended) {
|
||||
target.ensureVTable();
|
||||
if (!isExtended && args.length > 0) {
|
||||
target.setVTableAddress(safeParseInt(args));
|
||||
}
|
||||
break;
|
||||
|
@ -32,7 +32,7 @@ export class Struct {
|
||||
}
|
||||
|
||||
// Ensure VTable Exists
|
||||
#ensureVTable() {
|
||||
ensureVTable() {
|
||||
if (this.#vtable === null) {
|
||||
this.#vtable = new VTable(this.#name);
|
||||
this.addProperty(this.#vtable);
|
||||
@ -97,7 +97,7 @@ export class Struct {
|
||||
throw new Error();
|
||||
}
|
||||
if (isVirtual) {
|
||||
this.#ensureVTable();
|
||||
this.ensureVTable();
|
||||
this.#vtable!.add(method);
|
||||
} else {
|
||||
this.#methods.push(method);
|
||||
@ -119,11 +119,11 @@ export class Struct {
|
||||
|
||||
// Configure VTable
|
||||
setVTableSize(size: number, isExact: boolean) {
|
||||
this.#ensureVTable();
|
||||
this.ensureVTable();
|
||||
this.#vtable!.setSize(size, isExact);
|
||||
}
|
||||
setVTableAddress(address: number) {
|
||||
this.#ensureVTable();
|
||||
this.ensureVTable();
|
||||
this.#vtable!.setAddress(address);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user