Atrinik Client 2.5
Defines | Functions | Variables
client/main.c File Reference
#include <global.h>

Go to the source code of this file.

Defines

#define BITMAP_MAX   (sizeof(bitmap_name) / sizeof(_bitmap_name))

Functions

static void init_game_data ()
static void delete_player_lists ()
static int load_bitmap (int index)
static void init_signals ()
static int game_status_chain ()
static void load_bitmaps ()
void free_bitmaps ()
static void play_action_sounds ()
void list_vid_modes ()
static void display_layer1 ()
static void display_layer2 ()
static void display_layer3 ()
static void display_layer4 ()
static void DisplayCustomCursor ()
int main (int argc, char *argv[])

Variables

SDL_Surface * ScreenSurface
struct sockaddr_in insock
ClientSocket csocket
struct _fire_mode fire_mode_tab [FIRE_MODE_INIT]
int RangeFireMode
server_structselected_server = NULL
static char argServerName [2048]
static int argServerPort
uint32 LastTick
int f_custom_cursor = 0
int x_custom_cursor = 0
int y_custom_cursor = 0
int map_udate_flag
int map_redraw_flag
help_files_structhelp_files
_game_status GameStatus
_anim_tableanim_table = NULL
Animationsanimations = NULL
size_t animations_num = 0
struct screensize * Screensize
_face_struct FaceList [MAX_FACE_TILES]
struct msg_anim_struct msg_anim
static time_t last_keepalive
static _bitmap_name bitmap_name [BITMAP_INIT]
_SpriteBitmaps [BITMAP_MAX]

Detailed Description

Client main related functions.

Definition in file main.c.


Define Documentation

#define BITMAP_MAX   (sizeof(bitmap_name) / sizeof(_bitmap_name))

Number of bitmaps.

Definition at line 223 of file main.c.


Function Documentation

static void delete_player_lists ( ) [static]

Clear player lists like skill list, spell list, etc.

Definition at line 233 of file main.c.

static void display_layer1 ( ) [static]

Map, animations and other effects.

Definition at line 669 of file main.c.

static void display_layer2 ( ) [static]

Inventory.

Definition at line 681 of file main.c.

static void display_layer3 ( ) [static]

Process the widgets if we're playing.

Definition at line 697 of file main.c.

static void display_layer4 ( ) [static]

Dialogs, highest priority layer.

Definition at line 708 of file main.c.

static void DisplayCustomCursor ( ) [static]

Show a custom cursor.

Definition at line 745 of file main.c.

void free_bitmaps ( )

Free the bitmaps.

Definition at line 578 of file main.c.

static int game_status_chain ( ) [static]

Game status chain.

Returns:
1.

Definition at line 362 of file main.c.

static void init_game_data ( ) [static]

Initialize game data.

Definition at line 249 of file main.c.

static void init_signals ( ) [static]

Initialize the signal handlers.

Definition at line 349 of file main.c.

void list_vid_modes ( )

List video modes available.

Definition at line 621 of file main.c.

static int load_bitmap ( int  idx) [static]

Load a single bitmap.

Parameters:
indexID of the bitmap to load.
Returns:
1 on success, 0 on failure.

Definition at line 543 of file main.c.

static void load_bitmaps ( ) [static]

Load the necessary bitmaps.

Definition at line 528 of file main.c.

int main ( int  argc,
char *  argv[] 
)

The main function.

Parameters:
argcNumber of arguments.
argv[]Arguments.
Returns:
0

Definition at line 758 of file main.c.

static void play_action_sounds ( ) [static]

Play various action sounds.

Definition at line 590 of file main.c.


Variable Documentation

The stored "anim commands" we created out of anims.tmp.

Definition at line 65 of file main.c.

size_t animations_num = 0

Number of animations.

Definition at line 68 of file main.c.

char argServerName[2048] [static]

Used with -server command line option.

Definition at line 46 of file main.c.

int argServerPort [static]

Used with -server command line option.

Definition at line 48 of file main.c.

_bitmap_name bitmap_name[BITMAP_INIT] [static]

All the bitmaps.

Definition at line 82 of file main.c.

_Sprite* Bitmaps[BITMAP_MAX]

The actual bitmaps.

Definition at line 225 of file main.c.

Client socket.

Definition at line 37 of file main.c.

_face_struct FaceList[MAX_FACE_TILES]

Face data

Definition at line 74 of file main.c.

Global status identifier.

Definition at line 63 of file main.c.

All the loaded help files.

Definition at line 61 of file main.c.

struct sockaddr_in insock

Server's attributes

Definition at line 35 of file main.c.

time_t last_keepalive [static]

Last time we sent keepalive command.

Definition at line 79 of file main.c.

System time counter in ms since program start.

Definition at line 51 of file main.c.

The message animation structure.

Definition at line 77 of file main.c.

struct screensize* Screensize

Size of the screen.

Definition at line 71 of file main.c.

SDL_Surface* ScreenSurface

The main screen surface.

Definition at line 33 of file main.c.

Our selected server that we want to connect to.

Definition at line 43 of file main.c.