Skip to content

Voodoo improvements #4

@wipe2238

Description

@wipe2238
  • r_write_byte(...), r_write_short(...), r_write_int(...), r_write_string(...)
    Same as vanilla functions but without current address limits; needed mostly for patching HRP.

  • r_call_offset_push(int value)
    Takes value from script and caches it in internal buffer until r_call_offset is used.
    Each call to this function adds a new value, keeping previously added intact.

  • r_call_offset(int offset)
    Takes care of passing cached values to asm and call given offset. Once it's done, internal buffer is cleared and ready to accept arguments for next function. Offset limits either removed or very relaxed.
    Function should be able to access all currently loaded libraries and support high amount of arguments.

Intended usage:

#define call_offset_v6(offset,arg1,arg2,arg3,arg4,arg5,arg6) \
               r_call_offset_push(arg1); \
               r_call_offset_push(arg2); \
               r_call_offset_push(arg3); \
               r_call_offset_push(arg4); \
               r_call_offset_push(arg5); \
               r_call_offset_push(arg6); \
               r_call_offset(offset)

#define call_offset_r6(var,offset,arg1,arg2,arg3,arg4,arg5,arg6) \
               r_call_offset_push(arg1); \
               r_call_offset_push(arg2); \
               r_call_offset_push(arg3); \
               r_call_offset_push(arg4); \
               r_call_offset_push(arg5); \
               r_call_offset_push(arg6); \
               var := r_call_offset(offset)
  • r_call_offset_cdecl(int offset)
    same as r_call_offset, but for cdecl calling convention

  • r_call_offset_stdcall(int offset)
    same as r_call_offset, but for stdcall calling convention

  • r_call_offset_fastcall(int offset)
    same as r_call_offset, but for fastcall calling convention

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions