source: abuse/trunk/src/imlib/status.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 __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.