Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion MarathonRecomp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,8 @@ BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/gam
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/music/installer.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/music/installer.ogg" ARRAY_NAME "g_installer_music")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/window_open.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/window_open.ogg" ARRAY_NAME "g_window_open")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/window_close.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/window_close.ogg" ARRAY_NAME "g_window_close")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/cursor2.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/cursor2.ogg" ARRAY_NAME "g_cursor2")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/cursor.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/cursor.ogg" ARRAY_NAME "g_cursor")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/deside.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/deside.ogg" ARRAY_NAME "g_deside")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/move.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/move.ogg" ARRAY_NAME "g_move")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/main_deside.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/main_deside.ogg" ARRAY_NAME "g_main_deside")
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/cannot_deside.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/cannot_deside.ogg" ARRAY_NAME "g_cannot_deside")
21 changes: 14 additions & 7 deletions MarathonRecomp/apu/embedded_player.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,22 @@
#include <res/music/installer.ogg.h>
#include <res/sounds/window_open.ogg.h>
#include <res/sounds/window_close.ogg.h>
#include <res/sounds/cursor2.ogg.h>
#include <res/sounds/cursor.ogg.h>
#include <res/sounds/deside.ogg.h>
#include <res/sounds/move.ogg.h>
#include <res/sounds/main_deside.ogg.h>
#include <res/sounds/cannot_deside.ogg.h>

enum class EmbeddedSound
{
WindowOpen,
WindowClose,
Cursor2,
Cursor,
Deside,
Move,
MainDeside,
Count,
CannotDeside,
Count
};

struct EmbeddedSoundData
Expand All @@ -31,10 +33,11 @@ static const std::unordered_map<std::string_view, EmbeddedSound> g_embeddedSound
{
{ "window_open", EmbeddedSound::WindowOpen },
{ "window_close", EmbeddedSound::WindowClose },
{ "cursor2", EmbeddedSound::Cursor2 },
{ "cursor", EmbeddedSound::Cursor },
{ "deside", EmbeddedSound::Deside },
{ "move", EmbeddedSound::Move },
{ "main_deside", EmbeddedSound::MainDeside },
{ "cannot_deside", EmbeddedSound::CannotDeside },
};

static size_t g_channelIndex;
Expand All @@ -57,9 +60,9 @@ static void PlayEmbeddedSound(EmbeddedSound s)
soundData = g_window_close;
soundDataSize = sizeof(g_window_close);
break;
case EmbeddedSound::Cursor2:
soundData = g_cursor2;
soundDataSize = sizeof(g_cursor2);
case EmbeddedSound::Cursor:
soundData = g_cursor;
soundDataSize = sizeof(g_cursor);
break;
case EmbeddedSound::Deside:
soundData = g_deside;
Expand All @@ -73,6 +76,10 @@ static void PlayEmbeddedSound(EmbeddedSound s)
soundData = g_main_deside;
soundDataSize = sizeof(g_main_deside);
break;
case EmbeddedSound::CannotDeside:
soundData = g_cannot_deside;
soundDataSize = sizeof(g_cannot_deside);
break;
default:
assert(false && "Unknown embedded sound.");
return;
Expand Down
1 change: 1 addition & 0 deletions MarathonRecomp/gpu/video.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2915,6 +2915,7 @@ static void DrawImGui()
ImGui::End();
#endif

UpdateImGuiUtils();
AchievementMenu::Draw();
OptionsMenu::Draw();
InstallerWizard::Draw();
Expand Down
40 changes: 20 additions & 20 deletions MarathonRecomp/install/installer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@

static const std::string GameDirectory = "game";
static const std::string DLCDirectory = "dlc";
static const std::string EpisodeSonicDirectory = DLCDirectory + "/Episode Sonic Boss Attack";
static const std::string EpisodeShadowDirectory = DLCDirectory + "/Episode Shadow Boss Attack";
static const std::string EpisodeSilverDirectory = DLCDirectory + "/Episode Silver Boss Attack";
static const std::string EpisodeAmigoDirectory = DLCDirectory + "/Team Attack Amigo";
static const std::string MissionSonicDirectory = DLCDirectory + "/Mission Pack Sonic Very Hard";
static const std::string MissionShadowDirectory = DLCDirectory + "/Mission Pack Shadow Very Hard";
static const std::string MissionSilverDirectory = DLCDirectory + "/Mission Pack Silver Very Hard";
static const std::string EpisodeSonicDirectory = DLCDirectory + "/Additional Episode - Sonic Boss Attack";
static const std::string EpisodeShadowDirectory = DLCDirectory + "/Additional Episode - Shadow Boss Attack";
static const std::string EpisodeSilverDirectory = DLCDirectory + "/Additional Episode - Silver Boss Attack";
static const std::string EpisodeAmigoDirectory = DLCDirectory + "/Additional Episode - Team Attack Amigo";
static const std::string MissionSonicDirectory = DLCDirectory + "/Additional Mission Pack - Sonic Very Hard";
static const std::string MissionShadowDirectory = DLCDirectory + "/Additional Mission Pack - Shadow Very Hard";
static const std::string MissionSilverDirectory = DLCDirectory + "/Additional Mission Pack - Silver Very Hard";
static const std::string GameExecutableFile = "default.xex";
static const std::string DLCValidationFile = "download.arc";
static const std::string ISOExtension = ".iso";
Expand Down Expand Up @@ -70,7 +70,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
if (!std::filesystem::exists(filePath))
{
journal.lastResult = Journal::Result::FileMissing;
journal.lastErrorMessage = fmt::format("File {} does not exist.", fileName);
journal.lastErrorMessage = fmt::format("File \"{}\" does not exist.", fileName);
return false;
}

