summaryrefslogtreecommitdiff
path: root/src/code/graph.c
diff options
context:
space:
mode:
authorRandom <28494085+Random0666@users.noreply.github.com>2020-04-05 19:29:30 +0200
committerRandom <28494085+Random0666@users.noreply.github.com>2020-04-05 19:29:30 +0200
commit43acba22a94c4e90a237dda5a3376c099633cbda (patch)
tree0093367ebf3d67a5351e70d0466ebedafc2aa826 /src/code/graph.c
parent62c6549eec5a04b1777cb6f169164718bd299cc8 (diff)
Fixes in PR #50 (3)
- Rename Graph_OpenDisp/Graph_CloseDisp to Graph_OpenDisps/Graph_CloseDisps - Rename gfxArr to dispRefs
Diffstat (limited to 'src/code/graph.c')
-rw-r--r--src/code/graph.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/src/code/graph.c b/src/code/graph.c
index c6d8a6d61..fb3d80e06 100644
--- a/src/code/graph.c
+++ b/src/code/graph.c
@@ -157,7 +157,7 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
u32 temp;
OSTime time;
OSTask_t* task;
- Gfx* gfxArr[3];
+ Gfx* dispRefs[3];
OSScTask* scTask;
CfbInfo* cfb;
@@ -219,9 +219,9 @@ void Graph_TaskSet00(GraphicsContext* gfxCtx) {
task->output_buff_size = gGfxSPTaskYieldBuffer; // ??
task->data_ptr = gfxCtx->workBuffer;
- Graph_OpenDisp(gfxArr, gfxCtx, "../graph.c", 828);
+ Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 828);
task->data_size = (u32)gfxCtx->work.p - (u32)gfxCtx->workBuffer;
- Graph_CloseDisp(gfxArr, gfxCtx, "../graph.c", 830);
+ Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 830);
task->yield_data_ptr = gGfxSPTaskYieldBuffer;
task->yield_data_size = sizeof(gGfxSPTaskYieldBuffer);
@@ -264,40 +264,40 @@ u32 sGraphCfbInfoIdx = 0;
#ifdef NON_MATCHING
void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
u32 problem; // 0xC4 -> 0xD4
- Gfx* gfxArr[5]; // 0xB0 -> 0xC0
- Gfx* gfxArr2[9]; // 0x8C -> 0x9C
- Gfx* gfxArr3[9]; // 0x68 -> 0x78
+ Gfx* dispRefs[5]; // 0xB0 -> 0xC0
+ Gfx* dispRefs2[9]; // 0x8C -> 0x9C
+ Gfx* dispRefs3[9]; // 0x68 -> 0x78
u64 time;
GfxPool* pool; // 0x4C -> 0x6C
gameState->unk_A0 = 0;
Graph_InitTHGA(gfxCtx);
- Graph_OpenDisp(gfxArr, gfxCtx, "../graph.c", 966);
+ Graph_OpenDisps(dispRefs, gfxCtx, "../graph.c", 966);
gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 開始", 0);
gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 開始", 0);
gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 開始", 0);
gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 開始", 0);
- Graph_CloseDisp(gfxArr, gfxCtx, "../graph.c", 975);
+ Graph_CloseDisps(dispRefs, gfxCtx, "../graph.c", 975);
func_800C4A98(gameState); // Game_ReqPadData
func_800C4AC8(gameState); // Game_SetGameFrame
- Graph_OpenDisp(gfxArr2, gfxCtx, "../graph.c", 987);
+ Graph_OpenDisps(dispRefs2, gfxCtx, "../graph.c", 987);
gDPNoOpString(gfxCtx->work.p++, "WORK_DISP 終了", 0);
gDPNoOpString(gfxCtx->polyOpa.p++, "POLY_OPA_DISP 終了", 0);
gDPNoOpString(gfxCtx->polyXlu.p++, "POLY_XLU_DISP 終了", 0);
gDPNoOpString(gfxCtx->overlay.p++, "OVERLAY_DISP 終了", 0);
- Graph_CloseDisp(gfxArr2, gfxCtx, "../graph.c", 996);
+ Graph_CloseDisps(dispRefs2, gfxCtx, "../graph.c", 996);
- Graph_OpenDisp(gfxArr3, gfxCtx, "../graph.c", 999);
+ Graph_OpenDisps(dispRefs3, gfxCtx, "../graph.c", 999);
gSPBranchList(gfxCtx->work.p++, gfxCtx->polyOpaBuffer);
gSPBranchList(gfxCtx->polyOpa.p++, gfxCtx->polyXluBuffer);
gSPBranchList(gfxCtx->polyXlu.p++, gfxCtx->overlayBuffer);
gDPPipeSync(gfxCtx->overlay.p++);
gDPFullSync(gfxCtx->overlay.p++);
gSPEndDisplayList(gfxCtx->overlay.p++);
- Graph_CloseDisp(gfxArr3, gfxCtx, "../graph.c", 1028);
+ Graph_CloseDisps(dispRefs3, gfxCtx, "../graph.c", 1028);
if (HREG(80) == 10 && HREG(93) == 2) {
HREG(80) = 7;
@@ -467,11 +467,11 @@ void* Graph_Alloc2(GraphicsContext* gfxCtx, size_t size) {
return THGA_AllocEnd(&gfxCtx->polyOpa, ALIGN16(size));
}
-void Graph_OpenDisp(Gfx** gfxArr, GraphicsContext* gfxCtx, const char* file, s32 line) {
+void Graph_OpenDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, s32 line) {
if (HREG(80) == 7 && HREG(82) != 4) {
- gfxArr[0] = gfxCtx->polyOpa.p;
- gfxArr[1] = gfxCtx->polyXlu.p;
- gfxArr[2] = gfxCtx->overlay.p;
+ dispRefs[0] = gfxCtx->polyOpa.p;
+ dispRefs[1] = gfxCtx->polyXlu.p;
+ dispRefs[2] = gfxCtx->overlay.p;
gDPNoOpOpenDisp(gfxCtx->polyOpa.p++, file, line);
gDPNoOpOpenDisp(gfxCtx->polyXlu.p++, file, line);
@@ -479,22 +479,22 @@ void Graph_OpenDisp(Gfx** gfxArr, GraphicsContext* gfxCtx, const char* file, s32
}
}
-void Graph_CloseDisp(Gfx** gfxArr, GraphicsContext* gfxCtx, const char* file, s32 line) {
+void Graph_CloseDisps(Gfx** dispRefs, GraphicsContext* gfxCtx, const char* file, s32 line) {
if (HREG(80) == 7 && HREG(82) != 4) {
- if (gfxArr[0] + 1 == gfxCtx->polyOpa.p) {
- gfxCtx->polyOpa.p = gfxArr[0];
+ if (dispRefs[0] + 1 == gfxCtx->polyOpa.p) {
+ gfxCtx->polyOpa.p = dispRefs[0];
} else {
gDPNoOpCloseDisp(gfxCtx->polyOpa.p++, file, line);
}
- if (gfxArr[1] + 1 == gfxCtx->polyXlu.p) {
- gfxCtx->polyXlu.p = gfxArr[1];
+ if (dispRefs[1] + 1 == gfxCtx->polyXlu.p) {
+ gfxCtx->polyXlu.p = dispRefs[1];
} else {
gDPNoOpCloseDisp(gfxCtx->polyXlu.p++, file, line);
}
- if (gfxArr[2] + 1 == gfxCtx->overlay.p) {
- gfxCtx->overlay.p = gfxArr[2];
+ if (dispRefs[2] + 1 == gfxCtx->overlay.p) {
+ gfxCtx->overlay.p = dispRefs[2];
} else {
gDPNoOpCloseDisp(gfxCtx->overlay.p++, file, line);
}