Atrinik Client  4.0
Data Structures | Macros | Typedefs | Enumerations
main.h File Reference

Go to the source code of this file.

Data Structures

struct  server_cert_info
 
struct  server_struct
 
struct  msg_anim_struct
 
struct  _face_struct
 
struct  spell_entry_struct
 
struct  skill_entry_struct
 
struct  _fire_mode
 
struct  hfile_struct
 

Macros

#define COLOR_BUF   7
 
#define SDL_DEFAULT_REPEAT_INTERVAL   30
 
#define MAXSTRING   20
 
#define METASERVER_GET_PUBKEY(server)
 
#define FILE_ATRINIK_P0   "data/atrinik.p0"
 
#define FACE_REQUESTED   16
 
#define NUM_STATS   7
 
#define SPELL_PATH_NUM   21
 
#define SURFACE_FLAG_COLKEY_16M   2
 
#define SURFACE_FLAG_DISPLAYFORMAT   4
 
#define SURFACE_FLAG_DISPLAYFORMATALPHA   8
 
#define IS_ENTER(_keysym)   ((_keysym) == SDLK_RETURN || (_keysym) == SDLK_KP_ENTER)
 
#define IS_NEXT(_keysym)   ((_keysym) == SDLK_TAB || IS_ENTER((_keysym)))
 

Typedefs

typedef struct server_cert_info server_cert_info_t
 
typedef struct server_struct server_struct
 
typedef struct msg_anim_struct msg_anim_struct
 
typedef struct _face_struct _face_struct
 
typedef struct spell_entry_struct spell_entry_struct
 
typedef struct skill_entry_struct skill_entry_struct
 
typedef struct _fire_mode _fire_mode
 
typedef struct hfile_struct hfile_struct
 
typedef enum player_state_t player_state_t
 

Enumerations

enum  player_state_t {
  ST_INIT, ST_META, ST_START, ST_WAITLOOP,
  ST_STARTCONNECT, ST_CONNECT, ST_WAITCRYPTO, ST_START_DATA,
  ST_WAITVERSION, ST_VERSION, ST_WAITSETUP, ST_REQUEST_FILES_LISTING,
  ST_WAITREQUEST_FILES_LISTING, ST_REQUEST_FILES, ST_LOGIN, ST_WAITLOGIN,
  ST_CHARACTERS, ST_WAITFORPLAY, ST_PLAY
}
 
enum  { MSCURSOR_MOVE = 1 }
 

Detailed Description

Header file for things that are generally used in many places.

Definition in file main.h.

Macro Definition Documentation

#define METASERVER_GET_PUBKEY (   server)
Value:
((server)->cert_info != NULL ? (server)->cert_info->pubkey : \
(server)->cert_pubkey)

Acquire public key to use for the specified server.

Parameters
serverServer.
Returns
Public key, NULL if there's no public key.
Todo:
This should really be a function.

Definition at line 119 of file main.h.

#define SPELL_PATH_NUM   21

Maximum number of spell paths. The last one is always 'all' and holds pointers to spells in the other spell paths.

Definition at line 189 of file main.h.

#define SURFACE_FLAG_COLKEY_16M   2

Use this when you want a colkey in a true color picture - color should be 0

Definition at line 341 of file main.h.

Typedef Documentation

typedef struct _fire_mode _fire_mode

Fire mode structure

typedef struct hfile_struct hfile_struct

A single help file entry.

Message animation structure. Used when NDI_ANIM is passed to DrawInfoCmd2().

Player's state.

Structure containing Atrinik server certificate information.

typedef struct server_struct server_struct

The servers list, as given by the metaserver.

Enumeration Type Documentation

Player's state.

Enumerator
ST_INIT 

Just initialized the client.

ST_META 

Re-download metaserver list.

ST_START 

Close opened socket if any, prepare for connection.

ST_WAITLOOP 

Waiting to select a server to play on.

ST_STARTCONNECT 

Selected a server, so start the connection procedure.

ST_CONNECT 

Open a connection to the server.

ST_WAITCRYPTO 

Wait for crypto handshake to complete.

ST_START_DATA 

Start sending game data.

ST_WAITVERSION 

Wait for version information from the server.

ST_VERSION 

Server version received.

ST_WAITSETUP 

Wait for setup command from the server.

ST_REQUEST_FILES_LISTING 

Request files listing.

ST_WAITREQUEST_FILES_LISTING 

Wait for files listing request to complete.

ST_REQUEST_FILES 

Request files as necessary.

ST_LOGIN 

Choosing which account to login with.

ST_WAITLOGIN 

Wait for login response.

ST_CHARACTERS 

Choosing which character to play with.

ST_WAITFORPLAY 

Waiting for the relevant data packets to start playing.

ST_PLAY 

Playing.

Definition at line 238 of file main.h.