source: abuse/trunk/src/imlib/visobj.hpp @ 106

Last change on this file since 106 was 106, checked in by Sam Hocevar, 11 years ago
  • Rename the "eh" variable to "wm" because it's a window manager, not an event handler.
  • No longer pass the window manager to functions, there's only one.

Inspired by Win32 Abuse changelog for January 28, 2001:

  • Starting work on singleton code; will get rid of all

references to an arbitrary window_manager* because
there's only going to be one, and it's not ever
going to change.

File size: 1.0 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 VIS_OBJECT_HPP
11#define VIS_OBJECT_HPP
12
13#include "jwindow.hpp"
14#include "filter.hpp"
15
16class visual_object
17{
18  public :
19  virtual void draw(image *screen, int x, int y, filter *f) = 0;
20  virtual int width() = 0;
21  virtual int height() = 0;
22  virtual ~visual_object() {}
23} ;
24
25
26
27class image_visual : public visual_object
28{
29  public :
30  image *im;
31
32  image_visual(image *img) { im=img; }
33  virtual void draw(image *screen, int x, int y, filter *f);
34  virtual int width() { return im->width(); }
35  virtual int height() { return im->height(); }
36} ;
37
38
39class string_visual : public visual_object
40{
41  char *st;
42  int color;
43  int w,h;
44  public :
45  string_visual(char *string, int Color);
46  virtual void draw(image *screen, int x, int y, filter *f);
47  virtual int width();
48  virtual int height();
49} ;
50
51
52#endif
Note: See TracBrowser for help on using the repository browser.