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

Last change on this file since 57 was 57, checked in by Sam Hocevar, 15 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 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, window_manager *wm, filter *f) = 0;
20  virtual int width(window_manager *wm) = 0;
21  virtual int height(window_manager *wm) = 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,
34                    window_manager *wm, filter *f);
35  virtual int width(window_manager *wm) { return im->width(); }
36  virtual int height(window_manager *wm) { return im->height(); }
37} ;
38
39
40class string_visual : public visual_object
41{
42  char *st;
43  int color;
44  int w,h;
45  public :
46  string_visual(char *string, int Color);
47  virtual void draw(image *screen, int x, int y,
48                    window_manager *wm, filter *f);
49  virtual int width(window_manager *wm);
50  virtual int height(window_manager *wm);
51} ;
52
53
54#endif
Note: See TracBrowser for help on using the repository browser.