source: abuse/trunk/src/sbar.h @ 682

Last change on this file since 682 was 555, checked in by Sam Hocevar, 9 years ago

ps3: make everything compile on the PS3. Of course, nothing links yet
because so much support is missing.

  • Property svn:keywords set to Id
File size: 1.2 KB
Line 
1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
5 *
6 *  This software was released into the Public Domain. As with most public
7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
9 */
10
11#ifndef __STAT_BAR_H_
12#define __STAT_BAR_H_
13
14
15class view;
16
17#define TOTAL_WEAPONS 8
18#include "image.h"
19
20class status_bar
21{
22  view *v;
23  char need_rf,changed_cursor;
24  int icon_in_selection,currently_selected_weapon;
25
26  int bweap[TOTAL_WEAPONS],   // bright weap image
27      dweap[TOTAL_WEAPONS],   // dark
28      sbar,
29      sbar_select,
30      sbar_numpad,
31      bnum[30];
32
33  void area(int &x1, int &y1, int &x2, int &y2);
34  void draw_num(image *screen, int x, int y, int num, int *offset);
35  int mouse_in_area();
36  public :
37  status_bar();
38  void associate(view *V) { v=V; }
39  void load();                     // load graphics into cache
40  void redraw(image *screen);
41
42  void step();
43  void draw_health(image *screen,int amount);
44  void draw_ammo(image *screen, int weapon_num, int amount, int light);
45  void need_refresh() { need_rf=1; }
46  void draw_update();
47};
48
49extern status_bar sbar;
50
51#endif
Note: See TracBrowser for help on using the repository browser.