mirror of
https://bitbucket.org/King_DuckZ/jumping-in-d.git
synced 2024-10-30 02:49:01 +00:00
42 lines
1.1 KiB
D
42 lines
1.1 KiB
D
/* Copyright 2015, Michele Santullo
|
|
* This file is part of "Jumping in D".
|
|
*
|
|
* "Jumping in D" is free software: you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation, either version 3 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* "Jumping in D" is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with "Jumping in D". If not, see <http://www.gnu.org/licenses/>.
|
|
*/
|
|
|
|
module gameobj;
|
|
import derelict.sdl2.sdl;
|
|
|
|
interface GameObj {
|
|
void prepare();
|
|
void destroy();
|
|
void exec();
|
|
bool wants_to_quit() const;
|
|
}
|
|
|
|
class GameObjBase : GameObj {
|
|
public:
|
|
this (SDL_Renderer* parRenderer) {
|
|
m_renderer = parRenderer;
|
|
assert(m_renderer);
|
|
}
|
|
|
|
protected:
|
|
SDL_Renderer* renderer() {
|
|
return m_renderer;
|
|
}
|
|
|
|
private:
|
|
SDL_Renderer* m_renderer;
|
|
}
|