add support to SDLBackend for rendering 24bit data
[openc2e.git] / renderable.h
bloba0c6d659e80c46a54469e0be4896039391a14b2d
1 /*
2 * renderable.h
3 * openc2e
5 * Created by Alyssa Milburn on Thu Dec 29 2005.
6 * Copyright (c) 2005 Alyssa Milburn. All rights reserved.
8 * This library is free software; you can redistribute it and/or
9 * modify it under the terms of the GNU Lesser General Public
10 * License as published by the Free Software Foundation; either
11 * version 2 of the License, or (at your option) any later version.
13 * This library is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 * Lesser General Public License for more details.
20 #ifndef _RENDERABLE_H
21 #define _RENDERABLE_H
23 #include <set>
25 struct renderablezorder {
26 bool operator()(const class renderable *s1, const class renderable *s2) const;
29 class renderable {
30 protected:
31 bool added;
32 std::multiset<renderable *, renderablezorder>::iterator renders_iter;
34 public:
35 renderable() { added = false; }
36 virtual void render(class Surface *renderer, int xoffset, int yoffset) = 0;
37 virtual bool showOnRemoteCameras() { return true; }
38 virtual unsigned int getZOrder() const = 0;
39 virtual void zapZOrder();
40 virtual void addZOrder();
41 virtual ~renderable();
44 #endif
45 /* vim: set noet: */