From f30e76e7b13de7493a6b4638e554f7bded65d513 Mon Sep 17 00:00:00 2001 From: Garrett Cox Date: Sat, 16 Sep 2023 23:20:13 -0500 Subject: MVP ValueViewer --- soh/src/code/graph.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) (limited to 'soh/src/code') 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 #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); -- cgit v1.2.3