source: abuse/trunk/src/imlib/status.h @ 494

Last change on this file since 494 was 494, checked in by Sam Hocevar, 12 years ago

style: remove trailing spaces, fix copyright statements.

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