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#.
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()
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):
Requested C# API: