summaryrefslogtreecommitdiff
path: root/src/code/graph.c
diff options
context:
space:
mode:
authorcadmic <cadmic24@gmail.com>2024-09-27 13:44:35 -0700
committerGitHub <noreply@github.com>2024-09-27 16:44:35 -0400
commitc6160e1980d9ff5e048eb57ee8e55bd755bcb891 (patch)
treef8ca33b65ea490dbaf57a04eb1b62ef486fc5687 /src/code/graph.c
parent86a146db24c1b226286e2bd93063c8a65413efc6 (diff)
[ntsc-1.0/1.1] Match PAL 1.0 viconfig changes (#2231)
* [ntsc-1.0/1.1] Match viconfig changes * SREG(48) -> R_VI_MODE_EDIT_STATE
Diffstat (limited to 'src/code/graph.c')
-rw-r--r--src/code/graph.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/code/graph.c b/src/code/graph.c
index 5aadf9cc8..2ecd87dd1 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -2,6 +2,7 @@
#include "fault.h"
#include "terminal.h"
#include "ucode_disas.h"
+#include "versions.h"
#define GFXPOOL_HEAD_MAGIC 0x1234
#define GFXPOOL_TAIL_MAGIC 0x5678
@@ -140,10 +141,17 @@ void Graph_Init(GraphicsContext* gfxCtx) {
gfxCtx->gfxPoolIdx = 0;
gfxCtx->fbIdx = 0;
gfxCtx->viMode = NULL;
+
+#if OOT_VERSION < PAL_1_0
+ gfxCtx->viFeatures = 0;
+#else
gfxCtx->viFeatures = gViConfigFeatures;
gfxCtx->xScale = gViConfigXScale;
gfxCtx->yScale = gViConfigYScale;
+#endif
+
osCreateMesgQueue(&gfxCtx->queue, gfxCtx->msgBuff, ARRAY_COUNT(gfxCtx->msgBuff));
+
#if OOT_DEBUG
func_800D31F0();
Fault_AddClient(&sGraphFaultClient, Graph_FaultClient, NULL, NULL);
@@ -272,8 +280,10 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
cfb->viMode = gfxCtx->viMode;
cfb->viFeatures = gfxCtx->viFeatures;
+#if OOT_VERSION >= PAL_1_0
cfb->xScale = gfxCtx->xScale;
cfb->yScale = gfxCtx->yScale;
+#endif
cfb->unk_10 = 0;
cfb->updateRate = R_UPDATE_RATE;