Skip to content

[Feature] DaedalusSymbol: Expose OffsetAsMember and ClassSize for instance addressing #24

@JaXt0r

Description

@JaXt0r

When Ikarus scripts allocate a struct with MEM_Alloc and access its fields through a transient instance, each field's byte position within the allocation must be computed. This requires two symbol metadata values that are available in the C++ API but not yet exposed in the C# wrapper.

Reference OpenGothic (directmemory.cpp):

void memory_instance::set_int(const zenkit::DaedalusSymbol& sym, uint16_t index, int32_t value) {
    ptr32_t addr = address
                 + ptr32_t(sym.offset_as_member()) // 1.
                 + ptr32_t(index * sym.class_size());  // 2.
    owner.mem32.writeInt(addr, value);
}

Requested C# API:

  • DaedalusSymbol.OffsetAsMember
  • DaedalusSymbol.ClassSize

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