mirror of
https://github.com/zeldaret/oot.git
synced 2024-09-23 05:45:03 +00:00
f9d96d9f73
* Less warnings in boot & code segments * few more warnings gone * Ran formatter * z_view warning gone * -> 1 * f31 -> 31 * Remove function casts * Few more small improvements * Separate declaration and assignment in func_80091738 and Item_Give Co-authored-by: Thar0 <maximilianc64@gmail.com>
39 lines
1.0 KiB
C
39 lines
1.0 KiB
C
#include "global.h"
|
|
|
|
void osViSetSpecialFeatures(u32 func) {
|
|
register u32 prevInt = __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(prevInt);
|
|
}
|