source: abuse/tags/pd/abuse/inc/sbar.hpp @ 608

Last change on this file since 608 was 49, checked in by Sam Hocevar, 15 years ago
  • Imported original public domain release, for future reference.
File size: 898 bytes
RevLine 
[49]1#ifndef __STAT_BAR_H_
2#define __STAT_BAR_H_
3
4
5class view;
6
7#define TOTAL_WEAPONS 8
8#include "image.hpp"
9
10class status_bar
11{
12  view *v;
13  char need_rf,changed_cursor;
14  int icon_in_selection,currently_selected_weapon;
15
16  int bweap[TOTAL_WEAPONS],   // bright weap image
17      dweap[TOTAL_WEAPONS],   // dark
18      sbar,
19      sbar_select,
20      sbar_numpad,
21      bnum[30];
22
23  void area(int &x1, int &y1, int &x2, int &y2);
24  void draw_num(image *screen, int x, int y, int num, int *offset);
25  int mouse_in_area();
26  public :
27  status_bar();
28  void associate(view *V) { v=V; }
29  void load();                     // load graphics into cache
30  void redraw(image *screen);
31
32  void step();
33  void draw_health(image *screen,int amount);
34  void draw_ammo(image *screen, int weapon_num, int amount, int light);
35  void need_refresh() { need_rf=1; }
36  void draw_update();
37};
38
39extern status_bar sbar;
40
41#endif
Note: See TracBrowser for help on using the repository browser.