Skip to content

Commit

Permalink
Remove debug elements and visual SoA (#3086)
Browse files Browse the repository at this point in the history
  • Loading branch information
aMannus authored Aug 20, 2023
1 parent f19f303 commit b040a89
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 3 deletions.
4 changes: 3 additions & 1 deletion soh/src/code/z_debug.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
#include "global.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"

typedef struct {
u8 x;
Expand Down Expand Up @@ -219,8 +220,9 @@ void func_80063D7C(GraphicsContext* gfxCtx) {
GfxPrint printer;
Gfx* tempRet;

if (!CVarGetInteger("gDebugEnabled", 0))
if (!CVarGetInteger("gDebugEnabled", 0) || GameInteractor_NoUIActive()) {
return;
}

OPEN_DISPS(gfxCtx);

Expand Down
5 changes: 5 additions & 0 deletions soh/src/code/z_debug_display.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#include "global.h"
#include "objects/gameplay_keep/gameplay_keep.h"
#include "soh/Enhancements/game-interactor/GameInteractor.h"

typedef struct {
/* 0x00 */ s16 drawType; // indicates which draw function to use when displaying the object
Expand Down Expand Up @@ -34,6 +35,10 @@ DebugDispObject* DebugDisplay_AddObject(f32 posX, f32 posY, f32 posZ, s16 rotX,
GraphicsContext* gfxCtx) {
DebugDispObject* prevHead = sDebugObjectListHead;

if (GameInteractor_NoUIActive()) {
return sDebugObjectListHead;
}

sDebugObjectListHead = Graph_Alloc(gfxCtx, sizeof(DebugDispObject));

sDebugObjectListHead->pos.x = posX;
Expand Down
4 changes: 2 additions & 2 deletions soh/src/overlays/actors/ovl_player_actor/z_player.c
Original file line number Diff line number Diff line change
Expand Up @@ -10490,7 +10490,7 @@ void func_80848EF8(Player* this, PlayState* play) {
if (CVarGetInteger("gCosmetics.Hud_StoneOfAgony.Changed", 0)) {
stoneOfAgonyColor = CVarGetColor24("gCosmetics.Hud_StoneOfAgony.Value", stoneOfAgonyColor);
}
if (CVarGetInteger("gVisualAgony", 0) != 0 && !this->stateFlags1) {
if (CVarGetInteger("gVisualAgony", 0) && !this->stateFlags1 && !GameInteractor_NoUIActive()) {
s16 Top_Margins = (CVarGetInteger("gHUDMargin_T", 0) * -1);
s16 Left_Margins = CVarGetInteger("gHUDMargin_L", 0);
s16 Right_Margins = CVarGetInteger("gHUDMargin_R", 0);
Expand Down Expand Up @@ -10574,7 +10574,7 @@ void func_80848EF8(Player* this, PlayState* play) {

if (this->unk_6A0 > 4000000.0f) {
this->unk_6A0 = 0.0f;
if (CVarGetInteger("gVisualAgony", 0) != 0 && !this->stateFlags1) {
if (CVarGetInteger("gVisualAgony", 0) && !this->stateFlags1 && !GameInteractor_NoUIActive()) {
// This audio is placed here and not in previous CVar check to prevent ears ra.. :)
Audio_PlaySoundGeneral(NA_SE_SY_MESSAGE_WOMAN, &D_801333D4, 4, &D_801333E0, &D_801333E0, &D_801333E0);
}
Expand Down

0 comments on commit b040a89

Please sign in to comment.