source: abuse/trunk/src/imlib/visobj.h @ 579

Last change on this file since 579 was 579, checked in by Sam Hocevar, 11 years ago

imlib: refactor the Filter and ColorFilter? classes.

  • Property svn:keywords set to Id
File size: 1.1 KB
RevLine 
[56]1/*
2 *  Abuse - dark 2D side-scrolling platform game
3 *  Copyright (c) 1995 Crack dot Com
[494]4 *  Copyright (c) 2005-2011 Sam Hocevar <sam@hocevar.net>
[56]5 *
6 *  This software was released into the Public Domain. As with most public
[555]7 *  domain software, no warranty is made or implied by Crack dot Com, by
8 *  Jonathan Clark, or by Sam Hocevar.
[56]9 */
10
[2]11#ifndef VIS_OBJECT_HPP
12#define VIS_OBJECT_HPP
13
[481]14#include "jwindow.h"
15#include "filter.h"
[2]16
17class visual_object
18{
19  public :
[579]20  virtual void draw(image *screen, int x, int y, Filter *f) = 0;
[106]21  virtual int width() = 0;
22  virtual int height() = 0;
[494]23  virtual ~visual_object() { }
[2]24} ;
25
26
27
28class image_visual : public visual_object
29{
30  public :
31  image *im;
32
33  image_visual(image *img) { im=img; }
[579]34  virtual void draw(image *screen, int x, int y, Filter *f);
[512]35  virtual int width() { return im->Size().x; }
36  virtual int height() { return im->Size().y; }
[2]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);
[579]47  virtual void draw(image *screen, int x, int y, Filter *f);
[124]48  virtual int width();
[106]49  virtual int height();
[2]50} ;
51
52
53#endif
Note: See TracBrowser for help on using the repository browser.