Add: cool splash screen
This commit is contained in:
@@ -9,6 +9,7 @@
|
||||
#include "../programs/programs.h"
|
||||
#include "../libc/crypto.h"
|
||||
#include <stdint.h>
|
||||
#include "../drivers/rtc.h"
|
||||
|
||||
#define BUFFER_SIZE 256
|
||||
#define MAX_COMMANDS 16
|
||||
@@ -19,7 +20,7 @@
|
||||
char* ascii_title =
|
||||
"\n"
|
||||
"----------------------------------------------\n"
|
||||
"Blank OS version 0.3.71-dev\n"
|
||||
"Blank OS version 0.3.84-alpha\n"
|
||||
"Author: @xamidev - star the repo for a cookie!\n"
|
||||
"----------------------------------------------\n"
|
||||
"\n";
|
||||
@@ -28,16 +29,24 @@ char* motd[] =
|
||||
{
|
||||
"Now in 2D!",
|
||||
"Supercalifragilisticexpialidocious!",
|
||||
"Tylko jedno w głowie mam!",
|
||||
"Tylko jedno w glowie mam!",
|
||||
};
|
||||
int motd_size = sizeof(motd)/sizeof(motd[0]);
|
||||
|
||||
void splash()
|
||||
{ // Change that seed to something RTC-related (need RTC driver)
|
||||
int random = randint(global_ticks);
|
||||
{
|
||||
int random = randint(time_seed());
|
||||
char* motd_pick = motd[random%motd_size];
|
||||
cowsay(motd_pick, red, black);
|
||||
puts("\n");
|
||||
colorputs(" blankOS 0.3.84-alpha", red, black);
|
||||
puts("\n");
|
||||
|
||||
|
||||
puts(" Time: ");
|
||||
rtc_time_t time;
|
||||
rtc_read_time(&time);
|
||||
print_time(&time);
|
||||
puts("\n");
|
||||
}
|
||||
|
||||
typedef void (*command_func_t)(int argc, char *argv[]);
|
||||
|
||||
Reference in New Issue
Block a user