|
Crossfire Client, Trunk
R18666
|
#include <assert.h>#include <gtk/gtk.h>#include <glade/glade.h>#include "client.h"#include "main.h"#include "image.h"#include "gtk2proto.h"
Go to the source code of this file.
Data Structures | |
| struct | StatWindow |
Defines | |
| #define | STAT_BAR_HP 0 |
| #define | STAT_BAR_SP 1 |
| #define | STAT_BAR_GRACE 2 |
| #define | STAT_BAR_FOOD 3 |
| #define | STAT_BAR_EXP 4 |
| #define | MAX_STAT_BARS 5 |
| #define | STYLE_NORMAL 0 |
| #define | STYLE_LOW 1 |
| #define | STYLE_SUPER 2 |
| #define | STYLE_GRAD_NORMAL 3 |
| #define | STYLE_GRAD_LOW 4 |
| #define | STYLE_GRAD_SUPER 5 |
| #define | NUM_STYLES 6 |
| #define | SKILL_BOXES_X 6 |
| #define | SKILL_BOXES_Y 17 |
| #define | PROTECTION_BOXES_X 6 |
| #define | PROTECTION_BOXES_Y 6 |
Functions | |
| void | stats_get_styles (void) |
| void | stats_init (GtkWidget *window_root) |
| void | update_stat (int stat_no, sint64 max_stat, sint64 current_stat, sint64 statbar_max, sint64 statbar_stat, int can_alert) |
| void | draw_message_window (int redraw) |
| void | draw_stats (int redraw) |
| void | clear_stat_mapping (void) |
Variables | |
| const char *const | rcsid_gtk2_stats_c = "$Id: stats.c 14240 2011-01-12 06:31:21Z mwedel $" |
| GdkColor * | bar_colors [MAX_STAT_BARS][NUM_STYLES] |
| int | need_mapping_update = 1 |
Support for character statistics.
Definition in file stats.c.
| #define MAX_STAT_BARS 5 |
| #define NUM_STYLES 6 |
| #define PROTECTION_BOXES_X 6 |
| #define PROTECTION_BOXES_Y 6 |
| #define SKILL_BOXES_X 6 |
| #define SKILL_BOXES_Y 17 |
| #define STAT_BAR_EXP 4 |
| #define STAT_BAR_FOOD 3 |
| #define STAT_BAR_GRACE 2 |
| #define STAT_BAR_HP 0 |
| #define STAT_BAR_SP 1 |
| #define STYLE_GRAD_LOW 4 |
| #define STYLE_GRAD_NORMAL 3 |
| #define STYLE_GRAD_SUPER 5 |
| #define STYLE_NORMAL 0 |
| #define STYLE_SUPER 2 |
| void clear_stat_mapping | ( | void | ) |
| void draw_message_window | ( | int | redraw | ) |
| void draw_stats | ( | int | redraw | ) |
| void stats_get_styles | ( | void | ) |
| void stats_init | ( | GtkWidget * | window_root | ) |
| void update_stat | ( | int | stat_no, |
| sint64 | max_stat, | ||
| sint64 | current_stat, | ||
| sint64 | statbar_max, | ||
| sint64 | statbar_stat, | ||
| int | can_alert | ||
| ) |
Updates the stat bar and text display as it pertains to a specific stat.
| stat_no | The stat number to update. |
| max_stat | The normal maximum value this stat can have. Note that within game terms, the actual value can go above this via supercharging stats. |
| current_stat | current value of the stat. |
| statbar_max | |
| statbar_stat | this is the stat value to use for drawing the statbar. For most stats, this is same as current stat, but for the exp bar, we basically want it to be a graph relative to amount for next level. |
| can_alert | Whether this stat can go on alert when it gets low. It doesn't make sense for this to happen on exp (not really an alert if you gain a level). Note: This is no longer used with the new style code - if a stat shouldn't ever change color when it is low, the style should dictate that. |
Definition at line 284 of file stats.c.

| GdkColor* bar_colors[MAX_STAT_BARS][NUM_STYLES] |
| int need_mapping_update = 1 |
| const char* const rcsid_gtk2_stats_c = "$Id: stats.c 14240 2011-01-12 06:31:21Z mwedel $" |
1.7.6.1