[DEV] game engine start to work

This commit is contained in:
Edouard DUPIN 2013-08-13 22:10:31 +02:00
parent 2c3084c794
commit 926bbe6b3d
6 changed files with 20 additions and 41 deletions

View File

@ -42,6 +42,7 @@ ege::ElementGame::ElementGame(ege::Environement& _env) :
m_lifeMax(100),
m_group(0),
m_fixe(true),
m_radius(0),
m_elementInPhysicsSystem(false)
{
static uint32_t unique=0;

View File

@ -188,6 +188,17 @@ namespace ege
* @return true : The element is fixed.
*/
inline bool IsFixed(void) { return m_fixe; };
protected:
float m_radius; //!< Radius of the element (all element have a radius, if ==0 ==> then ghost ...
public:
/**
* @brief Get the current space needed by the element in the workspace
* @return The dimention needed.
*/
inline float GetRadius(void)
{
return m_radius;
};
protected:
bool m_elementInPhysicsSystem;
public:

View File

@ -78,46 +78,8 @@ ege::Scene::Scene(void) :
m_dynamicsWorld->setGravity(btVector3(0,0,0));
m_env.SetDynamicWorld(m_dynamicsWorld);
// Add debug display :
ege::ElementGame* tmpElement = NULL;
// SET THE STATION ..
m_camera.SetEye(vec3(0,0,0));
/*
tmpElement = appl::env::GetCreatorList().CreateElement("Station", "(0,0,0)");
if (NULL != tmpElement) {
appl::env::AddElementGame(tmpElement);
tmpElement = NULL;
}
// for the debug :
for (int32_t iii=0; iii<appl::env::GetGird().GetNumberElementInMap(); iii++) {
int32_t typeID = appl::env::GetGird().GetElementType(iii);
char tmppp[256];
vec3 posss = appl::env::GetGird().GetElementPos(iii);
sprintf(tmppp, "(%f,%f,%f)", posss.x(), posss.y(), posss.z());
if (GIRD_ID_GENERATOR==typeID) {
tmpElement = appl::env::GetCreatorList().CreateElement("MonsterGenerator", tmppp);
if (NULL != tmpElement) {
m_env.AddElementGame(tmpElement);
tmpElement = NULL;
}
}
if (GIRD_ID_TOWER==typeID) {
tmpElement = appl::env::GetCreatorList().CreateElement("Tower1", tmppp);
if (NULL != tmpElement) {
m_env.AddElementGame(tmpElement);
tmpElement = NULL;
}
}
if (GIRD_ID_METEOR==typeID) {
tmpElement = appl::env::GetCreatorList().CreateElement("Meteor", tmppp);
if (NULL != tmpElement) {
m_env.AddElementGame(tmpElement);
tmpElement = NULL;
}
}
}
*/
}

View File

@ -80,6 +80,7 @@ namespace ege {
ewol::Colored3DObject* m_debugDrawing; //!< for the debug draw elements
// Note : This is only for temporary elements : on the display
etk::Vector<ege::Environement::ResultNearestElement> m_displayElementOrdered;
public:
/**
* @brief Set the scene in pause for a while
*/
@ -124,7 +125,7 @@ namespace ege {
protected: // Derived function
virtual void OnDraw(void);
public: // Derived function
virtual const char * const GetObjectType(void) { return "appl::Game"; };
virtual const char * const GetObjectType(void) { return "ege::Scene"; };
virtual void SystemDraw(const ewol::DrawProperty& _displayProp);
virtual void OnRegenerateDisplay(void);
virtual void PeriodicCall(const ewol::EventTime& _event);

View File

@ -8,4 +8,7 @@
#include <ege/debug.h>
const char * egamiLibName = "ege ";
const char * egeLibName = "ege ";

View File

@ -8,6 +8,7 @@ def Create(target):
# add the file to compile:
myModule.AddSrcFile([
'ege/debug.cpp',
'ege/AudioElement.cpp',
'ege/AudioEngine.cpp',
'ege/Camera.cpp',
@ -20,7 +21,7 @@ def Create(target):
])
# name of the dependency
myModule.AddModuleDepend(['etk', 'ewol', 'bullet'])
myModule.AddModuleDepend(['ewol', 'bullet'])
myModule.CompileFlags_CC([
'-Wno-write-strings',