summaryrefslogtreecommitdiff
path: root/src/boot_O2_g3/viconfig.c
diff options
context:
space:
mode:
authorrozlette <uberpanzermensch@gmail.com>2020-03-15 01:13:53 -0500
committerrozlette <uberpanzermensch@gmail.com>2020-03-15 01:13:53 -0500
commitff958ad932b29c830afa8d2bfd6dd6a0616c93a8 (patch)
tree916cf38da1595716bcb37651b75f7ff22a93399a /src/boot_O2_g3/viconfig.c
parent0c35be2381ba8b46b0a1a2d9b625cf02d04cdb68 (diff)
Rename many functions, structs, and variables to match the oot decomp. Some things have not been renamed as their respective files have not been decompiled yet.
Diffstat (limited to 'src/boot_O2_g3/viconfig.c')
-rw-r--r--src/boot_O2_g3/viconfig.c61
1 files changed, 61 insertions, 0 deletions
diff --git a/src/boot_O2_g3/viconfig.c b/src/boot_O2_g3/viconfig.c
new file mode 100644
index 000000000..b28362947
--- /dev/null
+++ b/src/boot_O2_g3/viconfig.c
@@ -0,0 +1,61 @@
+#include <ultra64.h>
+#include <global.h>
+
+#ifdef NON_MATCHING
+void ViConfig_UpdateVi(u32 arg0) {
+ if (arg0 != 0) {
+ switch (osTvType) {
+ case 2:
+ osViSetMode(&osViModeMpalLan1);
+ break;
+ case 0:
+ osViSetMode(&osViModePalLan1);
+ break;
+ case 1:
+ default:
+ osViSetMode(&osViModeNtscLan1);
+ break;
+ }
+
+ // TODO v0 is used here instead of a0. Is this a 7.1 optimization?
+ if (gViConfigFeatures != 0) {
+ osViSetSpecialFeatures(gViConfigFeatures);
+ }
+
+ if (gViConfigYScale != 1) {
+ osViSetYScale(1);
+ }
+ } else {
+ osViSetMode(&D_8009B240);
+
+ if (gViConfigAdditionalScanLines != 0) {
+ func_80087E00(gViConfigAdditionalScanLines);
+ }
+
+ // TODO v0 is used here instead of a0. Is this a 7.1 optimization?
+ if (gViConfigFeatures != 0) {
+ osViSetSpecialFeatures(gViConfigFeatures);
+ }
+
+ if (gViConfigXScale != 1) {
+ osViSetXScale(gViConfigXScale);
+ }
+
+ if (gViConfigYScale != 1) {
+ osViSetYScale(gViConfigYScale);
+ }
+ }
+
+ gViConfigUseDefault = arg0;
+}
+#else
+GLOBAL_ASM("./asm/non_matchings/viconfig/ViConfig_UpdateVi.asm")
+#endif
+
+void ViConfig_UpdateBlack(void) {
+ if (gViConfigUseDefault != 0) {
+ osViBlack(1);
+ } else {
+ osViBlack(0);
+ }
+}