Skip to content

add C ffi for parsing XMB files #2

@ScanMountGoat

Description

@ScanMountGoat

The XMB data from BinRead can be mapped into types compatible with C. This can also be easily converted to classes in C#.

#[repr(C)]
struct Entry {
    name: CString,
    parent_index: i32,
    properties: FfiVec<Property>
}

#[repr(C)]
struct Property {
    name: CString,
    value: CString
}

#[repr(C)]
struct Xmb {
    entries: FfiVec<Entry>
}

#[repr(C)]
pub struct FfiVec<T: Sized> {
    ptr: *mut T,
    size: usize,
}

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