Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom Audio Support #778

Open
wants to merge 92 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
92 commits
Select commit Hold shift + click to select a range
dd59a56
Implement custom sequences and the audio editor.
louist103 Jun 28, 2024
e90cab7
Fix implicit function declaration `AudioEditor_GetReplacementSeq`
louist103 Jun 28, 2024
79cd020
Fix mac again.
louist103 Jun 28, 2024
cac05a1
String and header cleanup
louist103 Jun 28, 2024
a6fae26
Oops
louist103 Jun 28, 2024
eb9f3e6
WIP ZIP Sound fonts
louist103 Jun 30, 2024
65a1405
The game opens and audio seems to play correctly. Needs extensive tes…
louist103 Jun 30, 2024
5b25e62
Name sequences
louist103 Jul 1, 2024
bc92ebf
Cleanup the SF importer a little.
louist103 Jul 1, 2024
aae5f59
XML Sequences good
louist103 Jul 3, 2024
eadf08d
Fix mac
louist103 Jul 3, 2024
3e9e50a
Destructor
louist103 Jul 4, 2024
6a0bcbe
Bump submodule
louist103 Jul 4, 2024
e0d55e7
Thread safe queue
louist103 Jul 18, 2024
92d4eee
Add WAV decoder
louist103 Jul 18, 2024
0eb669f
sequenceMap->mSequenceMap and a string fix
louist103 Jul 18, 2024
c46d738
Streamed sequence importer
louist103 Jul 18, 2024
ae494b0
Add s16 sample processing.
louist103 Aug 17, 2024
36033f3
Fix drwave define
louist103 Aug 17, 2024
953ba73
Fix STB
louist103 Aug 17, 2024
93296bc
Reorder the loading to enable custom sound fonts
louist103 Aug 24, 2024
d6f0e20
New streamed solution
louist103 Aug 24, 2024
ca56117
Bump exporter
louist103 Aug 24, 2024
1465f7b
Generate 1 minute long looping sequence.
louist103 Aug 25, 2024
0cf00df
Very long sample support (113 minutes or so)
louist103 Aug 27, 2024
63b305e
MP3 Decoding
louist103 Aug 27, 2024
915169b
Don't byteswap the crc from XML.
louist103 Aug 27, 2024
6bcf490
WIP OGG
louist103 Sep 1, 2024
bb16026
add windows cmake stuff (broken) and fixes to OGG
louist103 Sep 5, 2024
cc7f341
Just throw more cores at the problem
louist103 Sep 5, 2024
ce93ca0
Dynamically allocate fontMap
louist103 Sep 6, 2024
bb2c084
Re-add OOB read fix from old branch
louist103 Sep 6, 2024
2a73ed4
FLAC decoder, threads for the other compressed formats
louist103 Sep 6, 2024
a5c7dfc
Remove thread from class
louist103 Sep 6, 2024
b43edd4
timings
louist103 Sep 23, 2024
d0fc330
cleanup conflicts
louist103 Sep 24, 2024
3f404df
update submodules
louist103 Sep 24, 2024
d0b2c97
update submodules
louist103 Sep 24, 2024
5c0225b
update submodules
louist103 Sep 25, 2024
d8ea4ed
loop or not to loop
louist103 Oct 3, 2024
a58ed3d
named audio XML
louist103 Oct 3, 2024
734726e
Update submodules
louist103 Oct 5, 2024
49d9fe8
merge
louist103 Oct 5, 2024
bfa9706
format
louist103 Oct 5, 2024
9f3d846
format again cause git didnt see it for some reason
louist103 Oct 5, 2024
2019e98
move drlib to submodule
louist103 Oct 5, 2024
e186dce
Conflict
louist103 Oct 5, 2024
6ccc5fc
Merge branch 'develop' into customAudio2
louist103 Oct 5, 2024
628b823
Update apt-deps.txt
louist103 Oct 5, 2024
15ce6e9
Fix for new cmake
louist103 Oct 5, 2024
d4411b5
fix game interactor
louist103 Oct 5, 2024
fb2302f
Update macports-deps.txt
louist103 Oct 5, 2024
a4cdbc1
PR fixes and fix OTRExporter for mac
louist103 Oct 5, 2024
a41d090
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Oct 5, 2024
dc96e96
format
louist103 Oct 5, 2024
158648f
format
louist103 Oct 6, 2024
955a329
ifdef intrin header
louist103 Oct 6, 2024
fd97c91
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Oct 6, 2024
07c9a08
Docs
louist103 Oct 6, 2024
27c2522
use macro for preview
louist103 Oct 8, 2024
da1cf35
Small fixes
louist103 Oct 8, 2024
96cd60f
format
louist103 Oct 8, 2024
c24f0d2
fix 2nd day clock town
louist103 Oct 9, 2024
e3a7e82
Update exporter
louist103 Oct 10, 2024
dc779a5
Fix duplicate global in stubs.c
louist103 Oct 11, 2024
3493553
restore editor to use cvars again sadge
louist103 Oct 11, 2024
414b832
Format
louist103 Oct 11, 2024
0fb8f67
Merge branch 'develop' into customAudio2
louist103 Oct 11, 2024
a14ba79
warn if more than 255 sequences
louist103 Oct 12, 2024
d6615c5
use main seq player to avoid an overflow
louist103 Oct 12, 2024
1917d67
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Oct 12, 2024
852e1e1
fix the wrong seq playing in the editor again
louist103 Oct 14, 2024
379bc5d
16 bit seqIds
louist103 Oct 18, 2024
ae29eb7
fix shop crash
louist103 Oct 19, 2024
795586e
format
louist103 Oct 19, 2024
dd17321
cleanups
louist103 Oct 19, 2024
69cc9cc
Delete audio collection
louist103 Oct 20, 2024
3b92153
Add entry to modern menu
louist103 Oct 20, 2024
5a184a5
Cleanup the audio collection
louist103 Oct 20, 2024
9f1e6ab
fix clock town randomization
louist103 Oct 20, 2024
98af18f
format
louist103 Oct 20, 2024
e3f9cc5
format again
louist103 Oct 22, 2024
0433a89
some fixes for custom audio (#1)
mckinlee Oct 23, 2024
a53439e
how I would sort the sequences (#2)
louist103 Oct 24, 2024
edfa595
Adjustments to ocarina song types
louist103 Oct 27, 2024
754bc74
stereo
louist103 Oct 28, 2024
0645457
format
louist103 Oct 31, 2024
e4d0941
Loop point support
louist103 Nov 3, 2024
7f0e6ae
Merge branch 'customAudio2' of https://github.com/louist103/2ship2har…
louist103 Nov 3, 2024
3afe66a
Merge branch 'develop' into customAudio2
louist103 Nov 5, 2024
c4021da
Merge remote-tracking branch 'upstream/develop' into customAudio2
louist103 Nov 7, 2024
5e44d8c
Part of a PR review
louist103 Nov 7, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/apt-deps.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build
libusb-dev libusb-1.0-0-dev libsdl2-dev libsdl2-net-dev libpng-dev libglew-dev nlohmann-json3-dev libtinyxml2-dev libspdlog-dev ninja-build libogg-dev libvorbis-dev
2 changes: 1 addition & 1 deletion .github/workflows/macports-deps.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal tinyxml2 +universal
libsdl2 +universal libsdl2_net +universal libpng +universal glew +universal libzip +universal nlohmann-json +universal tinyxml2 +universal libogg +universal libvorbis +universal
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,6 @@
[submodule "ZAPDTR"]
path = ZAPDTR
url = https://github.com/louist103/ZAPDTR.git
[submodule "mm/2s2h/Enhancements/Audio/dr_libs"]
Copy link
Contributor

@Archez Archez Nov 6, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should just fetch the drlibs via cmake with Fetch_Content, this way it's controlled like our other dependencies.

Here is LUS doing it https://github.com/Kenix3/libultraship/blob/main/cmake/dependencies/common.cmake

path = mm/2s2h/Enhancements/Audio/dr_libs
url = https://github.com/mackron/dr_libs.git
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ elseif ("${CMAKE_VS_PLATFORM_NAME}" STREQUAL "x64")
endif()

vcpkg_bootstrap()
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog)
vcpkg_install_packages(zlib bzip2 libzip libpng sdl2 sdl2-net glew glfw3 nlohmann-json tinyxml2 spdlog libogg libvorbis)
endif()

################################################################################
Expand Down
2 changes: 1 addition & 1 deletion OTRExporter
2 changes: 1 addition & 1 deletion ZAPDTR
Submodule ZAPDTR updated 2 files
+40 −41 ZAPD/ZAudio.cpp
+9 −12 ZAPD/ZAudio.h
26 changes: 26 additions & 0 deletions docs/CUSTOM_SEQUENCED_MUSIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
### Custom Music

We support importing custom [Seq64](https://github.com/sauraen/seq64) files to replace the in game music and fanfares (Sound effect and instrument replacement is currently not supported).

First you will need to prepare a folder with the desired sequences. Every sequence requires two files with the same name and different extensions - a `.seq` Seq64 file and a `.meta` plaintext file.

The `.meta` file requires two lines - the first line is the name that will be displayed in the SFX editor, the second line is the instrument set number in `base16` format, and the third line optionally contains 'bgm' or 'fanfare'. For example, if there is a sequence file `Foo.seq` then you need a meta file `Foo.meta` that could contain:
```
Awesome Name
C
```

Once you have prepared your sequences folder:
1. Download and open [Future] (https://github.com/louist103/future/).
1. Choose the "Create OTR/O2R" option.
1. Choose the "Custom Audio" option.
1. Choose the "Sequenced" option
1. Using the file selection screen, choose the sequences folder you prepared in the previous instructions.
1. Click the slider to pack an archive instead.
1. Select either OTR or O2R.
1. Click the 'Set Save Path' button to set the save location of the archive, if in create archive mode.
(*NOTE:* 2Ship can handle 1024 custom sequence in total. This includes the original music. Keep that in mind!)
1. Click the "Pack Archive" button..
1. An archive will be created in the location selected with the 'Set Save Path' step. If that location wasn't the 'mods' folder, move the archive there. The mods folder must be in the same location as the game executable and mm.o2r.

Assuming you have done everything correctly, boot up 2Ship and select the SFX Editor from the enhancements dropdown menu. You should now be able to swap out any of the in game sequences/fanfares for the sequences added in your newly generated OTR file. If you have any trouble with this process, please reach out in the support section of the Discord.
30 changes: 30 additions & 0 deletions docs/CUSTOM_STREAMED_MUSIC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

### Custom Audio
We support importing streamed (MP3, WAV, OGG, etc.) files to replace in game music, fanfares, sound effects, and instruments.

First you will need to prepare a folder with the desired songs. These can be `.wav`, `.ogg`, `.mp3`, and `.flac`. Place these files in an empty folder and change their name to what you want to appear in game. No `.meta` files are required for streamed songs.


Once you have prepared your sequences folder:
1. Download and open [Future] (https://github.com/louist103/future/).
1. Choose the "Create OTR/O2R" option.
1. Choose the "Custom Audio" option.
1. Choose the "Streamed" option
1. Using the file selection screen, choose the sequences folder you prepared in the previous instructions.
1. Click the slider to pack an archive instead.
1. Select either OTR or O2R.
1. Click the 'Set Save Path' button to set the save location of the archive, if in create archive mode.
(*NOTE:* 2Ship can handle 1024 custom sequence in total. This includes the original music. Keep that in mind!)
1. Click the "Pack Archive" button..
1. An archive will be created in the location selected with the 'Set Save Path' step. If that location wasn't the 'mods' folder, move the archive there. The mods folder must be in the same location as the game executable and mm.o2r.

Replacing sound effects and instruments it a little more complicated.
Both of these store extra data in the first sound font, currently named `Soundfont_0`.
1. First open Soundfont_0. This file is an XML document.
2. Next find the sample or sound effect you want to replace.
3. Replace the `SampleRef` field with the path of the new audio file.
4. Set the `Tuning` value using this calculation: $\dfrac{sample rate}{32000} * channels$. This is handled by future for songs.
5. Save the Soundfont XML and replace the one in the original archive.
6. Save the sample file in the archive, giving it the same path as the `SampleRef`

Assuming you have done everything correctly, boot up 2Ship and select the Audio Editor from the enhancements dropdown menu. You should now be able to swap out any of the in game sequences/fanfares for the sequences added in your newly generated OTR/O2R file. If you have any trouble with this process, please reach out in the support section of the Discord.
8 changes: 8 additions & 0 deletions mm/2s2h/BenGui/BenGui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <Fast3D/gfx_pc.h>
#include "UIWidgets.hpp"
#include "HudEditor.h"
#include "2s2h/Enhancements/Audio/AudioEditor.h"
#include "Notification.h"

#ifdef __APPLE__
Expand Down Expand Up @@ -35,6 +36,7 @@ std::shared_ptr<HudEditorWindow> mHudEditorWindow;
std::shared_ptr<ActorViewerWindow> mActorViewerWindow;
std::shared_ptr<CollisionViewerWindow> mCollisionViewerWindow;
std::shared_ptr<EventLogWindow> mEventLogWindow;
std::shared_ptr<AudioEditor> mAudioEditorWindow;
std::shared_ptr<BenMenu> mBenMenu;
std::shared_ptr<BenInputEditorWindow> mBenInputEditorWindow;
std::shared_ptr<Notification::Window> mNotificationWindow;
Expand Down Expand Up @@ -94,6 +96,10 @@ void SetupGuiElements() {

mEventLogWindow = std::make_shared<EventLogWindow>("gWindows.EventLog", "Event Log", ImVec2(520, 600));
gui->AddGuiWindow(mEventLogWindow);

mAudioEditorWindow = std::make_shared<AudioEditor>("gWindows.AudioEditor", "Audio Editor");
gui->AddGuiWindow(mAudioEditorWindow);

gui->SetPadBtnTogglesMenu();

mNotificationWindow = std::make_shared<Notification::Window>("gWindows.Notifications", "Notifications Window");
Expand All @@ -115,5 +121,7 @@ void Destroy() {
mSaveEditorWindow = nullptr;
mHudEditorWindow = nullptr;
mActorViewerWindow = nullptr;

mAudioEditorWindow = nullptr;
}
} // namespace BenGui
10 changes: 10 additions & 0 deletions mm/2s2h/BenGui/BenMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
#include "2s2h/Enhancements/Enhancements.h"
#include "2s2h/Enhancements/GfxPatcher/AuthenticGfxPatches.h"
#include "2s2h/DeveloperTools/DeveloperTools.h"
#include "2s2h/Enhancements/Cheats/Cheats.h"
#include "2s2h/Enhancements/Player/Player.h"
#include "2s2h/Enhancements/Audio/AudioEditor.h"
#include "HudEditor.h"

extern "C" {
Expand Down Expand Up @@ -838,6 +841,8 @@ extern std::shared_ptr<ActorViewerWindow> mActorViewerWindow;
extern std::shared_ptr<CollisionViewerWindow> mCollisionViewerWindow;
extern std::shared_ptr<EventLogWindow> mEventLogWindow;

extern std::shared_ptr<AudioEditor> mAudioEditorWindow;

const char* logLevels[] = {
"trace", "debug", "info", "warn", "error", "critical", "off",
};
Expand Down Expand Up @@ -963,6 +968,11 @@ void DrawDeveloperToolsMenu() {
if (mEventLogWindow) {
UIWidgets::WindowButton("Event Log", "gWindows.EventLog", mEventLogWindow);
}

if (mAudioEditorWindow) {
UIWidgets::WindowButton("Audio Editor", "gWindows.AudioEditor", mAudioEditorWindow);
}

ImGui::EndMenu();
}
}
Expand Down
7 changes: 7 additions & 0 deletions mm/2s2h/BenGui/SearchableMenuItems.h
Original file line number Diff line number Diff line change
Expand Up @@ -1654,6 +1654,13 @@ void AddDevTools() {
"Enables the event log window",
WIDGET_WINDOW_BUTTON,
{ .size = UIWidgets::Sizes::Inline, .windowName = "Event Log" } } } } });
devToolsSidebar.push_back({ "Audio Editor",
1,
{ { { "Popout Audio Editor",
"gWindows.AudioEditor",
"Enables the audio editor window",
WIDGET_WINDOW_BUTTON,
{ .size = UIWidgets::Sizes::Inline, .windowName = "Audio Editor" } } } } });
}

