Fixes collision viewer (#2949)

This commit is contained in:
Kenix3 2023-06-05 16:19:42 -04:00 committed by GitHub
parent f3672a480f
commit 451ce8b107
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 9 additions and 2 deletions

View File

@ -655,7 +655,7 @@ template <typename T> size_t ResetVector(T& vec) {
return vec.capacity(); return vec.capacity();
} }
void DrawColViewer() { extern "C" void DrawColViewer() {
if (gPlayState == nullptr) { if (gPlayState == nullptr) {
return; return;
} }

View File

@ -2,8 +2,12 @@
#include <libultraship/libultraship.h> #include <libultraship/libultraship.h>
#ifdef __cplusplus
extern "C"
#endif
void DrawColViewer(); void DrawColViewer();
#ifdef __cplusplus
class ColViewerWindow : public LUS::GuiWindow { class ColViewerWindow : public LUS::GuiWindow {
public: public:
using GuiWindow::GuiWindow; using GuiWindow::GuiWindow;
@ -11,4 +15,5 @@ class ColViewerWindow : public LUS::GuiWindow {
void InitElement() override; void InitElement() override;
void DrawElement() override; void DrawElement() override;
void UpdateElement() override {}; void UpdateElement() override {};
}; };
#endif

View File

@ -4,6 +4,7 @@
#include <string.h> #include <string.h>
#include "soh/Enhancements/debugger/colViewer.h"
#include "soh/Enhancements/gameconsole.h" #include "soh/Enhancements/gameconsole.h"
#define GFXPOOL_HEAD_MAGIC 0x1234 #define GFXPOOL_HEAD_MAGIC 0x1234
@ -278,6 +279,7 @@ void Graph_Update(GraphicsContext* gfxCtx, GameState* gameState) {
GameState_ReqPadData(gameState); GameState_ReqPadData(gameState);
GameState_Update(gameState); GameState_Update(gameState);
DrawColViewer();
OPEN_DISPS(gfxCtx); OPEN_DISPS(gfxCtx);