1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-10 14:35:46 +00:00
oot/src/libultra_boot_O2/osViSetXScale.c

18 lines
373 B
C
Raw Normal View History

2020-03-17 00:31:30 -04:00
#include <global.h>
2020-03-22 22:19:43 +01:00
void osViSetXScale(f32 value) {
2020-03-17 00:31:30 -04:00
register u32 nomValue;
register u32 saveMask;
saveMask = __osDisableInt();
__osViNext->x.factor = value;
__osViNext->state |= 0x2;
nomValue = __osViNext->modep->comRegs.xScale & 0xfff;
__osViNext->x.scale = (u32)(__osViNext->x.factor * nomValue) & 0xFFF;
__osRestoreInt(saveMask);
}