Atrinik Client 2.5
Data Structures | Defines | Typedefs | Enumerations | Variables
include/client.h File Reference

Go to the source code of this file.

Data Structures

struct  Animations
struct  _anim_table
struct  command_buffer
struct  SockList
struct  ClientSocket
struct  Stat_struct
struct  Player_Struct

Defines

#define WINDOW_DEFAULT_WIDTH   1024
#define WINDOW_DEFAULT_HEIGHT   768
#define MAX_SKILL   6
#define FFLAG_SLEEP   0x01
#define FFLAG_CONFUSED   0x02
#define FFLAG_PARALYZED   0x04
#define FFLAG_SCARED   0x08
#define FFLAG_BLINDED   0x10
#define FFLAG_INVISIBLE   0x20
#define INPUT_MODE_NO   0
#define INPUT_MODE_CONSOLE   1
#define INPUT_MODE_NUMBER   2
#define NUM_MODE_GET   1
#define NUM_MODE_DROP   2
#define SOCKET_TIMEOUT_MS   4000
#define FLOAT_MULTI   100000
#define FLOAT_MULTF   100000.0
#define CS_STAT_HP   1
#define CS_STAT_MAXHP   2
#define CS_STAT_SP   3
#define CS_STAT_MAXSP   4
#define CS_STAT_STR   5
#define CS_STAT_INT   6
#define CS_STAT_WIS   7
#define CS_STAT_DEX   8
#define CS_STAT_CON   9
#define CS_STAT_CHA   10
#define CS_STAT_EXP   11
#define CS_STAT_LEVEL   12
#define CS_STAT_WC   13
#define CS_STAT_AC   14
#define CS_STAT_DAM   15
#define CS_STAT_ARMOUR   16
#define CS_STAT_SPEED   17
#define CS_STAT_FOOD   18
#define CS_STAT_WEAP_SP   19
#define CS_STAT_RANGE   20
#define CS_STAT_TITLE   21
#define CS_STAT_POW   22
#define CS_STAT_GRACE   23
#define CS_STAT_MAXGRACE   24
#define CS_STAT_FLAGS   25
#define CS_STAT_WEIGHT_LIM   26
#define CS_STAT_EXT_TITLE   27
#define CS_STAT_REG_HP   28
#define CS_STAT_REG_MANA   29
#define CS_STAT_REG_GRACE   30
#define CS_STAT_TARGET_HP   31
#define CS_STAT_ACTION_TIME   36
#define CS_STAT_RANGED_DAM   37
#define CS_STAT_RANGED_WC   38
#define CS_STAT_RANGED_WS   39
#define CS_STAT_RESIST_START   100
#define CS_STAT_RESIST_END   117
#define CS_STAT_RES_PHYS   100
#define CS_STAT_RES_MAG   101
#define CS_STAT_RES_FIRE   102
#define CS_STAT_RES_ELEC   103
#define CS_STAT_RES_COLD   104
#define CS_STAT_RES_CONF   105
#define CS_STAT_RES_ACID   106
#define CS_STAT_RES_DRAIN   107
#define CS_STAT_RES_GHOSTHIT   108
#define CS_STAT_RES_POISON   109
#define CS_STAT_RES_SLOW   110
#define CS_STAT_RES_PARA   111
#define CS_STAT_TURN_UNDEAD   112
#define CS_STAT_RES_FEAR   113
#define CS_STAT_RES_DEPLETE   114
#define CS_STAT_RES_DEATH   115
#define CS_STAT_RES_HOLYWORD   116
#define CS_STAT_RES_BLIND   117
#define CS_STAT_SKILLEXP_START   118
#define CS_STAT_SKILLEXP_END   129
#define CS_STAT_SKILLEXP_AGILITY   118
#define CS_STAT_SKILLEXP_AGLEVEL   119
#define CS_STAT_SKILLEXP_PERSONAL   120
#define CS_STAT_SKILLEXP_PELEVEL   121
#define CS_STAT_SKILLEXP_MENTAL   122
#define CS_STAT_SKILLEXP_MELEVEL   123
#define CS_STAT_SKILLEXP_PHYSIQUE   124
#define CS_STAT_SKILLEXP_PHLEVEL   125
#define CS_STAT_SKILLEXP_MAGIC   126
#define CS_STAT_SKILLEXP_MALEVEL   127
#define CS_STAT_SKILLEXP_WISDOM   128
#define CS_STAT_SKILLEXP_WILEVEL   129
#define CS_STAT_PROT_START   130
#define CS_STAT_PROT_END   149
#define CS_STAT_PROT_HIT   130
#define CS_STAT_PROT_SLASH   131
#define CS_STAT_PROT_CLEAVE   132
#define CS_STAT_PROT_PIERCE   133
#define CS_STAT_PROT_WMAGIC   134
#define CS_STAT_PROT_FIRE   135
#define CS_STAT_PROT_COLD   136
#define CS_STAT_PROT_ELEC   137
#define CS_STAT_PROT_POISON   138
#define CS_STAT_PROT_ACID   139
#define CS_STAT_PROT_MAGIC   140
#define CS_STAT_PROT_MIND   141
#define CS_STAT_PROT_BODY   142
#define CS_STAT_PROT_PSIONIC   143
#define CS_STAT_PROT_ENERGY   144
#define CS_STAT_PROT_NETHER   145
#define CS_STAT_PROT_CHAOS   146
#define CS_STAT_PROT_DEATH   147
#define CS_STAT_PROT_HOLY   148
#define CS_STAT_PROT_CORRUPT   149
#define SF_FIREON   1
#define SF_RUNON   2
#define SF_BLIND   4
#define SF_XRAYS   8
#define SF_INFRAVISION   16
#define NDI_SAY   0x0100
#define NDI_SHOUT   0x0200
#define NDI_TELL   0x0400
#define NDI_PLAYER   0x0800
#define NDI_EMOTE   0x01000
#define NDI_ANIM   0x02000
#define F_APPLIED   0x000F
#define F_LOCATION   0x00F0
#define F_UNPAID   0x0200
#define F_MAGIC   0x0400
#define F_CURSED   0x0800
#define F_DAMNED   0x1000
#define F_OPEN   0x2000
#define F_NOPICK   0x4000
#define F_LOCKED   0x8000
#define F_TRAPPED   0x10000
#define UPD_LOCATION   0x01
#define UPD_FLAGS   0x02
#define UPD_WEIGHT   0x04
#define UPD_FACE   0x08
#define UPD_NAME   0x10
#define UPD_ANIM   0x20
#define UPD_ANIMSPEED   0x40
#define UPD_NROF   0x80
#define UPD_DIRECTION   0x100
#define MAP_UPDATE_CMD_SAME   0
#define MAP_UPDATE_CMD_NEW   1
#define MAP_UPDATE_CMD_CONNECTED   2
#define MAP2_FLAG_MULTI   1
#define MAP2_FLAG_NAME   2
#define MAP2_FLAG_PROBE   4
#define MAP2_FLAG_HEIGHT   8
#define MAP2_FLAG_ZOOM   16
#define MAP2_FLAG_ALIGN   32
#define MAP2_FLAG_DOUBLE   64
#define MAP2_FLAG_MORE   128
#define MAP2_FLAG2_ALPHA   1
#define MAP2_FLAG2_ROTATE   2
#define MAP2_FLAG2_INFRAVISION   4
#define MAP2_FLAG_EXT_ANIM   1
#define MAP2_MASK_CLEAR   0x2
#define MAP2_MASK_DARKNESS   0x4
#define MAP2_LAYER_CLEAR   255
#define CMD_QUICKSLOT_SET   1
#define CMD_QUICKSLOT_SETSPELL   2
#define CMD_QUICKSLOT_UNSET   3
#define QUICKSLOT_TYPE_ITEM   1
#define QUICKSLOT_TYPE_SPELL   2
#define CMD_SOUND_EFFECT   1
#define CMD_SOUND_BACKGROUND   2
#define CMD_SOUND_ABSOLUTE   3
#define CMD_MAPSTATS_NAME   1
#define CMD_MAPSTATS_MUSIC   2
#define CMD_MAPSTATS_WEATHER   3
#define KEYWORD_IS_TRUE(_keyword)   (!strcmp((_keyword), "yes") || !strcmp((_keyword), "on") || !strcmp((_keyword), "true"))
#define KEYWORD_IS_FALSE(_keyword)   (!strcmp((_keyword), "no") || !strcmp((_keyword), "off") || !strcmp((_keyword), "false"))

