mirror of
https://github.com/hedge-dev/UnleashedRecomp.git
synced 2026-04-27 12:51:42 +00:00
Update.
This commit is contained in:
parent
39df057d17
commit
fc31b32517
5 changed files with 30 additions and 12 deletions
|
|
@ -402,7 +402,9 @@ BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/ga
|
|||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/game_icon_night.bmp" DEST_FILE "${RESOURCES_OUTPUT_PATH}/images/game_icon_night.bmp" ARRAY_NAME "g_game_icon_night")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_worldmap_cursor.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_worldmap_cursor.wav" ARRAY_NAME "g_sys_worldmap_cursor")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_worldmap_finaldecide.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_worldmap_finaldecide.wav" ARRAY_NAME "g_sys_worldmap_finaldecide")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausecansel.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausecansel.wav" ARRAY_NAME "g_sys_actstg_pausecansel")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausecursor.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausecursor.wav" ARRAY_NAME "g_sys_actstg_pausecursor")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausedecide.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausedecide.wav" ARRAY_NAME "g_sys_actstg_pausedecide")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausewinclose.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausewinclose.wav" ARRAY_NAME "g_sys_actstg_pausewinclose")
|
||||
BIN2C(TARGET_OBJ UnleashedRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/sys_actstg_pausewinopen.wav" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/sys_actstg_pausewinopen.wav" ARRAY_NAME "g_sys_actstg_pausewinopen")
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
|
||||
#define AUDIO_DRIVER_KEY (uint32_t)('DAUD')
|
||||
|
||||
// Use to dump raw audio captures to the game folder.
|
||||
//#define AUDIO_DUMP_SAMPLES_PATH "audio.pcm"
|
||||
|
||||
#ifdef AUDIO_DUMP_SAMPLES_PATH
|
||||
|
|
|
|||
|
|
@ -5,16 +5,20 @@
|
|||
|
||||
#include <res/sounds/sys_worldmap_cursor.wav.h>
|
||||
#include <res/sounds/sys_worldmap_finaldecide.wav.h>
|
||||
#include <res/sounds/sys_actstg_pausecansel.wav.h>
|
||||
#include <res/sounds/sys_actstg_pausecursor.wav.h>
|
||||
#include <res/sounds/sys_actstg_pausedecide.wav.h>
|
||||
#include <res/sounds/sys_actstg_pausewinclose.wav.h>
|
||||
#include <res/sounds/sys_actstg_pausewinopen.wav.h>
|
||||
|
||||
enum class EmbeddedSound
|
||||
{
|
||||
SysWorldMapCursor,
|
||||
SysWorldMapFinalDecide,
|
||||
SysActStgPauseCansel,
|
||||
SysActStgPauseCursor,
|
||||
SysActStgPauseDecide,
|
||||
SysActStgPauseWinClose,
|
||||
SysActStgPauseWinOpen,
|
||||
Count,
|
||||
};
|
||||
|
|
@ -34,8 +38,10 @@ static const std::unordered_map<std::string, EmbeddedSound> g_embeddedSoundMap =
|
|||
{
|
||||
{ "sys_worldmap_cursor", EmbeddedSound::SysWorldMapCursor },
|
||||
{ "sys_worldmap_finaldecide", EmbeddedSound::SysWorldMapFinalDecide },
|
||||
{ "sys_actstg_pausecansel", EmbeddedSound::SysActStgPauseCansel },
|
||||
{ "sys_actstg_pausecursor", EmbeddedSound::SysActStgPauseCursor },
|
||||
{ "sys_actstg_pausedecide", EmbeddedSound::SysActStgPauseDecide },
|
||||
{ "sys_actstg_pausewinclose", EmbeddedSound::SysActStgPauseWinClose },
|
||||
{ "sys_actstg_pausewinopen", EmbeddedSound::SysActStgPauseWinOpen },
|
||||
};
|
||||
|
||||
|
|
@ -60,6 +66,10 @@ static void PlayEmbeddedSound(EmbeddedSound s)
|
|||
soundData = g_sys_worldmap_finaldecide;
|
||||
soundDataSize = sizeof(g_sys_worldmap_finaldecide);
|
||||
break;
|
||||
case EmbeddedSound::SysActStgPauseCansel:
|
||||
soundData = g_sys_actstg_pausecansel;
|
||||
soundDataSize = sizeof(g_sys_actstg_pausecansel);
|
||||
break;
|
||||
case EmbeddedSound::SysActStgPauseCursor:
|
||||
soundData = g_sys_actstg_pausecursor;
|
||||
soundDataSize = sizeof(g_sys_actstg_pausecursor);
|
||||
|
|
@ -68,6 +78,10 @@ static void PlayEmbeddedSound(EmbeddedSound s)
|
|||
soundData = g_sys_actstg_pausedecide;
|
||||
soundDataSize = sizeof(g_sys_actstg_pausedecide);
|
||||
break;
|
||||
case EmbeddedSound::SysActStgPauseWinClose:
|
||||
soundData = g_sys_actstg_pausewinclose;
|
||||
soundDataSize = sizeof(g_sys_actstg_pausewinclose);
|
||||
break;
|
||||
case EmbeddedSound::SysActStgPauseWinOpen:
|
||||
soundData = g_sys_actstg_pausewinopen;
|
||||
soundDataSize = sizeof(g_sys_actstg_pausewinopen);
|
||||
|
|
|
|||
|
|
@ -134,7 +134,7 @@ static WizardPage g_currentPage = g_firstPage;
|
|||
static std::string g_currentMessagePrompt = "";
|
||||
static bool g_currentMessagePromptConfirmation = false;
|
||||
static int g_currentMessageResult = -1;
|
||||
static bool g_currentMessageUpdateRemaining = false;
|
||||
static bool g_filesPickerSkipUpdate = false;
|
||||
static ImVec2 g_joypadAxis = {};
|
||||
static int g_currentCursorIndex = -1;
|
||||
static int g_currentCursorDefault = 0;
|
||||
|
|
@ -217,7 +217,7 @@ public:
|
|||
case SDL_MOUSEBUTTONDOWN:
|
||||
case SDL_MOUSEMOTION:
|
||||
{
|
||||
for (size_t i = 0; i < g_currentCursorRects.size(); i++)
|
||||
for (size_t i = 0; i < g_currentCursorRects.size() && !g_filesPickerSkipUpdate; i++)
|
||||
{
|
||||
auto ¤tRect = g_currentCursorRects[i];
|
||||
if (ImGui::IsMouseHoveringRect(currentRect.first, currentRect.second, false))
|
||||
|
|
@ -888,7 +888,7 @@ static bool ShowFilesPicker(std::list<std::filesystem::path> &filePaths)
|
|||
|
||||
const nfdpathset_t *pathSet;
|
||||
nfdresult_t result = NFD_OpenDialogMultipleU8(&pathSet, nullptr, 0, nullptr);
|
||||
g_currentMessageUpdateRemaining = true;
|
||||
g_filesPickerSkipUpdate = true;
|
||||
|
||||
if (result == NFD_OKAY)
|
||||
{
|
||||
|
|
@ -908,7 +908,7 @@ static bool ShowFoldersPicker(std::list<std::filesystem::path> &folderPaths)
|
|||
|
||||
const nfdpathset_t *pathSet;
|
||||
nfdresult_t result = NFD_PickFolderMultipleU8(&pathSet, nullptr);
|
||||
g_currentMessageUpdateRemaining = true;
|
||||
g_filesPickerSkipUpdate = true;
|
||||
|
||||
if (result == NFD_OKAY)
|
||||
{
|
||||
|
|
@ -1012,6 +1012,8 @@ static void DrawLanguagePicker()
|
|||
|
||||
static void DrawSourcePickers()
|
||||
{
|
||||
g_filesPickerSkipUpdate = false;
|
||||
|
||||
bool buttonPressed = false;
|
||||
std::list<std::filesystem::path> paths;
|
||||
if (g_currentPage == WizardPage::SelectGameAndUpdate || g_currentPage == WizardPage::SelectDLC)
|
||||
|
|
@ -1301,17 +1303,16 @@ static void DrawBorders()
|
|||
|
||||
static void DrawMessagePrompt()
|
||||
{
|
||||
if (g_currentMessagePrompt.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_currentMessageUpdateRemaining)
|
||||
if (g_filesPickerSkipUpdate)
|
||||
{
|
||||
// If a blocking function like the files picker is called, we must wait one update before actually showing
|
||||
// the message box, as a lot of time has passed since the last real update. Otherwise, animations will play
|
||||
// too quickly and input glitches might happen.
|
||||
g_currentMessageUpdateRemaining = false;
|
||||
return;
|
||||
}
|
||||
|
||||
if (g_currentMessagePrompt.empty())
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit c66456b90dcd4d6e158c3a58f9580c81a2dc015a
|
||||
Subproject commit 86376058708c6b729a451df391617aaabf91018a
|
||||
Loading…
Add table
Reference in a new issue