mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-12-18 06:12:20 -05:00
Move collision viewer draw to hook and fix empty nametags (#4523)
This commit is contained in:
parent
894d3c00d3
commit
dabd0c25bd
@ -8,6 +8,7 @@
|
|||||||
#include <libultraship/bridge.h>
|
#include <libultraship/bridge.h>
|
||||||
#include <libultraship/libultraship.h>
|
#include <libultraship/libultraship.h>
|
||||||
#include "soh/OTRGlobals.h"
|
#include "soh/OTRGlobals.h"
|
||||||
|
#include "soh/Enhancements/game-interactor/GameInteractor.h"
|
||||||
|
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#include <z64.h>
|
#include <z64.h>
|
||||||
@ -276,11 +277,6 @@ void CreateSphereData() {
|
|||||||
sphereGfx.push_back(gsSPEndDisplayList());
|
sphereGfx.push_back(gsSPEndDisplayList());
|
||||||
}
|
}
|
||||||
|
|
||||||
void ColViewerWindow::InitElement() {
|
|
||||||
CreateCylinderData();
|
|
||||||
CreateSphereData();
|
|
||||||
}
|
|
||||||
|
|
||||||
// Initializes the display list for a ColRenderSetting
|
// Initializes the display list for a ColRenderSetting
|
||||||
void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
void InitGfx(std::vector<Gfx>& gfx, ColRenderSetting setting) {
|
||||||
uint32_t rm;
|
uint32_t rm;
|
||||||
@ -689,3 +685,10 @@ extern "C" void DrawColViewer() {
|
|||||||
|
|
||||||
CLOSE_DISPS(gPlayState->state.gfxCtx);
|
CLOSE_DISPS(gPlayState->state.gfxCtx);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ColViewerWindow::InitElement() {
|
||||||
|
CreateCylinderData();
|
||||||
|
CreateSphereData();
|
||||||
|
|
||||||
|
GameInteractor::Instance->RegisterGameHook<GameInteractor::OnPlayDrawEnd>(DrawColViewer);
|
||||||
|
}
|
||||||
|
@ -201,7 +201,7 @@ extern "C" void NameTag_RegisterForActorWithOptions(Actor* actor, const char* te
|
|||||||
processedText.erase(std::remove_if(processedText.begin(), processedText.end(), [](const char& c) {
|
processedText.erase(std::remove_if(processedText.begin(), processedText.end(), [](const char& c) {
|
||||||
// 172 is max supported texture for the in-game font system,
|
// 172 is max supported texture for the in-game font system,
|
||||||
// and filter anything less than a space but not the newline or nul characters
|
// and filter anything less than a space but not the newline or nul characters
|
||||||
return c > (s8)172 || (c < ' ' && c != '\n' && c != '\0');
|
return (unsigned char)c > 172 || (c < ' ' && c != '\n' && c != '\0');
|
||||||
}), processedText.end());
|
}), processedText.end());
|
||||||
|
|
||||||
int16_t numChar = processedText.length();
|
int16_t numChar = processedText.length();
|
||||||
|
@ -300,7 +300,6 @@ 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);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user