Typedefs

typedef struct Animations Animations
typedef struct _anim_table _anim_table
typedef struct command_buffer command_buffer
typedef struct SockList SockList
typedef struct ClientSocket ClientSocket
typedef struct Stat_struct Stats
typedef enum _inventory_win _inventory_win
typedef struct Player_Struct Client_Player

Enumerations

enum  _inventory_win { IWIN_BELOW, IWIN_INV }

Variables

_anim_tableanim_table
Animationsanimations
size_t animations_num
ClientSocket csocket
Client_Player cpl

Detailed Description

Various defines.

Definition in file client.h.


Define Documentation

#define KEYWORD_IS_FALSE (   _keyword)    (!strcmp((_keyword), "no") || !strcmp((_keyword), "off") || !strcmp((_keyword), "false"))

Check if the keyword represents a false value.

Definition at line 613 of file client.h.

#define KEYWORD_IS_TRUE (   _keyword)    (!strcmp((_keyword), "yes") || !strcmp((_keyword), "on") || !strcmp((_keyword), "true"))

Check if the keyword represents a true value.

Definition at line 611 of file client.h.

#define NDI_ANIM   0x02000

Message will be played as animation in the middle of the client screen.

Definition at line 474 of file client.h.

#define NDI_EMOTE   0x01000

Message is an emote command.

Definition at line 470 of file client.h.

#define NDI_PLAYER   0x0800

This message comes from a player

Definition at line 468 of file client.h.

#define NDI_SAY   0x0100

Say command

Definition at line 462 of file client.h.

#define NDI_SHOUT   0x0200

The message is a shout

Definition at line 464 of file client.h.

#define NDI_TELL   0x0400

The message is a tell

Definition at line 466 of file client.h.

#define SOCKET_TIMEOUT_MS   4000

Timeout when attempting a connection in milliseconds.

Definition at line 94 of file client.h.

#define WINDOW_DEFAULT_HEIGHT   768

Default height.

Definition at line 33 of file client.h.

#define WINDOW_DEFAULT_WIDTH   1024

Default width.

Definition at line 31 of file client.h.


Typedef Documentation

typedef struct Player_Struct Client_Player

The player structure.

One command buffer.

typedef struct SockList SockList

Contains the base information we use to make up a packet we want to send.


Variable Documentation

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

Definition at line 65 of file main.c.

Number of animations.

Definition at line 68 of file main.c.

Client player structure with things like stats, damage, etc

Definition at line 47 of file client.c.

Client socket

Client socket.

Definition at line 50 of file client.c.