Skip to content

Commit 9f6ef6b

Browse files
committed
Add .ini-only setting to swap DS and DSi splash screens
1 parent e0b77b3 commit 9f6ef6b

File tree

4 files changed

+12
-7
lines changed

4 files changed

+12
-7
lines changed

title/arm9/source/bootsplash.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,11 @@ void bootSplashDSi(void) {
4141
const struct tm *Time = localtime(&Raw);
4242

4343
strftime(currentDate, sizeof(currentDate), "%m/%d", Time);
44-
bool virtualPain = (strcmp(currentDate, "04/01") == 0 || (ms().getGameRegion() == 0 ? (strcmp(currentDate, "07/21") == 0) : (strcmp(currentDate, "08/14") == 0))); // If April Fools, or the release date of the Virtual Boy
45-
bool super = (*(u16*)(0x020000C0) == 0x334D || *(u16*)(0x020000C0) == 0x3647 || *(u16*)(0x020000C0) == 0x4353); // Slot-2 flashcard
44+
const bool virtualPain = (strcmp(currentDate, "04/01") == 0 || (ms().getGameRegion() == 0 ? (strcmp(currentDate, "07/21") == 0) : (strcmp(currentDate, "08/14") == 0))); // If April Fools, or the release date of the Virtual Boy
45+
const bool super = (*(u16*)(0x020000C0) == 0x334D || *(u16*)(0x020000C0) == 0x3647 || *(u16*)(0x020000C0) == 0x4353); // Slot-2 flashcard
46+
const bool regularDS = (sys().isRegularDS() && !ms().oppositeSplash) || (!sys().isRegularDS() && ms().oppositeSplash);
4647

47-
bool custom = ms().dsiSplash == 3;
48+
const bool custom = ms().dsiSplash == 3;
4849

4950
char path[256];
5051
if (virtualPain) {
@@ -56,14 +57,14 @@ void bootSplashDSi(void) {
5657
} else if (super) {
5758
sprintf(path, "nitro:/video/splash/superDS.gif");
5859
} else {
59-
sprintf(path, "nitro:/video/splash/%s.gif", language == TWLSettings::ELangChineseS ? "iquedsi" : (sys().isRegularDS() ? "ds" : "dsi"));
60+
sprintf(path, "nitro:/video/splash/%s.gif", language == TWLSettings::ELangChineseS ? "iquedsi" : (regularDS ? "ds" : "dsi"));
6061
}
6162
Gif splash(path, true, true);
6263

6364
path[0] = '\0';
6465
if (virtualPain) { // Load Virtual Pain image
6566
strcpy(path, "nitro:/video/hsmsg/virtualPain.gif");
66-
} else if (ms().dsiSplash == 1) { // Load Touch the Touch Screen to continue image
67+
} else if (ms().dsiSplash == 1) { // Load "Touch the Touch Screen to continue" image
6768
sprintf(path, "nitro:/video/tttstc/%i.gif", language);
6869
} else if (ms().dsiSplash == 2) { // Load H&S image
6970
sprintf(path, "nitro:/video/hsmsg/%i.gif", language);

title/arm9/source/sound.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -142,10 +142,11 @@ SoundControl::SoundControl()
142142

143143
mmInitDefaultMem((mm_addr)soundBank);
144144

145-
mmLoadEffect( (sys().isRegularDS() || ms().macroMode) ? SFX_DSBOOT : SFX_DSIBOOT );
145+
const bool regularDS = (sys().isRegularDS() && !ms().oppositeSplash) || (!sys().isRegularDS() && ms().oppositeSplash);
146+
mmLoadEffect( (regularDS || ms().macroMode) ? SFX_DSBOOT : SFX_DSIBOOT );
146147
mmLoadEffect( SFX_SELECT );
147148

148-
if (sys().isRegularDS() || ms().macroMode) {
149+
if (regularDS || ms().macroMode) {
149150
snd_dsiboot = {
150151
{ SFX_DSBOOT } , // id
151152
(int)(1.0f * (1<<10)), // rate

universal/include/common/twlmenusettings.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ class TWLSettings
321321
TSlot1LaunchMethod slot1LaunchMethod;
322322

323323
int dsiSplash;
324+
bool oppositeSplash;
324325
bool dsiSplashAutoSkip;
325326
int nintendoLogoColor;
326327
bool showlogo;

universal/source/common/twlmenusettings.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ TWLSettings::TWLSettings()
8080
slot1LaunchMethod = EDirect;
8181

8282
dsiSplash = isDSiMode();
83+
oppositeSplash = false;
8384
dsiSplashAutoSkip = false;
8485
nintendoLogoColor = 1;
8586
showlogo = true;
@@ -275,6 +276,7 @@ void TWLSettings::loadSettings()
275276
slot1LaunchMethod = (TSlot1LaunchMethod)settingsini.GetInt("SRLOADER", "SLOT1_LAUNCHMETHOD", slot1LaunchMethod);
276277

277278
dsiSplash = settingsini.GetInt("SRLOADER", "DSI_SPLASH", dsiSplash);
279+
oppositeSplash = settingsini.GetInt("SRLOADER", "OPPOSITE_SPLASH", oppositeSplash);
278280
dsiSplashAutoSkip = settingsini.GetInt("SRLOADER", "DSI_SPLASH_AUTO_SKIP", dsiSplashAutoSkip);
279281
nintendoLogoColor = settingsini.GetInt("SRLOADER", "NINTENDO_LOGO_COLOR", nintendoLogoColor);
280282
showlogo = settingsini.GetInt("SRLOADER", "SHOWLOGO", showlogo);

0 commit comments

Comments
 (0)