2023-11-12 19:40:02 -05:00
|
|
|
#include "../ultramodern/ultramodern.hpp"
|
2023-02-19 22:27:35 -05:00
|
|
|
#include "recomp.h"
|
|
|
|
|
|
|
|
extern "C" void osViSetYScale_recomp(uint8_t* rdram, recomp_context * ctx) {
|
2023-03-10 16:36:58 -05:00
|
|
|
osViSetYScale(ctx->f12.fl);
|
2023-02-19 22:27:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViSetXScale_recomp(uint8_t* rdram, recomp_context * ctx) {
|
2023-03-10 16:36:58 -05:00
|
|
|
osViSetXScale(ctx->f12.fl);
|
2023-02-19 22:27:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osCreateViManager_recomp(uint8_t* rdram, recomp_context* ctx) {
|
|
|
|
;
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViBlack_recomp(uint8_t* rdram, recomp_context* ctx) {
|
2023-03-05 20:16:16 -05:00
|
|
|
osViBlack((uint32_t)ctx->r4);
|
2023-02-19 22:27:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViSetSpecialFeatures_recomp(uint8_t* rdram, recomp_context* ctx) {
|
2023-03-05 20:16:16 -05:00
|
|
|
osViSetSpecialFeatures((uint32_t)ctx->r4);
|
2023-02-19 22:27:35 -05:00
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViGetCurrentFramebuffer_recomp(uint8_t* rdram, recomp_context* ctx) {
|
|
|
|
ctx->r2 = (gpr)(int32_t)osViGetCurrentFramebuffer();
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViGetNextFramebuffer_recomp(uint8_t* rdram, recomp_context* ctx) {
|
|
|
|
ctx->r2 = (gpr)(int32_t)osViGetNextFramebuffer();
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViSwapBuffer_recomp(uint8_t* rdram, recomp_context* ctx) {
|
|
|
|
osViSwapBuffer(rdram, (int32_t)ctx->r4);
|
|
|
|
}
|
|
|
|
|
|
|
|
extern "C" void osViSetMode_recomp(uint8_t* rdram, recomp_context* ctx) {
|
2023-03-02 23:38:52 -05:00
|
|
|
osViSetMode(rdram, (int32_t)ctx->r4);
|
2023-02-19 22:27:35 -05:00
|
|
|
}
|
2023-10-23 15:32:30 -04:00
|
|
|
|
|
|
|
extern uint64_t total_vis;
|
|
|
|
|
|
|
|
extern "C" void wait_one_frame(uint8_t* rdram, recomp_context* ctx) {
|
|
|
|
uint64_t cur_vis = total_vis;
|
|
|
|
while (cur_vis == total_vis) {
|
|
|
|
std::this_thread::yield();
|
|
|
|
}
|
|
|
|
}
|