Atrinik Client  4.0
Macros | Functions | Variables
intro.c File Reference
#include <global.h>
#include <toolkit/string.h>
#include <toolkit/curl.h>

Go to the source code of this file.

Macros

#define EYES_BLINK_TIME   (15 * 1000)
 
#define EYES_BLINK_DELAY   (200)
 

Functions

static void list_handle_enter (list_struct *list, SDL_Event *event)
 
static void list_handle_esc (list_struct *list)
 
static void list_text_color (struct list_struct *list, uint32_t row, uint32_t col, const char **color, const char **color_shadow)
 
void intro_deinit (void)
 
void intro_show (void)
 
int intro_event (SDL_Event *event)
 

Variables

static size_t last_server_count = 0
 
static curl_request_t * news_request = NULL
 
static uint32_t eyes_blink_ticks = 0
 
static uint8_t eyes_draw = 1
 
static button_struct button_play
 
static button_struct button_refresh
 
static button_struct button_server
 
static button_struct button_settings
 
static button_struct button_update
 
static button_struct button_help
 
static button_struct button_credits
 
static button_struct button_quit
 
static list_structlist_news = NULL
 
static list_structlist_servers = NULL
 

Detailed Description

The intro screen.

Author
Alex Tokar

Definition in file intro.c.

Macro Definition Documentation

#define EYES_BLINK_DELAY   (200)

How long the eyes remain 'closed' (not drawn).

Definition at line 39 of file intro.c.

#define EYES_BLINK_TIME   (15 * 1000)

How often to blink the eyes in ticks.

Definition at line 37 of file intro.c.

Function Documentation

void intro_deinit ( void  )

Deinitialize data used by the intro screen.

Definition at line 152 of file intro.c.

int intro_event ( SDL_Event *  event)

Handle event in the main screen.

Parameters
eventThe event to handle.
Returns
1 if the event was handled, 0 otherwise.

Definition at line 408 of file intro.c.

void intro_show ( void  )

Show the main GUI after starting the client – servers list, chat box, connecting to server, etc.

Definition at line 174 of file intro.c.

static void list_handle_enter ( list_struct list,
SDL_Event *  event 
)
static

Handle enter key being pressed in the servers list.

Parameters
listThe servers list.

Definition at line 68 of file intro.c.

static void list_handle_esc ( list_struct list)
static

Definition at line 104 of file intro.c.

static void list_text_color ( struct list_struct list,
uint32_t  row,
uint32_t  col,
const char **  color,
const char **  color_shadow 
)
static

Hook to use for setting text color based on row/column.

Parameters
listList.
rowText row.
colColumn.
[out]colorWhat color to use.
[out]color_shadowWhat color to use for the text's shadow, NULL to disable shadow.

Definition at line 113 of file intro.c.

Variable Documentation

button_struct button_play
static

Button buffer.

Definition at line 56 of file intro.c.

uint32_t eyes_blink_ticks = 0
static

Last time the eyes blinked.

Definition at line 52 of file intro.c.

uint8_t eyes_draw = 1
static

Whether to draw the eyes.

Definition at line 54 of file intro.c.

size_t last_server_count = 0
static

Last server count to see when to re-create the servers list. Since the metaserver code uses threading so the whole program doesn't lock up, we need to do it like this.

Definition at line 46 of file intro.c.

list_struct* list_news = NULL
static

The news list.

Definition at line 59 of file intro.c.

list_struct* list_servers = NULL
static

The servers list.

Definition at line 61 of file intro.c.

curl_request_t* news_request = NULL
static

cURL request when downloading news from the site.

Definition at line 49 of file intro.c.