diff options
| author | Adam Bird <archez39@me.com> | 2024-05-06 12:22:48 -0400 |
|---|---|---|
| committer | Adam Bird <archez39@me.com> | 2024-05-06 12:22:48 -0400 |
| commit | 439574d0d9e2a0ffede45ce6ee9056a14ad10068 (patch) | |
| tree | 2bd0f2c0398ed9bea4e053fcb55f60dfbf48aa5b /soh/src/code/graph.c | |
| parent | fd9cd9c5ebf611ed1c3f42c6406182c0534c8099 (diff) | |
| parent | 6443a986d9751b87a0b4e82c15f82a9971f88201 (diff) | |
Merge remote-tracking branch 'origin/develop' into merge-macready-may6
Diffstat (limited to 'soh/src/code/graph.c')
| -rw-r--r-- | soh/src/code/graph.c | 25 |
1 files changed, 24 insertions, 1 deletions
diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 85169db77..f5d620e72 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -7,6 +7,7 @@ #include <stdlib.h> #include "soh/Enhancements/debugger/colViewer.h" +#include "soh/Enhancements/debugger/valueViewer.h" #include "soh/Enhancements/gameconsole.h" #include "soh/OTRGlobals.h" @@ -289,6 +290,28 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { OPEN_DISPS(gfxCtx); + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("ValueViewerEnablePrinting"), 0)) { + Gfx* gfx; + Gfx* polyOpa; + GfxPrint printer; + + polyOpa = POLY_OPA_DISP; + gfx = Graph_GfxPlusOne(polyOpa); + gSPDisplayList(OVERLAY_DISP++, gfx); + + GfxPrint_Init(&printer); + GfxPrint_Open(&printer, gfx); + + ValueViewer_Draw(&printer); + + gfx = GfxPrint_Close(&printer); + GfxPrint_Destroy(&printer); + + gSPEndDisplayList(gfx++); + Graph_BranchDlist(polyOpa, gfx); + POLY_OPA_DISP = gfx; + } + gDPNoOpString(WORK_DISP++, "WORK_DISP 終了", 0); gDPNoOpString(POLY_OPA_DISP++, "POLY_OPA_DISP 終了", 0); gDPNoOpString(POLY_XLU_DISP++, "POLY_XLU_DISP 終了", 0); @@ -401,7 +424,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { sGraphUpdateTime = time; } - if (CVarGetInteger("gDebugEnabled", 0)) + if (CVarGetInteger(CVAR_DEVELOPER_TOOLS("DebugEnabled"), 0)) { if (CHECK_BTN_ALL(gameState->input[0].press.button, BTN_Z) && CHECK_BTN_ALL(gameState->input[0].cur.button, BTN_L | BTN_R)) { |
