diff --git a/soh/soh/Enhancements/debugger/colViewer.cpp b/soh/soh/Enhancements/debugger/colViewer.cpp index f9a67d2a8..a9d9c1b3a 100644 --- a/soh/soh/Enhancements/debugger/colViewer.cpp +++ b/soh/soh/Enhancements/debugger/colViewer.cpp @@ -655,7 +655,7 @@ template size_t ResetVector(T& vec) { return vec.capacity(); } -void DrawColViewer() { +extern "C" void DrawColViewer() { if (gPlayState == nullptr) { return; } diff --git a/soh/soh/Enhancements/debugger/colViewer.h b/soh/soh/Enhancements/debugger/colViewer.h index c54345f8a..7e3eb9e3b 100644 --- a/soh/soh/Enhancements/debugger/colViewer.h +++ b/soh/soh/Enhancements/debugger/colViewer.h @@ -2,8 +2,12 @@ #include +#ifdef __cplusplus +extern "C" +#endif void DrawColViewer(); +#ifdef __cplusplus class ColViewerWindow : public LUS::GuiWindow { public: using GuiWindow::GuiWindow; @@ -11,4 +15,5 @@ class ColViewerWindow : public LUS::GuiWindow { void InitElement() override; void DrawElement() override; void UpdateElement() override {}; -}; \ No newline at end of file +}; +#endif \ No newline at end of file diff --git a/soh/src/code/graph.c b/soh/src/code/graph.c index 00d55abdb..21d4526f3 100644 --- a/soh/src/code/graph.c +++ b/soh/src/code/graph.c @@ -4,6 +4,7 @@ #include +#include "soh/Enhancements/debugger/colViewer.h" #include "soh/Enhancements/gameconsole.h" #define GFXPOOL_HEAD_MAGIC 0x1234 @@ -278,6 +279,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) { GameState_ReqPadData(gameState); GameState_Update(gameState); + DrawColViewer(); OPEN_DISPS(gfxCtx);