]> git.jsancho.org Git - dungeon-master.git/blob - src/main.cpp
Modules reorganization
[dungeon-master.git] / src / main.cpp
1 /* Dungeon Master --- RPG Adventure Generator
2    Copyright © 2019 Javier Sancho <jsf@jsancho.org>
3
4    Dungeon Master is free software; you can redistribute it and/or modify it
5    under the terms of the GNU General Public License as published by
6    the Free Software Foundation; either version 3 of the License, or
7    (at your option) any later version.
8
9    Dungeon Master is distributed in the hope that it will be useful, but
10    WITHOUT ANY WARRANTY; without even the implied warranty of
11    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
12    General Public License for more details.
13
14    You should have received a copy of the GNU General Public License
15    along with Dungeon Master. If not, see <http://www.gnu.org/licenses/>.
16 */
17
18 #include <irrlicht/irrlicht.h>
19 #include "modules.h"
20
21 using namespace irr;
22 using namespace core;
23 using namespace video;
24 using namespace gui;
25
26 int
27 main ()
28 {
29   load_dmaster_modules ();
30
31   IrrlichtDevice* device =
32     createDevice (video::EDT_OPENGL, core::dimension2d<u32> (640, 480));
33
34   if (!device)
35     return 1;
36
37   device->setWindowCaption (L"Dungeon Master");
38
39   IVideoDriver* driver = device->getVideoDriver ();
40   IGUIEnvironment* guienv = device->getGUIEnvironment ();
41
42   guienv->addStaticText (L"Aqui va el texto", rect<s32> (10, 10, 260, 22));
43
44   while (device->run ())
45     {
46       driver->beginScene (true, true, SColor(255, 100, 101, 140));
47       guienv->drawAll ();
48       driver->endScene ();
49     }
50
51   device->drop ();
52   return 0;
53 }