Skip to content

Commit a9a3e8f

Browse files
hyperbxLJSTARbirdDarioSamoNextinMonoKitzuku
authored
Redesigned installer wizard (#221)
* Redesigned installer wizard * Update locale Co-authored-by: LJSTAR <31629427+ljstarbird@users.noreply.github.com> Co-authored-by: Dario <dariosamo@gmail.com> Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com> * Implemented fade animations * Update German localisation Co-authored-by: Kitzuku <smashnicsg@gmail.com> * Update Japanese localisation Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com> * Fix version string position * Increase version string text margins * Fix installer UI lingering when booting the game --------- Co-authored-by: LJSTAR <31629427+ljstarbird@users.noreply.github.com> Co-authored-by: Dario <dariosamo@gmail.com> Co-authored-by: NextinHKRY <38560522+NextinMono@users.noreply.github.com> Co-authored-by: Kitzuku <smashnicsg@gmail.com> Co-authored-by: brianuuu <38166666+brianuuu@users.noreply.github.com>
1 parent ceeae4f commit a9a3e8f

16 files changed

Lines changed: 944 additions & 1017 deletions

MarathonRecomp/CMakeLists.txt

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -568,7 +568,8 @@ BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/images/gam
568568
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")
569569
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")
570570
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")
571-
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/cursor2.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/cursor2.ogg" ARRAY_NAME "g_cursor2")
571+
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/cursor.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/cursor.ogg" ARRAY_NAME "g_cursor")
572572
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/deside.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/deside.ogg" ARRAY_NAME "g_deside")
573573
BIN2C(TARGET_OBJ MarathonRecomp SOURCE_FILE "${RESOURCES_SOURCE_PATH}/sounds/move.ogg" DEST_FILE "${RESOURCES_OUTPUT_PATH}/sounds/move.ogg" ARRAY_NAME "g_move")
574574
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")
575+
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")

MarathonRecomp/apu/embedded_player.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,20 +5,22 @@
55
#include <res/music/installer.ogg.h>
66
#include <res/sounds/window_open.ogg.h>
77
#include <res/sounds/window_close.ogg.h>
8-
#include <res/sounds/cursor2.ogg.h>
8+
#include <res/sounds/cursor.ogg.h>
99
#include <res/sounds/deside.ogg.h>
1010
#include <res/sounds/move.ogg.h>
1111
#include <res/sounds/main_deside.ogg.h>
12+
#include <res/sounds/cannot_deside.ogg.h>
1213

1314
enum class EmbeddedSound
1415
{
1516
WindowOpen,
1617
WindowClose,
17-
Cursor2,
18+
Cursor,
1819
Deside,
1920
Move,
2021
MainDeside,
21-
Count,
22+
CannotDeside,
23+
Count
2224
};
2325

2426
struct EmbeddedSoundData
@@ -31,10 +33,11 @@ static const std::unordered_map<std::string_view, EmbeddedSound> g_embeddedSound
3133
{
3234
{ "window_open", EmbeddedSound::WindowOpen },
3335
{ "window_close", EmbeddedSound::WindowClose },
34-
{ "cursor2", EmbeddedSound::Cursor2 },
36+
{ "cursor", EmbeddedSound::Cursor },
3537
{ "deside", EmbeddedSound::Deside },
3638
{ "move", EmbeddedSound::Move },
3739
{ "main_deside", EmbeddedSound::MainDeside },
40+
{ "cannot_deside", EmbeddedSound::CannotDeside },
3841
};
3942

4043
static size_t g_channelIndex;
@@ -57,9 +60,9 @@ static void PlayEmbeddedSound(EmbeddedSound s)
5760
soundData = g_window_close;
5861
soundDataSize = sizeof(g_window_close);
5962
break;
60-
case EmbeddedSound::Cursor2:
61-
soundData = g_cursor2;
62-
soundDataSize = sizeof(g_cursor2);
63+
case EmbeddedSound::Cursor:
64+
soundData = g_cursor;
65+
soundDataSize = sizeof(g_cursor);
6366
break;
6467
case EmbeddedSound::Deside:
6568
soundData = g_deside;
@@ -73,6 +76,10 @@ static void PlayEmbeddedSound(EmbeddedSound s)
7376
soundData = g_main_deside;
7477
soundDataSize = sizeof(g_main_deside);
7578
break;
79+
case EmbeddedSound::CannotDeside:
80+
soundData = g_cannot_deside;
81+
soundDataSize = sizeof(g_cannot_deside);
82+
break;
7683
default:
7784
assert(false && "Unknown embedded sound.");
7885
return;

MarathonRecomp/gpu/video.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2915,6 +2915,7 @@ static void DrawImGui()
29152915
ImGui::End();
29162916
#endif
29172917

2918+
UpdateImGuiUtils();
29182919
AchievementMenu::Draw();
29192920
OptionsMenu::Draw();
29202921
InstallerWizard::Draw();

MarathonRecomp/install/installer.cpp

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@
1717

1818
static const std::string GameDirectory = "game";
1919
static const std::string DLCDirectory = "dlc";
20-
static const std::string EpisodeSonicDirectory = DLCDirectory + "/Episode Sonic Boss Attack";
21-
static const std::string EpisodeShadowDirectory = DLCDirectory + "/Episode Shadow Boss Attack";
22-
static const std::string EpisodeSilverDirectory = DLCDirectory + "/Episode Silver Boss Attack";
23-
static const std::string EpisodeAmigoDirectory = DLCDirectory + "/Team Attack Amigo";
24-
static const std::string MissionSonicDirectory = DLCDirectory + "/Mission Pack Sonic Very Hard";
25-
static const std::string MissionShadowDirectory = DLCDirectory + "/Mission Pack Shadow Very Hard";
26-
static const std::string MissionSilverDirectory = DLCDirectory + "/Mission Pack Silver Very Hard";
20+
static const std::string EpisodeSonicDirectory = DLCDirectory + "/Additional Episode - Sonic Boss Attack";
21+
static const std::string EpisodeShadowDirectory = DLCDirectory + "/Additional Episode - Shadow Boss Attack";
22+
static const std::string EpisodeSilverDirectory = DLCDirectory + "/Additional Episode - Silver Boss Attack";
23+
static const std::string EpisodeAmigoDirectory = DLCDirectory + "/Additional Episode - Team Attack Amigo";
24+
static const std::string MissionSonicDirectory = DLCDirectory + "/Additional Mission Pack - Sonic Very Hard";
25+
static const std::string MissionShadowDirectory = DLCDirectory + "/Additional Mission Pack - Shadow Very Hard";
26+
static const std::string MissionSilverDirectory = DLCDirectory + "/Additional Mission Pack - Silver Very Hard";
2727
static const std::string GameExecutableFile = "default.xex";
2828
static const std::string DLCValidationFile = "download.arc";
2929
static const std::string ISOExtension = ".iso";
@@ -70,7 +70,7 @@ static bool checkFile(const FilePair &pair, const uint64_t *fileHashes, const st
7070
if (!std::filesystem::exists(filePath))
7171
{
7272
journal.lastResult = Journal::Result::FileMissing;
73-
journal.lastErrorMessage = fmt::format("File {} does not exist.", fileName);
73+
journal.lastErrorMessage = fmt::format("File \"{}\" does not exist.", fileName);
7474
return false;
7575
}
7676

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

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

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

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

143143
if (!sourceVfs.load(filename, fileData))
144144
{
145145
journal.lastResult = Journal::Result::FileReadFailed;
146-
journal.lastErrorMessage = fmt::format("Failed to read file {} from {}.", filename, sourceVfs.getName());
146+
journal.lastErrorMessage = fmt::format("Failed to read file \"{}\" from \"{}\".", filename, sourceVfs.getName());
147147
return false;
148148
}
149149

@@ -159,7 +159,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
159159
if (!fileHashFound)
160160
{
161161
journal.lastResult = Journal::Result::FileHashFailed;
162-
journal.lastErrorMessage = fmt::format("File {} from {} did not match any of the known hashes.", filename, sourceVfs.getName());
162+
journal.lastErrorMessage = fmt::format("File \"{}\" from \"{}\" did not match any of the known hashes.", filename, sourceVfs.getName());
163163
return false;
164164
}
165165
}
@@ -187,7 +187,7 @@ static bool copyFile(const FilePair &pair, const uint64_t *fileHashes, VirtualFi
187187
if (!outStream.is_open())
188188
{
189189
journal.lastResult = Journal::Result::FileCreationFailed;
190-
journal.lastErrorMessage = fmt::format("Failed to create file at {}.", fromPath(targetPath));
190+
journal.lastErrorMessage = fmt::format("Failed to create file at \"{}\".", fromPath(targetPath));
191191
return false;
192192
}
193193

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

@@ -253,7 +253,7 @@ static DLC detectDLC(const std::filesystem::path &sourcePath, VirtualFileSystem
253253
}
254254

255255
journal.lastResult = Journal::Result::UnknownDLCType;
256-
journal.lastErrorMessage = fmt::format("DLC type for {} is unknown.", name);
256+
journal.lastErrorMessage = fmt::format("DLC type for \"{}\" is unknown.", name);
257257
return DLC::Unknown;
258258
}
259259

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

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

@@ -452,7 +452,7 @@ bool Installer::parseContent(const std::filesystem::path &sourcePath, std::uniqu
452452
else
453453
{
454454
journal.lastResult = Journal::Result::VirtualFileSystemFailed;
455-
journal.lastErrorMessage = "Unable to open " + fromPath(sourcePath);
455+
journal.lastErrorMessage = "Unable to open \"" + fromPath(sourcePath) + "\".";
456456
return false;
457457
}
458458
}

MarathonRecomp/locale/config_locale.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ CONFIG_DEFINE_ENUM_LOCALE(ELanguage)
7474

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

0 commit comments

Comments
 (0)