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

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

Fuck the history, I'm renaming all .hpp files to .h for my own sanity.

  • Property svn:keywords set to Id
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.h"
14#include "filter.h"
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.