MiniDevil As beautiful as a shell
waifu.c File Reference

Waifu character management. More...

#include "minishell_ui.h"
+ Include dependency graph for waifu.c:

Detailed Description

Waifu character management.

Definition in file waifu.c.

Functions

void update_waifu_mood (t_ui *ui, int mood)
 Set the waifu mood. More...
 
static void render_waifu_mood (t_ui *ui, int y, int x)
 Dispatch to correct drawing function for the current mood. More...
 
void draw_waifu_box (t_ui *ui)
 Draw the waifu panel in the right sidebar. More...
 

Function Documentation

◆ update_waifu_mood()

void update_waifu_mood ( t_ui ui,
int  mood 
)

Set the waifu mood.

Parameters
uiUI state
moodNew mood value

Definition at line 21 of file waifu.c.

References t_waifu::mood, and t_ui::waifu.

Referenced by cmd_execute(), exec_parent(), execute_minishell_cmd(), handle_fork_error(), and init_pipe_and_fds().

+ Here is the caller graph for this function:

◆ render_waifu_mood()

static void render_waifu_mood ( t_ui ui,
int  y,
int  x 
)
static

Dispatch to correct drawing function for the current mood.

Parameters
uiUI state
yTop row
xLeft col

Definition at line 33 of file waifu.c.

References draw_happy(), draw_proud(), draw_upset(), t_waifu::mood, MOOD_PROUD, MOOD_UPSET, and t_ui::waifu.

Referenced by draw_waifu_box().

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

◆ draw_waifu_box()

void draw_waifu_box ( t_ui ui)

Draw the waifu panel in the right sidebar.

Parameters
uiUI state

Definition at line 48 of file waifu.c.

References C_FIRE4, t_box::color, draw_box_bottom(), draw_box_sides(), draw_box_title(), t_box::h, render_waifu_mood(), t_ui::term, t_box::w, WAIFU_BOX_W, t_term::width, t_box::x, and t_box::y.

Referenced by draw_ui().

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

Go to the source code of this file.