mirror of
https://github.com/FEX-Emu/FEX.git
synced 2026-10-14 07:00:43 +02:00
34 lines
555 B
C++
34 lines
555 B
C++
#include "api.h"
|
|
|
|
extern "C" {
|
|
|
|
uint32_t GetDoubledValue(uint32_t input) {
|
|
return 2 * input;
|
|
}
|
|
|
|
struct OpaqueType {
|
|
uint32_t data;
|
|
};
|
|
|
|
OpaqueType* MakeOpaqueType(uint32_t data) {
|
|
return new OpaqueType { data };
|
|
}
|
|
|
|
uint32_t ReadOpaqueTypeData(OpaqueType* value) {
|
|
return value->data;
|
|
}
|
|
|
|
void DestroyOpaqueType(OpaqueType* value) {
|
|
delete value;
|
|
}
|
|
|
|
UnionType MakeUnionType(uint8_t a, uint8_t b, uint8_t c, uint8_t d) {
|
|
return UnionType { .c = { a, b, c, d } };
|
|
}
|
|
|
|
uint32_t GetUnionTypeA(UnionType* value) {
|
|
return value->a;
|
|
}
|
|
|
|
} // extern "C"
|