Skip to content

Special Hex String Construct for Mobile Label Addresses #33

Description

@OrionSR

The issue is that CleoA uses a label search strategy to find structure addresses so scripts are compatible with multiple versions of the game. The hex constructs used to store the label string won't decompile without IGNORE_UNKNOWN, and is returned as a hex bytes. which works, but provides little useful information on how to adapt the code.

These constructs are always used in combination with a label used by opcode 0DD0:. I'm wondering if that's enough information for Sanny to format the hex construct as a null terminated string. Or maybe there's a better solution, because this "Magic Hex" construct is extremely common in CleoA scripts - anything that accesses memory and isn't complete garbage.

Example (used in script body):

// Markuza97's any-version address codes - read once
0DD0: 6@ = get_label_addr @_ZN6CRadar13ms_RadarTraceE
0DD1: 6@ = get_func_addr_by_cstr_name 6@ // start of marker structure
0DD0: 7@ = get_label_addr @gMobileMenu   
0DD1: 7@ = get_func_addr_by_cstr_name 7@ // start of... menu data?
000A: 7@ += 0x48 // offset to marker index

Labels (traditionally appended to the end of the script):

// Markuza97's magic hex codes
:gMobileMenu
hex
"gMobileMenu" 00
end

:_ZN6CRadar13ms_RadarTraceE
hex
"_ZN6CRadar13ms_RadarTraceE" 00
end

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions