* added files missed in prev. commit. thx bLuma!
This commit is contained in:
parent
87f708a0fd
commit
7336fbe70f
18
src/Client/GUI/Scene.cpp
Normal file
18
src/Client/GUI/Scene.cpp
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "PseuGUI.h"
|
||||||
|
#include "PseuWoW.h"
|
||||||
|
#include "Scene.h"
|
||||||
|
|
||||||
|
Scene::Scene(PseuGUI *g)
|
||||||
|
{
|
||||||
|
gui = g;
|
||||||
|
device = gui->_device;
|
||||||
|
driver = gui->_driver;
|
||||||
|
smgr = gui->_smgr;
|
||||||
|
guienv = gui->_guienv;
|
||||||
|
}
|
||||||
|
|
||||||
|
void Scene::Draw(void)
|
||||||
|
{
|
||||||
|
device->yield();
|
||||||
|
}
|
||||||
50
src/Client/GUI/Scene.h
Normal file
50
src/Client/GUI/Scene.h
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
#ifndef _SCENE_H
|
||||||
|
#define _SCENE_H
|
||||||
|
|
||||||
|
#include "irrlicht/irrlicht.h"
|
||||||
|
|
||||||
|
using namespace irr;
|
||||||
|
using namespace core;
|
||||||
|
using namespace scene;
|
||||||
|
using namespace video;
|
||||||
|
using namespace io;
|
||||||
|
using namespace gui;
|
||||||
|
|
||||||
|
class PseuGUI;
|
||||||
|
|
||||||
|
// base class
|
||||||
|
class Scene
|
||||||
|
{
|
||||||
|
friend class PseuGUI;
|
||||||
|
public:
|
||||||
|
Scene(PseuGUI *g);
|
||||||
|
virtual void Draw(void);
|
||||||
|
protected:
|
||||||
|
PseuGUI *gui;
|
||||||
|
irr::IrrlichtDevice *device;
|
||||||
|
irr::video::IVideoDriver* driver;
|
||||||
|
irr::scene::ISceneManager* smgr;
|
||||||
|
irr::gui::IGUIEnvironment* guienv;
|
||||||
|
};
|
||||||
|
|
||||||
|
class SceneGuiStart : public Scene
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SceneGuiStart(PseuGUI *gui);
|
||||||
|
~SceneGuiStart();
|
||||||
|
private:
|
||||||
|
IGUIImage *irrlogo, *driverlogo;
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
class SceneWorld : public Scene
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
SceneWorld(PseuGUI *gui);
|
||||||
|
~SceneWorld();
|
||||||
|
void Draw(void);
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#endif
|
||||||
34
src/Client/GUI/SceneGuiStart.cpp
Normal file
34
src/Client/GUI/SceneGuiStart.cpp
Normal file
@ -0,0 +1,34 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "PseuGUI.h"
|
||||||
|
#include "PseuWoW.h"
|
||||||
|
#include "Scene.h"
|
||||||
|
|
||||||
|
|
||||||
|
SceneGuiStart::SceneGuiStart(PseuGUI *gui) : Scene(gui)
|
||||||
|
{
|
||||||
|
|
||||||
|
irrlogo = guienv->addImage(driver->getTexture("data/misc/irrlichtlogo.png"), core::position2d<s32>(5,5));
|
||||||
|
char *fn;
|
||||||
|
switch(gui->_driverType)
|
||||||
|
{
|
||||||
|
case DIRECTX8:
|
||||||
|
case DIRECTX9:
|
||||||
|
fn = "data/misc/directxlogo.png";
|
||||||
|
break;
|
||||||
|
|
||||||
|
case OPENGL:
|
||||||
|
fn = "data/misc/opengllogo.png";
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
fn = "data/misc/burninglogo.png";
|
||||||
|
}
|
||||||
|
driverlogo = guienv->addImage(driver->getTexture(fn), core::position2d<s32>(50,50));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SceneGuiStart::~SceneGuiStart()
|
||||||
|
{
|
||||||
|
irrlogo->drop();
|
||||||
|
driverlogo->drop();
|
||||||
|
}
|
||||||
23
src/Client/GUI/SceneWorld.cpp
Normal file
23
src/Client/GUI/SceneWorld.cpp
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
#include "common.h"
|
||||||
|
#include "PseuGUI.h"
|
||||||
|
#include "PseuWoW.h"
|
||||||
|
#include "Scene.h"
|
||||||
|
|
||||||
|
SceneWorld::SceneWorld(PseuGUI *g) : Scene(g)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
void SceneWorld::Draw(void)
|
||||||
|
{
|
||||||
|
// draw maps here
|
||||||
|
|
||||||
|
// draw all objects
|
||||||
|
gui->domgr.Update(); // iterate over DrawObjects, draw them and clean up
|
||||||
|
|
||||||
|
// draw interface here
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
SceneWorld::~SceneWorld()
|
||||||
|
{
|
||||||
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user