source: abuse/trunk/src/sbar.hpp @ 112

Last change on this file since 112 was 57, checked in by Sam Hocevar, 11 years ago
  • Move each header to the same directory as its corresponding source, to get a better idea of which files are likely to export symbols.
File size: 1.1 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *
5 *  This software was released into the Public Domain. As with most public
6 *  domain software, no warranty is made or implied by Crack dot Com or
7 *  Jonathan Clark.
8 */
9
10#ifndef __STAT_BAR_H_
11#define __STAT_BAR_H_
12
13
14class view;
15
16#define TOTAL_WEAPONS 8
17#include "image.hpp"
18
19class status_bar
20{
21  view *v;
22  char need_rf,changed_cursor;
23  int icon_in_selection,currently_selected_weapon;
24
25  int bweap[TOTAL_WEAPONS],   // bright weap image
26      dweap[TOTAL_WEAPONS],   // dark
27      sbar,
28      sbar_select,
29      sbar_numpad,
30      bnum[30];
31
32  void area(int &x1, int &y1, int &x2, int &y2);
33  void draw_num(image *screen, int x, int y, int num, int *offset);
34  int mouse_in_area();
35  public :
36  status_bar();
37  void associate(view *V) { v=V; }
38  void load();                     // load graphics into cache
39  void redraw(image *screen);
40
41  void step();
42  void draw_health(image *screen,int amount);
43  void draw_ammo(image *screen, int weapon_num, int amount, int light);
44  void need_refresh() { need_rf=1; }
45  void draw_update();
46};
47
48extern status_bar sbar;
49
50#endif
Note: See TracBrowser for help on using the repository browser.