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

Go to the source code of this file.

Macros

#define PLAYER_DOLL_TEXT_RENDER(flags, box)
 

Functions

objectplayerdoll_get_equipment (int i, int *xpos, int *ypos)
 
static void widget_draw (widgetdata *widget)
 
static int widget_event (widgetdata *widget, SDL_Event *event)
 
void widget_playerdoll_init (widgetdata *widget)
 

Variables

static int player_doll_positions [PLAYER_EQUIP_MAX][2]
 
static const char * player_doll_text
 
static const char * player_doll_text_abbr
 

Detailed Description

Implements player doll type widgets.

Author
Alex Tokar

Definition in file playerdoll.c.

Macro Definition Documentation

#define PLAYER_DOLL_TEXT_RENDER (   flags,
  box 
)
Value:
text_show_format(widget->surface, FONT_ARIAL10, 10, 10, COLOR_HGOLD, \
TEXT_MARKUP | flags, box, text, \
cpl.stats.Str, cpl.stats.Dex, cpl.stats.Con, \
cpl.stats.Int, cpl.stats.Pow, \
int16_t ac
Definition: player.h:60
int16_t dam
Definition: player.h:84
float speed
Definition: player.h:87
Stats stats
Definition: player.h:167
#define COLOR_HGOLD
Definition: text.h:319
#define TEXT_MARKUP
Definition: text.h:224
int16_t ranged_wc
Definition: player.h:102
float weapon_speed
Definition: player.h:90
Client_Player cpl
Definition: client.c:50
int16_t wc
Definition: player.h:57
void text_show_format(SDL_Surface *surface, font_struct *font, int x, int y, const char *color_notation, uint64_t flags, SDL_Rect *box, const char *format,...)
Definition: text.c:2289
int16_t ranged_dam
Definition: player.h:99
float ranged_ws
Definition: player.h:105

Definition at line 102 of file playerdoll.c.

Function Documentation

static void widget_draw ( widgetdata widget)
static

Definition at line 155 of file playerdoll.c.

static int widget_event ( widgetdata widget,
SDL_Event *  event 
)
static

Definition at line 227 of file playerdoll.c.

Variable Documentation

int player_doll_positions[PLAYER_EQUIP_MAX][2]
static
Initial value:
= {
{22, 44},
{22, 6},
{22, 82},
{102, 82},
{102, 120},
{22, 158},
{62, 6},
{62, 44},
{62, 82},
{62, 120},
{62, 158},
{102, 6},
{102, 44},
{22, 82},
{22, 120},
{102, 158},
{-1, -1}
}

Player doll item positions.

Used to determine where to put item sprites on the player doll.

Definition at line 40 of file playerdoll.c.

const char* player_doll_text
static
Initial value:
=
"[center][font=sans 12][b]Statistics[/b][/font][/center]\n"
"Strength[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Dexterity[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Constitution[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Intelligence[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Power[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Speed[c=#ffffff][right][font=mono]%3.2f[/font][/right][/c]\n"
"Armour class[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"[y=4][center][font=sans 12][b]Melee[/b][/font][/center]\n"
"Damage[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Weapon class[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Weapon speed[c=#ffffff][right][font=mono]%3.2fs[/font][/right][/c]\n"
"[y=4][center][font=sans 12][b]Ranged[/b][/font][/center]\n"
"Damage[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Weapon class[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Weapon speed[c=#ffffff][right][font=mono]%3.2fs[/font][/right][/c]\n"

Text used in the player doll.

Definition at line 63 of file playerdoll.c.

const char* player_doll_text_abbr
static
Initial value:
=
"[center][font=sans 12][b]Stats[/b][/font][/center]\n"
"Str[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Dex[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Con[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Int[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Pow[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"Speed[c=#ffffff][right][font=mono]%3.2f[/font][/right][/c]\n"
"AC[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"[y=4][center][font=sans 12][b]Melee[/b][/font][/center]\n"
"DMG[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"WC[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"WS[c=#ffffff][right][font=mono]%3.2fs[/font][/right][/c]\n"
"[y=4][center][font=sans 12][b]Ranged[/b][/font][/center]\n"
"DMG[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"WC[c=#ffffff][right][font=mono]%02d[/font][/right][/c]\n"
"WS[c=#ffffff][right][font=mono]%3.2fs[/font][/right][/c]\n"

Same as above, except with abbreviations to conserve horizontal space.

Definition at line 84 of file playerdoll.c.