Last change
on this file since 549 was
512,
checked in by Sam Hocevar, 12 years ago
|
imlib: use vec2i for image::size and unroll all necessary changes
everywhere else in the code.
|
-
Property svn:keywords set to
Id
|
File size:
1.1 KB
|
Rev | Line | |
---|
[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 |
---|
| 7 | * domain software, no warranty is made or implied by Crack dot Com or |
---|
| 8 | * Jonathan Clark. |
---|
| 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 | |
---|
| 17 | class visual_object |
---|
| 18 | { |
---|
| 19 | public : |
---|
[106] | 20 | virtual void draw(image *screen, int x, int y, filter *f) = 0; |
---|
| 21 | virtual int width() = 0; |
---|
| 22 | virtual int height() = 0; |
---|
[494] | 23 | virtual ~visual_object() { } |
---|
[2] | 24 | } ; |
---|
| 25 | |
---|
| 26 | |
---|
| 27 | |
---|
| 28 | class image_visual : public visual_object |
---|
| 29 | { |
---|
| 30 | public : |
---|
| 31 | image *im; |
---|
| 32 | |
---|
| 33 | image_visual(image *img) { im=img; } |
---|
[106] | 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 | |
---|
| 40 | class 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); |
---|
[106] | 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.