19 |
#include "editor.hh" |
#include "editor.hh" |
20 |
#include "world.hh" |
#include "world.hh" |
21 |
#include "lua.hh" |
#include "lua.hh" |
22 |
|
#include "px/sdl.hh" |
23 |
#include <iostream> |
#include <iostream> |
24 |
|
|
25 |
using namespace std; |
using namespace std; |
133 |
//====================================================================== |
//====================================================================== |
134 |
// THE EDITOR |
// THE EDITOR |
135 |
//====================================================================== |
//====================================================================== |
136 |
|
namespace |
137 |
|
{ |
138 |
|
class Editor : sdl::EventHandler { |
139 |
|
public: |
140 |
|
Editor(); |
141 |
|
~Editor(); |
142 |
|
|
143 |
|
void run(); |
144 |
|
private: |
145 |
|
// Private methods. |
146 |
|
|
147 |
|
// EventHandler interface. |
148 |
|
bool on_mousemotion(SDL_Event &e); |
149 |
|
bool on_mousedown(SDL_Event &e); |
150 |
|
bool on_keydown(SDL_Event &e); |
151 |
|
|
152 |
|
// Variables. |
153 |
|
}; |
154 |
|
} |
155 |
|
|
156 |
|
Editor::Editor() |
157 |
|
{} |
158 |
|
|
159 |
|
Editor::~Editor() |
160 |
|
{} |
161 |
|
|
162 |
|
void |
163 |
|
Editor::run() |
164 |
|
{ |
165 |
|
} |
166 |
|
|
167 |
|
bool Editor::on_mousemotion(SDL_Event &e) |
168 |
|
{ |
169 |
|
return false; |
170 |
|
} |
171 |
|
|
172 |
|
bool Editor::on_mousedown(SDL_Event &e) |
173 |
|
{ |
174 |
|
return false; |
175 |
|
} |
176 |
|
|
177 |
|
bool Editor::on_keydown(SDL_Event &e) |
178 |
|
{ |
179 |
|
return false; |
180 |
|
} |
181 |
|
|
182 |
|
|
183 |
|
|
184 |
void |
void |
185 |
editor::Run() |
editor::Run() |
186 |
{ |
{ |
187 |
lua::Dofile("editor.lua"); |
lua::Dofile("editor.lua"); |
188 |
|
Editor e; |
189 |
|
e.run(); |
190 |
} |
} |