Skip to content

[Feature] DaedalusSymbol: Expose SetInstance/GetInstance to support MEM_AssignInst #25

@JaXt0r

Description

@JaXt0r

Ikarus's MEM_AssignInst assigns a transient instance to a named symbol so that subsequent script code accessing that symbol operates on the custom instance. This requires writing a DaedalusInstance back into a symbol's instance slot, which is not currently possible from C#.

Reference OpenGothic (directmemory.cpp):

void DirectMemory::mem_assigninst(int index, int ptr) {
    auto* sym = vm.find_symbol_by_index(uint32_t(index));
    sym->set_instance(std::make_shared<memory_instance>(*this, ptr32_t(ptr)));
}

Requested C# API:

  • DaedalusSymbol.SetInstance()
  • DaedalusSymbol.GetInstance()

Metadata

Metadata

Assignees

Labels

awaiting verificationThe problem has been fixed, though external verification of this fix is requiredenhancementNew feature or request

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions