1
0
mirror of https://github.com/zeldaret/oot.git synced 2024-09-23 13:54:44 +00:00
oot/src/libultra_boot_O2/osViSetSpecialFeatures.c
Random 174af7384d
libultra cleanup (#215)
* cleanup libultra

* fixes

- use quotes instead of <> for includes
- add macros for zelda specific thread priorities
- fix Makefile
- properly format the remaining pfs structs

* fix button macros + add CHECK_BTN_ANY/CHECK_BTN_ALL

* remove ULTRA_ABS

* fix includes

* update z_player.c/z_lib.c + run format.sh

* merge upstream/master

* fix include in En_Goroiwa

* fix includes
2020-10-03 11:22:44 -04:00

37 lines
1.1 KiB
C

#include "global.h"
void osViSetSpecialFeatures(u32 func) {
register u32 int_disabled = __osDisableInt();
if (func & OS_VI_GAMMA_ON) {
__osViNext->features |= OS_VI_GAMMA;
}
if (func & OS_VI_GAMMA_OFF) {
__osViNext->features &= ~OS_VI_GAMMA;
}
if (func & OS_VI_GAMMA_DITHER_ON) {
__osViNext->features |= OS_VI_GAMMA_DITHER;
}
if (func & OS_VI_GAMMA_DITHER_OFF) {
__osViNext->features &= ~OS_VI_GAMMA_DITHER;
}
if (func & OS_VI_DIVOT_ON) {
__osViNext->features |= OS_VI_DIVOT;
}
if (func & OS_VI_DIVOT_OFF) {
__osViNext->features &= ~OS_VI_DIVOT;
}
if (func & OS_VI_DITHER_FILTER_ON) {
__osViNext->features |= OS_VI_DITHER_FILTER;
__osViNext->features &= ~(OS_VI_UNK200 | OS_VI_UNK100);
}
if (func & OS_VI_DITHER_FILTER_OFF) {
__osViNext->features &= ~OS_VI_DITHER_FILTER;
__osViNext->features |= __osViNext->modep->comRegs.ctrl & (OS_VI_UNK200 | OS_VI_UNK100);
}
__osViNext->state |= 8;
__osRestoreInt(int_disabled);
}