source: abuse/trunk/src/imlib/status.hpp @ 90

Last change on this file since 90 was 57, checked in by Sam Hocevar, 12 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.2 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 __STATUS_HPP_
11#define __STATUS_HPP_
12
13#include "visobj.hpp"      // get visual object declaration
14
15
16class status_manager
17{
18  public :
19  virtual void push(char const *name, visual_object *show) = 0;
20  virtual void update(int percentage) = 0;
21  virtual void pop() = 0;
22  virtual void force_display() { ; }
23  virtual ~status_manager() {}
24} ;
25
26
27class text_status_node;
28
29class text_status_manager : public status_manager
30{
31  public :
32  int level;
33  text_status_node *first;
34  text_status_manager();
35  virtual void push(char const *name, visual_object *show);
36  virtual void update(int percentage);
37  virtual void pop();
38} ;
39
40
41extern status_manager *stat_man;
42
43class stack_stat  // something you can declare on the stact that is sure to get cleaned up
44{
45  public :
46  stack_stat(char const *st, visual_object *show=NULL) { if (stat_man) stat_man->push(st,show); }
47  ~stack_stat() { if (stat_man) stat_man->pop(); }
48} ;
49
50
51#endif
52
Note: See TracBrowser for help on using the repository browser.