mirror of
https://github.com/izzy2lost/Diddy-Kong-Racing.git
synced 2026-06-19 01:16:26 -07:00
c: osViGetCurrentFrameBuffer
This commit is contained in:
@@ -5,11 +5,43 @@
|
||||
#include "macros.h"
|
||||
#include "libultra_internal.h"
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x0 */ f32 factor;
|
||||
/* 0x4 */ u16 offset;
|
||||
/* 0x8 */ u32 scale;
|
||||
} __OSViScale;
|
||||
|
||||
typedef struct
|
||||
{
|
||||
/* 0x0 */ u16 state;
|
||||
/* 0x2 */ u16 retraceCount;
|
||||
/* 0x4 */ void *framep;
|
||||
/* 0x8 */ OSViMode *modep;
|
||||
/* 0xC */ u32 control;
|
||||
/* 0x10 */ OSMesgQueue *msgq;
|
||||
/* 0x14 */ OSMesg msg;
|
||||
/* 0x18 */ __OSViScale x;
|
||||
/* 0x24 */ __OSViScale y;
|
||||
} __OSViContext;
|
||||
|
||||
extern OSTime __osCurrentTime;//__osCurrentTime
|
||||
extern u32 __osBaseCounter; //__osBaseCounter
|
||||
extern __OSViContext *__osViCurr;
|
||||
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D29F0/func_800D1DF0.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D29F0/osViGetCurrentFramebuffer.s")
|
||||
|
||||
void *osViGetCurrentFramebuffer(void)
|
||||
{
|
||||
register u32 saveMask;
|
||||
void *framep;
|
||||
|
||||
saveMask = __osDisableInt();
|
||||
framep = __osViCurr->framep;
|
||||
__osRestoreInt(saveMask);
|
||||
return framep;
|
||||
}
|
||||
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D29F0/osViGetNextFramebuffer.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D29F0/_VirtualToPhysicalTask.s")
|
||||
GLOBAL_ASM("lib/asm/non_matchings/unknown_0D29F0/osSpTaskLoad.s")
|
||||
|
||||
Reference in New Issue
Block a user