diff options
| author | Garrett Cox <garrettjcox@gmail.com> | 2023-09-16 23:20:13 -0500 |
|---|---|---|
| committer | Garrett Cox <garrettjcox@gmail.com> | 2023-10-17 08:54:52 -0500 |
| commit | f30e76e7b13de7493a6b4638e554f7bded65d513 (patch) | |
| tree | ede4a09c190a7c9703a65bb9e82eed2f67fa13ec /soh/src/code/graph.c | |
| parent | da92ac6a376be2b706808be95cb98da0fced8728 (diff) | |
MVP ValueViewer
Diffstat (limited to 'soh/src/code/graph.c')
| -rw-r--r-- | soh/src/code/graph.c | 23 |
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); |
