mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-01-05 19:19:43 -06:00
* Implemented guest-to-host function pointers (WIP) Co-Authored-By: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com> * function: support more types for function pointers * api: ported BlueBlur headers and misc. research * Move over function-pointers changes from options-menu branch. --------- Co-authored-by: Skyth (Asilkan) <19259897+blueskythlikesclouds@users.noreply.github.com>
17 lines
483 B
C++
17 lines
483 B
C++
#pragma once
|
|
|
|
#include <cpu/guest_code.h>
|
|
#include <cpu/guest_stack_var.h>
|
|
#include <kernel/function.h>
|
|
|
|
#define SWA__CONCAT2(x, y) x##y
|
|
#define SWA_CONCAT2(x, y) _CONCAT(x, y)
|
|
|
|
#define SWA_INSERT_PADDING(length) \
|
|
uint8_t SWA_CONCAT2(pad, __LINE__)[length]
|
|
|
|
#define SWA_VIRTUAL_FUNCTION(returnType, virtualIndex, ...) \
|
|
GuestToHostFunction<returnType>(*(be<uint32_t>*)(g_memory.Translate(*(be<uint32_t>*)(this) + (4 * virtualIndex))), __VA_ARGS__)
|
|
|
|
struct swa_null_ctor {};
|