summaryrefslogtreecommitdiff
path: root/soh/src/code
diff options
context:
space:
mode:
authorGarrett Cox <garrettjcox@gmail.com>2023-11-24 12:25:39 -0600
committerGitHub <noreply@github.com>2023-11-24 12:25:39 -0600
commitbdc6fad0a9ae9ff61574ade0c758a3655a34a203 (patch)
treef0a98460fa46eff1a5366ecdc417c1815ee664dc /soh/src/code
parentc3ae829370d701e1bd48c78b296b2752909f180f (diff)
parentf30e76e7b13de7493a6b4638e554f7bded65d513 (diff)
Merge pull request #3208 from garrettjoecox/valueViewer
MVP ValueViewer
Diffstat (limited to 'soh/src/code')
-rw-r--r--soh/src/code/graph.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c
index 85169db77..d273e7643 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("gValueViewer.EnablePrinting", 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);