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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions