mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 05:32:47 +00:00
Improved splash screen
o including release / hourly links o new SafeMode9 splash based on @Ordim3n's work
This commit is contained in:
parent
d1ab7602b9
commit
8957d74016
BIN
data/sm9_splash_baby.qlz
Normal file
BIN
data/sm9_splash_baby.qlz
Normal file
Binary file not shown.
BIN
resources/sm9_splash_baby.png
Normal file
BIN
resources/sm9_splash_baby.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
@ -40,15 +40,20 @@
|
|||||||
#define ENTRY_BRAHMA (1)
|
#define ENTRY_BRAHMA (1)
|
||||||
#define ENTRY_GATEWAY (2)
|
#define ENTRY_GATEWAY (2)
|
||||||
|
|
||||||
// GodMode9 / SafeMode9 ("flavor")
|
// GodMode9 / SafeMode9 ("flavor" / splash screen)
|
||||||
#ifndef SAFEMODE
|
#ifndef SAFEMODE
|
||||||
#define FLAVOR "GodMode9"
|
#define FLAVOR "GodMode9"
|
||||||
|
#define QLZ_SPLASH_H "gm9_splash_qlz.h"
|
||||||
|
#define QLZ_SPLASH gm9_splash_qlz
|
||||||
#else
|
#else
|
||||||
#define FLAVOR "SafeMode9"
|
#define FLAVOR "SafeMode9"
|
||||||
|
#define QLZ_SPLASH_H "sm9_splash_baby_qlz.h"
|
||||||
|
#define QLZ_SPLASH sm9_splash_baby_qlz
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
// GodMode9 version
|
// GodMode9 version
|
||||||
#define VERSION "1.0.4"
|
#define VERSION "1.0.5"
|
||||||
|
|
||||||
// Maximum payload size (arbitrary value!)
|
// Maximum payload size (arbitrary value!)
|
||||||
#define SELF_MAX_SIZE (320 * 1024) // 320kB
|
#define SELF_MAX_SIZE (320 * 1024) // 320kB
|
||||||
|
@ -71,7 +71,9 @@ void DrawCharacter(u8* screen, int character, int x, int y, int color, int bgcol
|
|||||||
|
|
||||||
void DrawString(u8* screen, const char *str, int x, int y, int color, int bgcolor)
|
void DrawString(u8* screen, const char *str, int x, int y, int color, int bgcolor)
|
||||||
{
|
{
|
||||||
for (size_t i = 0; i < strlen(str); i++)
|
size_t max_len = (((screen == TOP_SCREEN) ? SCREEN_WIDTH_TOP : SCREEN_WIDTH_BOT) - x) / FONT_WIDTH;
|
||||||
|
size_t len = (strlen(str) > max_len) ? max_len : strlen(str);
|
||||||
|
for (size_t i = 0; i < len; i++)
|
||||||
DrawCharacter(screen, str[i], x + i * FONT_WIDTH, y, color, bgcolor);
|
DrawCharacter(screen, str[i], x + i * FONT_WIDTH, y, color, bgcolor);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -19,14 +19,7 @@
|
|||||||
#include "chainload.h"
|
#include "chainload.h"
|
||||||
#include "qlzcomp.h"
|
#include "qlzcomp.h"
|
||||||
#include "timer.h"
|
#include "timer.h"
|
||||||
|
#include QLZ_SPLASH_H
|
||||||
#ifndef SAFEMODE
|
|
||||||
#include "gm9_splash_qlz.h"
|
|
||||||
#define QLZ_SPLASH gm9_splash_qlz
|
|
||||||
#else
|
|
||||||
#include "sm9_splash_qlz.h"
|
|
||||||
#define QLZ_SPLASH sm9_splash_qlz
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#define N_PANES 2
|
#define N_PANES 2
|
||||||
|
|
||||||
@ -1139,8 +1132,11 @@ u32 SplashInit() {
|
|||||||
|
|
||||||
ClearScreenF(true, true, COLOR_STD_BG);
|
ClearScreenF(true, true, COLOR_STD_BG);
|
||||||
QlzDecompress(TOP_SCREEN, QLZ_SPLASH, 0);
|
QlzDecompress(TOP_SCREEN, QLZ_SPLASH, 0);
|
||||||
DrawStringF(BOT_SCREEN, pos_xb, pos_yb, COLOR_STD_FONT, COLOR_STD_BG, "%s\n%*.*s\n%s", namestr, strnlen(namestr, 64), strnlen(namestr, 64),
|
DrawStringF(BOT_SCREEN, pos_xb, pos_yb, COLOR_STD_FONT, COLOR_STD_BG, "%s\n%*.*s\n%s\n \n%s\n%s\n \n%s\n%s",
|
||||||
"------------------------------", "https://github.com/d0k3/GodMode9");
|
namestr, strnlen(namestr, 64), strnlen(namestr, 64),
|
||||||
|
"------------------------------", "https://github.com/d0k3/GodMode9",
|
||||||
|
"Releases:", "https://github.com/d0k3/GodMode9/releases/", // this won't fit with a 8px width font
|
||||||
|
"Hourlies:", "https://d0k3.secretalgorithm.com/");
|
||||||
DrawStringF(BOT_SCREEN, pos_xu, pos_yu, COLOR_STD_FONT, COLOR_STD_BG, loadstr);
|
DrawStringF(BOT_SCREEN, pos_xu, pos_yu, COLOR_STD_FONT, COLOR_STD_BG, loadstr);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
@ -1176,9 +1172,8 @@ u32 GodMode() {
|
|||||||
InitNandCrypto();
|
InitNandCrypto();
|
||||||
InitExtFS();
|
InitExtFS();
|
||||||
|
|
||||||
// do this now so we don't have to do it later
|
// this takes long - do it while splash is displayed
|
||||||
GetFreeSpace("0:");
|
GetFreeSpace("0:");
|
||||||
InitVCartDrive();
|
|
||||||
|
|
||||||
// could also check for a9lh via this: ((*(vu32*) 0x101401C0) == 0)
|
// could also check for a9lh via this: ((*(vu32*) 0x101401C0) == 0)
|
||||||
if ((!IS_O3DS) && !CheckSlot0x05Crypto()) {
|
if ((!IS_O3DS) && !CheckSlot0x05Crypto()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user