MiniDevil As beautiful as a shell
welcome.c File Reference

Welcome animation. More...

#include "welcome_ui.h"
+ Include dependency graph for welcome.c:

Detailed Description

Welcome animation.

Definition in file welcome.c.

Functions

static void init_screen (void)
 Clear the screen and hide the cursor. More...
 
static void cleanup_screen (t_welcome_term *t)
 Wait a bit, show the cursor and clear the screen to exit welcome. More...
 
static void draw_border_effect (t_welcome_term *t)
 Animate top and bottom border sweep across the screen. More...
 
void draw_welcome (void)
 Draw complete welcome animation sequence and clean up. More...
 

Function Documentation

◆ init_screen()

static void init_screen ( void  )
static

Clear the screen and hide the cursor.

Definition at line 18 of file welcome.c.

References CLEAR_SCREEN, and HIDE_CURSOR.

Referenced by draw_welcome().

+ Here is the caller graph for this function:

◆ cleanup_screen()

static void cleanup_screen ( t_welcome_term t)
static

Wait a bit, show the cursor and clear the screen to exit welcome.

Parameters
tTerminal info (used to position the cursor before showing it)

Definition at line 28 of file welcome.c.

References CLEAR_SCREEN, ft_msleep(), t_welcome_term::height, print_at_pos(), and SHOW_CURSOR.

Referenced by draw_welcome().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw_border_effect()

static void draw_border_effect ( t_welcome_term t)
static

Animate top and bottom border sweep across the screen.

Parameters
tTerminal dimensions and centre position
Warning
Since usleep() isn't allowed and ft_msleep() can't handle values below 100ms, the animation isn't working here

Definition at line 42 of file welcome.c.

References C_AURA1, t_welcome_term::center_y, ft_msleep(), print_at_pos(), RESET, and t_welcome_term::width.

Referenced by draw_welcome().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ draw_welcome()

void draw_welcome ( void  )

Draw complete welcome animation sequence and clean up.

Definition at line 68 of file welcome.c.

References animate_credits(), animate_demon(), animate_loading(), animate_quote(), animate_title(), cleanup_screen(), draw_border_effect(), flash_demon_eyes(), ft_msleep(), get_welcome_term_size(), and init_screen().

Referenced by ui_loop().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Go to the source code of this file.