Expand All @@ -79,7 +79,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
if (ec)
{
journal.lastResult = Journal::Result::FileReadFailed;
journal.lastErrorMessage = fmt::format("Failed to read file size for {}.", fileName);
journal.lastErrorMessage = fmt::format("Failed to read file size for \"{}\".", fileName);
return false;
}

Expand All @@ -99,7 +99,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
if (!fileStream.is_open() || fileStream.bad())
{
journal.lastResult = Journal::Result::FileReadFailed;
journal.lastErrorMessage = fmt::format("Failed to read file {}.", fileName);
journal.lastErrorMessage = fmt::format("Failed to read file \"{}\".", fileName);
return false;
}

Expand All @@ -113,7 +113,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
if (!fileHashFound)
{
journal.lastResult = Journal::Result::FileHashFailed;
journal.lastErrorMessage = fmt::format("File {} did not match any of the known hashes.", fileName);
journal.lastErrorMessage = fmt::format("File \"{}\" did not match any of the known hashes.", fileName);
return false;
}

Expand All @@ -136,14 +136,14 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
if (!sourceVfs.exists(filename))
{
journal.lastResult = Journal::Result::FileMissing;
journal.lastErrorMessage = fmt::format("File {} does not exist in {}.", filename, sourceVfs.getName());
journal.lastErrorMessage = fmt::format("File \"{}\" does not exist in \"{}\".", filename, sourceVfs.getName());
return false;
}

if (!sourceVfs.load(filename, fileData))
{
journal.lastResult = Journal::Result::FileReadFailed;
journal.lastErrorMessage = fmt::format("Failed to read file {} from {}.", filename, sourceVfs.getName());
journal.lastErrorMessage = fmt::format("Failed to read file \"{}\" from \"{}\".", filename, sourceVfs.getName());
return false;
}

Expand All @@ -159,7 +159,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
if (!fileHashFound)
{
journal.lastResult = Journal::Result::FileHashFailed;
journal.lastErrorMessage = fmt::format("File {} from {} did not match any of the known hashes.", filename, sourceVfs.getName());
journal.lastErrorMessage = fmt::format("File \"{}\" from \"{}\" did not match any of the known hashes.", filename, sourceVfs.getName());
return false;
}
}
Expand Down Expand Up @@ -187,7 +187,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
if (!outStream.is_open())
{
journal.lastResult = Journal::Result::FileCreationFailed;
journal.lastErrorMessage = fmt::format("Failed to create file at {}.", fromPath(targetPath));
journal.lastErrorMessage = fmt::format("Failed to create file at \"{}\".", fromPath(targetPath));
return false;
}

Expand All @@ -197,7 +197,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
if (outStream.bad())
{
journal.lastResult = Journal::Result::FileWriteFailed;
journal.lastErrorMessage = fmt::format("Failed to create file at {}.", fromPath(targetPath));
journal.lastErrorMessage = fmt::format("Failed to create file at \"{}\".", fromPath(targetPath));
return false;
}

Expand Down Expand Up @@ -253,7 +253,7 @@ static DLC detectDLC(const std::filesystem::path &sourcePath, VirtualFileSystem
}

journal.lastResult = Journal::Result::UnknownDLCType;
journal.lastErrorMessage = fmt::format("DLC type for {} is unknown.", name);
journal.lastErrorMessage = fmt::format("DLC type for \"{}\" is unknown.", name);
return DLC::Unknown;
}

Expand Down Expand Up @@ -384,7 +384,7 @@ bool Installer::computeTotalSize(std::span<const FilePair> filePairs, const uint
if (!sourceVfs.exists(filename))
{
journal.lastResult = Journal::Result::FileMissing;
journal.lastErrorMessage = fmt::format("File {} does not exist in {}.", filename, sourceVfs.getName());
journal.lastErrorMessage = fmt::format("File \"{}\" does not exist in \"{}\".", filename, sourceVfs.getName());
return false;
}

Expand Down Expand Up @@ -421,7 +421,7 @@ bool Installer::copyFiles(std::span<const FilePair> filePairs, const uint64_t *f
if (!std::filesystem::exists(targetDirectory) && !std::filesystem::create_directories(targetDirectory, ec))
{
journal.lastResult = Journal::Result::DirectoryCreationFailed;
journal.lastErrorMessage = "Unable to create directory at " + fromPath(targetDirectory);
journal.lastErrorMessage = "Unable to create directory at \"" + fromPath(targetDirectory) + "\".";
return false;
}

Expand Down Expand Up @@ -452,7 +452,7 @@ bool Installer::parseContent(const std::filesystem::path &sourcePath, std::uniqu
else
{
journal.lastResult = Journal::Result::VirtualFileSystemFailed;
journal.lastErrorMessage = "Unable to open " + fromPath(sourcePath);
journal.lastErrorMessage = "Unable to open \"" + fromPath(sourcePath) + "\".";
return false;
}
}
Expand Down
2 changes: 1 addition & 1 deletion MarathonRecomp/locale/config_locale.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ CONFIG_DEFINE_ENUM_LOCALE(ELanguage)

CONFIG_DEFINE_LOCALE(VoiceLanguage)
{
{ ELanguage::English, { "Voice Language", "Change the language used for character voices." } },
{ ELanguage::English, { "Voice Language", "Change the language used for character voices." } },
{ ELanguage::Japanese, { "音声言語", "ゲーム内の音声言語を変更できます" } },
{ ELanguage::German, { "Stimmeinstellung", "Ändere die Sprache, die für Charakterstimmen benutzt wird." } },
{ ELanguage::French, { "Langue de doublage", "Modifie la langue utilisée pour la voix des personnages." } },
Expand Down
Loading
Loading