Skip to content

Commit

Permalink
support lus gameoverlay changes (and bump LUS) (HarbourMasters#4067)
Browse files Browse the repository at this point in the history
  • Loading branch information
briaguya-ai authored Apr 23, 2024
1 parent 49f891f commit 3070fb4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
2 changes: 1 addition & 1 deletion libultraship
Submodule libultraship updated 28 files
+5 −1 include/libultraship/libultra/controller.h
+1 −1 src/Context.cpp
+1 −1 src/Context.h
+3 −2 src/controller/controldeck/ControlDeck.cpp
+1 −1 src/controller/controldeck/ControlDeck.h
+5 −4 src/controller/controldevice/controller/Controller.cpp
+5 −5 src/controller/controldevice/controller/Controller.h
+5 −5 src/controller/controldevice/controller/ControllerButton.cpp
+5 −5 src/controller/controldevice/controller/ControllerButton.h
+3 −2 src/controller/controldevice/controller/mapping/ControllerButtonMapping.cpp
+8 −4 src/controller/controldevice/controller/mapping/ControllerButtonMapping.h
+9 −8 src/controller/controldevice/controller/mapping/factories/ButtonMappingFactory.cpp
+6 −6 src/controller/controldevice/controller/mapping/factories/ButtonMappingFactory.h
+3 −2 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToButtonMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/keyboard/KeyboardKeyToButtonMapping.h
+2 −2 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToButtonMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/sdl/SDLAxisDirectionToButtonMapping.h
+3 −3 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.cpp
+2 −2 src/controller/controldevice/controller/mapping/sdl/SDLButtonToButtonMapping.h
+4 −3 src/controller/controldevice/controller/mapping/wiiu/WiiUButtonToButtonMapping.cpp
+3 −3 src/controller/controldevice/controller/mapping/wiiu/WiiUButtonToButtonMapping.h
+4 −4 src/graphic/Fast3D/gfx_pc.cpp
+17 −17 src/window/gui/GameOverlay.cpp
+6 −1 src/window/gui/GameOverlay.h
+0 −57 src/window/gui/Gui.cpp
+0 −4 src/window/gui/Gui.h
+4 −4 src/window/gui/InputEditorWindow.cpp
+7 −7 src/window/gui/InputEditorWindow.h
6 changes: 6 additions & 0 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ OTRGlobals::OTRGlobals() {

auto sohInputEditorWindow = std::make_shared<SohInputEditorWindow>("gControllerConfigurationEnabled", "Input Editor");
context->InitWindow(sohInputEditorWindow);

auto overlay = context->GetInstance()->GetWindow()->GetGui()->GetGameOverlay();
overlay->LoadFont("Press Start 2P", "fonts/PressStart2P-Regular.ttf", 12.0f);
overlay->LoadFont("Fipps", "fonts/Fipps-Regular.otf", 32.0f);
overlay->SetCurrentFont(CVarGetString(CVAR_GAME_OVERLAY_FONT, "Press Start 2P"));

context->InitAudio();

SPDLOG_INFO("Starting Ship of Harkinian version {}", (char*)gBuildVersion);
Expand Down
4 changes: 2 additions & 2 deletions soh/src/code/audio_load.c
Original file line number Diff line number Diff line change
Expand Up @@ -632,7 +632,7 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
// Keep track of the previous sequence/scene so we don't repeat notifications
static uint16_t previousSeqId = UINT16_MAX;
static int16_t previousSceneNum = INT16_MAX;
if (CVarGetInteger("gSeqNameOverlay", 0) &&
if (CVarGetInteger(CVAR_AUDIO("SeqNameOverlay"), 0) &&
playerIdx == SEQ_PLAYER_BGM_MAIN &&
(seqId != previousSeqId || (gPlayState != NULL && gPlayState->sceneNum != previousSceneNum))) {

Expand All @@ -642,7 +642,7 @@ s32 AudioLoad_SyncInitSeqPlayerInternal(s32 playerIdx, s32 seqId, s32 arg2) {
}
const char* sequenceName = AudioCollection_GetSequenceName(seqId);
if (sequenceName != NULL) {
Overlay_DisplayText_Seconds(CVarGetInteger("gSeqNameOverlayDuration", 5), sequenceName);
Overlay_DisplayText_Seconds(CVarGetInteger(CVAR_AUDIO("SeqNameOverlayDuration"), 5), sequenceName);
}
}
}
Expand Down

0 comments on commit 3070fb4

Please sign in to comment.