mirror of
https://github.com/ApacheThunder/nrio-usb-disk.git
synced 2025-06-18 18:55:34 -04:00
Add graphical version of main logo.
* In the retro blocky text style based on example font from dkp examples.
This commit is contained in:
parent
0eda3c329c
commit
85833922bd
@ -1,17 +0,0 @@
|
||||
-W3
|
||||
|
||||
# 1bpp
|
||||
-gB1
|
||||
|
||||
# Generate a tileset
|
||||
-g
|
||||
|
||||
# Don't optimize repeated tiles, and don't generate a tilemap
|
||||
-mR!
|
||||
-m!
|
||||
|
||||
# Don't generate a palette
|
||||
-p!
|
||||
|
||||
# Black is transparent
|
||||
-gT000000
|
Binary file not shown.
Before Width: | Height: | Size: 685 B |
9
graphics/topLogo.grit
Normal file
9
graphics/topLogo.grit
Normal file
@ -0,0 +1,9 @@
|
||||
# 8 bit bitmap
|
||||
-gB8
|
||||
|
||||
# use lz77 compression
|
||||
-gzl
|
||||
|
||||
# bitmap format
|
||||
-gb
|
||||
|
BIN
graphics/topLogo.png
Normal file
BIN
graphics/topLogo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 624 B |
38
source/ui.c
38
source/ui.c
@ -8,12 +8,15 @@
|
||||
#include <fat.h>
|
||||
#include "ui.h"
|
||||
|
||||
#include <font.h>
|
||||
// #include <font.h>
|
||||
#include <topLogo.h>
|
||||
|
||||
static PrintConsole bottomConsole, topConsole;
|
||||
|
||||
extern uint32_t dcd_read_chip_id(void);
|
||||
|
||||
static int bg;
|
||||
|
||||
ITCM_CODE void ui_toggle_blink_activity(void) {
|
||||
topConsole.fontBgMap[(23 * 32) + 30] ^= 0xA000;
|
||||
}
|
||||
@ -22,19 +25,24 @@ ITCM_CODE void ui_toggle_blink_write_activity(void) {
|
||||
topConsole.fontBgMap[(23 * 32) + 29] ^= 0x9000;
|
||||
}
|
||||
|
||||
void ui_init(void) {
|
||||
videoSetMode(MODE_0_2D);
|
||||
videoSetModeSub(MODE_0_2D);
|
||||
|
||||
void ui_init(void) {
|
||||
videoSetMode(MODE_4_2D);
|
||||
videoSetModeSub(MODE_0_2D);
|
||||
vramSetPrimaryBanks(VRAM_A_LCD, VRAM_B_LCD, VRAM_C_SUB_BG, VRAM_D_MAIN_BG_0x06000000);
|
||||
setBrightness(3, 0);
|
||||
|
||||
// setBrightness(3, 0);
|
||||
|
||||
bg = bgInit(3, BgType_Bmp8, BgSize_B8_256x256, 1, 0);
|
||||
// Load graphics after font or else you get palette conflicts. :P
|
||||
decompress(topLogoBitmap, bgGetGfxPtr(bg), LZ77Vram);
|
||||
dmaCopy(topLogoPal, BG_PALETTE, 256*2);
|
||||
|
||||
consoleInit(&bottomConsole,
|
||||
0, BgType_Text4bpp, BgSize_T_256x256, 22, 3, false, false);
|
||||
0, BgType_Text4bpp, BgSize_T_256x256, 22, 3, false, true);
|
||||
consoleInit(&topConsole,
|
||||
0, BgType_Text4bpp, BgSize_T_256x256, 22, 3, true, false);
|
||||
0, BgType_Text4bpp, BgSize_T_256x256, 4, 6, true, true); // Reconfigured to allow text and 8bit image.
|
||||
|
||||
ConsoleFont font;
|
||||
/*ConsoleFont font;
|
||||
font.gfx = (u16*)fontTiles;
|
||||
font.pal = NULL;
|
||||
font.numChars = 95;
|
||||
@ -43,11 +51,14 @@ void ui_init(void) {
|
||||
font.asciiOffset = 32;
|
||||
|
||||
consoleSetFont(&bottomConsole, &font);
|
||||
consoleSetFont(&topConsole, &font);
|
||||
consoleSetFont(&topConsole, &font);*/
|
||||
|
||||
// BG_PALETTE[255] = RGB15(31,31,31);
|
||||
// BG_PALETTE_SUB[255] = RGB15(31,31,31);
|
||||
|
||||
consoleSelect(&topConsole);
|
||||
|
||||
puts("\x1b[2J"
|
||||
/*puts("\x1b[2J"
|
||||
"\x1b[4;0H"
|
||||
"\x1b[37;1m"
|
||||
" _\n"
|
||||
@ -68,6 +79,11 @@ void ui_init(void) {
|
||||
"\x1b[30;1m\n"
|
||||
" \\__,_|_|__/_|\\_\\ " GIT_HASH
|
||||
"\x1b[21;0H");
|
||||
printf("\x1b[37;0m%s", io_dldi_data->friendlyName);*/
|
||||
|
||||
for (int i = 0; i < 15; i++)printf("\n");
|
||||
puts(" " VERSION "\x1b[30;1m\n"
|
||||
" " GIT_HASH "\x1b[21;0H");
|
||||
printf("\x1b[37;0m%s", io_dldi_data->friendlyName);
|
||||
|
||||
consoleSelect(&bottomConsole);
|
||||
|
Loading…
Reference in New Issue
Block a user