diff options
| author | Archez <Archez@users.noreply.github.com> | 2024-09-13 10:10:59 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-09-13 10:10:59 -0400 |
| commit | 25887952c9aa3f2bda76c8e05202c44a77c80e91 (patch) | |
| tree | 13eff44769164e10685bffa717036159329e5c3c /mm/2s2h/DeveloperTools/CollisionViewer.cpp | |
| parent | 137ca0de12e43c29ea634dd4b3896c5b8ec6c956 (diff) | |
[Enhancement] Actor Nametags (#746)
* add new GI hooks
* move collision viewer to draw hook
* actor viewer tweaks; prevent crash when actors are killed
* add ShipUtils
* add actor name tags
* add debug name tags to actor viewer
* fixes
* headers?
* cleanup actor viewer
* Add more options for actor name tags
* headers
* headers
* ditch fmt::join cause linux package managers use old spdlog/fmt
* just a little more cleanup
Diffstat (limited to 'mm/2s2h/DeveloperTools/CollisionViewer.cpp')
| -rw-r--r-- | mm/2s2h/DeveloperTools/CollisionViewer.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/mm/2s2h/DeveloperTools/CollisionViewer.cpp b/mm/2s2h/DeveloperTools/CollisionViewer.cpp index 884425fb0..758ade313 100644 --- a/mm/2s2h/DeveloperTools/CollisionViewer.cpp +++ b/mm/2s2h/DeveloperTools/CollisionViewer.cpp @@ -8,6 +8,7 @@ #include <random> #include <libultraship/bridge.h> #include <libultraship/libultraship.h> +#include "2s2h/Enhancements/GameInteractor/GameInteractor.h" extern "C" { #include <z64.h> @@ -300,11 +301,6 @@ void CreateSphereData() { sphereGfx.push_back(gsSPEndDisplayList()); } -void CollisionViewerWindow::InitElement() { - CreateCylinderData(); - CreateSphereData(); -} - // Initializes the display list for a ColRenderSetting void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) { uint32_t rm; @@ -736,3 +732,10 @@ extern "C" void DrawCollisionViewer() { CLOSE_DISPS(gPlayState->state.gfxCtx); } + +void CollisionViewerWindow::InitElement() { + CreateCylinderData(); + CreateSphereData(); + + GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayDrawWorldEnd>(DrawCollisionViewer); +} |