void SearchMenuGetItem(widgetInfo& widget) {
Expand Down
30 changes: 29 additions & 1 deletion mm/2s2h/BenPort.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include "z64animation.h"
#include "z64bgcheck.h"
#include <libultraship/libultra/gbi.h>
#include "stb_image.h"
#include <Fonts.h>
#ifdef _WIN32
#include <Windows.h>
Expand Down Expand Up @@ -55,6 +56,7 @@ CrowdControl* CrowdControl::Instance;
#include "2s2h/DeveloperTools/DebugConsole.h"
#include "2s2h/DeveloperTools/DeveloperTools.h"
#include "2s2h/SaveManager/SaveManager.h"
#include "2s2h/Enhancements/Audio/AudioCollection.h"
#include "2s2h/ShipUtils.h"

// Resource Types/Factories
Expand Down Expand Up @@ -102,6 +104,7 @@ CrowdControl* CrowdControl::Instance;

OTRGlobals* OTRGlobals::Instance;
GameInteractor* GameInteractor::Instance;
AudioCollection* AudioCollection::Instance;

extern "C" char** cameraStrings;
bool prevAltAssets = false;
Expand Down Expand Up @@ -209,14 +212,24 @@ OTRGlobals::OTRGlobals() {
"Cutscene", static_cast<uint32_t>(SOH::ResourceType::SOH_Cutscene), 0);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryTextMMV0>(), RESOURCE_FORMAT_BINARY,
"TextMM", static_cast<uint32_t>(SOH::ResourceType::TSH_TextMM), 0);

loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryAudioSampleV2>(), RESOURCE_FORMAT_BINARY,
"AudioSample", static_cast<uint32_t>(SOH::ResourceType::SOH_AudioSample), 2);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryXMLAudioSampleV0>(), RESOURCE_FORMAT_XML,
"Sample", static_cast<uint32_t>(SOH::ResourceType::SOH_AudioSample), 0);

loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryAudioSoundFontV2>(),
RESOURCE_FORMAT_BINARY, "AudioSoundFont",
static_cast<uint32_t>(SOH::ResourceType::SOH_AudioSoundFont), 2);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryXMLSoundFontV0>(), RESOURCE_FORMAT_XML,
"SoundFont", static_cast<uint32_t>(SOH::ResourceType::SOH_AudioSoundFont), 0);

loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryAudioSequenceV2>(),
RESOURCE_FORMAT_BINARY, "AudioSequence",
static_cast<uint32_t>(SOH::ResourceType::SOH_AudioSequence), 2);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryXMLAudioSequenceV0>(), RESOURCE_FORMAT_XML,
"Sequence", static_cast<uint32_t>(SOH::ResourceType::SOH_AudioSequence), 0);

loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryBackgroundV0>(), RESOURCE_FORMAT_BINARY,
"Background", static_cast<uint32_t>(SOH::ResourceType::SOH_Background), 0);
loader->RegisterResourceFactory(std::make_shared<SOH::ResourceFactoryBinaryTextureAnimationV0>(),
Expand Down Expand Up @@ -513,6 +526,7 @@ extern "C" void InitOTR() {

OTRGlobals::Instance = new OTRGlobals();
GameInteractor::Instance = new GameInteractor();
AudioCollection::Instance = new AudioCollection();
LoadGuiTextures();
BenGui::SetupGuiElements();
InitEnhancements();
Expand Down Expand Up @@ -565,6 +579,7 @@ extern "C" void DeinitOTR() {
BenGui::Destroy();

OTRGlobals::Instance->context = nullptr;
delete AudioCollection::Instance;
}

#ifdef _WIN32
Expand Down Expand Up @@ -1186,6 +1201,10 @@ extern "C" SequenceData ResourceMgr_LoadSeqByName(const char* path) {
SequenceData* sequence = (SequenceData*)ResourceGetDataByName(path);
return *sequence;
}
extern "C" SequenceData* ResourceMgr_LoadSeqPtrByName(const char* path) {
SequenceData* sequence = (SequenceData*)ResourceGetDataByName(path);
return sequence;
}
extern "C" KeyFrameSkeleton* ResourceMgr_LoadKeyFrameSkelByName(const char* path) {
return (KeyFrameSkeleton*)ResourceGetDataByName(path);
}
Expand Down Expand Up @@ -1256,9 +1275,14 @@ extern "C" SoundFontSample* ResourceMgr_LoadAudioSample(const char* path) {
}
#endif

extern "C" SoundFont* ResourceMgr_LoadAudioSoundFont(const char* path) {
extern "C" SoundFont* ResourceMgr_LoadAudioSoundFontByName(const char* path) {
return (SoundFont*)ResourceGetDataByName(path);
}

extern "C" SoundFont* ResourceMgr_LoadAudioSoundFontByCRC(uint64_t crc) {
return (SoundFont*)ResourceGetDataByCrc(crc);
}

extern "C" int ResourceMgr_OTRSigCheck(char* imgData) {
uintptr_t i = (uintptr_t)(imgData);

Expand Down Expand Up @@ -1657,3 +1681,7 @@ extern "C" int Controller_ShouldRumble(size_t slot) {

return 0;
}

extern "C" void Messagebox_ShowErrorBox(char* title, char* body) {
Extractor::ShowErrorBox(title, body);
}
4 changes: 3 additions & 1 deletion mm/2s2h/BenPort.h
Original file line number Diff line number Diff line change
Expand Up @@ -103,8 +103,8 @@ Vtx* ResourceMgr_LoadVtxByCRC(uint64_t crc);
char* ResourceMgr_LoadVtxArrayByName(const char* path);
size_t ResourceMgr_GetVtxArraySizeByName(const char* path);
Vtx* ResourceMgr_LoadVtxByName(char* path);
SequenceData* ResourceMgr_LoadSeqPtrByName(const char* path);
Mtx* ResourceMgr_LoadMtxByName(char* path);

KeyFrameSkeleton* ResourceMgr_LoadKeyFrameSkelByName(const char* path);
KeyFrameAnimation* ResourceMgr_LoadKeyFrameAnimByName(const char* path);

Expand Down Expand Up @@ -146,6 +146,8 @@ void Gfx_UnregisterBlendedTexture(const char* name);
void Gfx_TextureCacheDelete(const uint8_t* texAddr);
void CheckTracker_OnMessageClose();

void Messagebox_ShowErrorBox(char* title, char* body);

int32_t GetGIID(uint32_t itemID);
#endif

Expand Down
2 changes: 1 addition & 1 deletion mm/2s2h/DeveloperTools/DebugConsole.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static bool ActorSpawnHandler(std::shared_ptr<Ship::Console> Console, const std:
static bool LoadSceneHandler(std::shared_ptr<Ship::Console> Console, const std::vector<std::string>&,
std::string* output) {
gSaveContext.respawnFlag = 0;
gSaveContext.seqId = 0xFF;
gSaveContext.seqId = NA_BGM_DISABLED;
gSaveContext.gameMode = 0;

return 0;
Expand Down
2 changes: 1 addition & 1 deletion mm/2s2h/DeveloperTools/SaveEditor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ void UpdateGameTime(u16 gameTime) {
if (gPlayState->sequenceCtx.ambienceId != AMBIENCE_ID_13) {
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_AMBIENCE, 0);
SEQCMD_STOP_SEQUENCE(SEQ_PLAYER_BGM_MAIN, 240);
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.seqId = NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
Environment_PlaySceneSequence(gPlayState);
}
Expand Down
2 changes: 1 addition & 1 deletion mm/2s2h/DeveloperTools/WarpPoint.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ void RegisterWarpPoint() {
if (!CVarGetInteger("gEnhancements.Cutscenes.SkipToFileSelect", 0) &&
CVarGetInteger(WARP_POINT_CVAR "BootToWarpPoint", 0) && CVarGetInteger(WARP_POINT_CVAR "Saved", 0)) {
// Normally called on console logo screen
gSaveContext.seqId = (u8)NA_BGM_DISABLED;
gSaveContext.seqId = NA_BGM_DISABLED;
gSaveContext.ambienceId = AMBIENCE_ID_DISABLED;
gSaveContext.gameMode = GAMEMODE_TITLE_SCREEN;
Warp();
Expand Down
Loading
Loading