aboutsummaryrefslogtreecommitdiff
path: root/src/client/main.cpp
diff options
context:
space:
mode:
authorAlexander Pickering <alex@cogarr.net>2018-07-31 16:42:13 -0400
committerAlexander Pickering <alex@cogarr.net>2018-07-31 16:42:13 -0400
commit1d677927e73e2d66591738777f6a1559527dbab2 (patch)
treea4a0190ac748191dd863c19440c82e8d4f5aa427 /src/client/main.cpp
parent11857adbdce423ca93980c884d3dc94a974f735f (diff)
downloadbrokengine-1d677927e73e2d66591738777f6a1559527dbab2.tar.gz
brokengine-1d677927e73e2d66591738777f6a1559527dbab2.tar.bz2
brokengine-1d677927e73e2d66591738777f6a1559527dbab2.zip
Added an editbox
Added bindings to Irrlicht's EditBox gui element.
Diffstat (limited to 'src/client/main.cpp')
-rw-r--r--src/client/main.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/client/main.cpp b/src/client/main.cpp
index eb8eca6..5462e31 100644
--- a/src/client/main.cpp
+++ b/src/client/main.cpp
@@ -78,7 +78,7 @@ void QuaternionToEuler(const btQuaternion &TQuat, btVector3 &TEuler) {
}
void UpdateElement(btRigidBody* TObject){
-
+
if(TObject->getUserPointer() != NULL){
//UpdateRender(*Iterator);
scene::ISceneNode *Node = static_cast<scene::ISceneNode *>((TObject)->getUserPointer());
@@ -92,7 +92,7 @@ void UpdateElement(btRigidBody* TObject){
QuaternionToEuler(TObject->getOrientation(), EulerRotation);
Node->setRotation(core::vector3df(EulerRotation[0], EulerRotation[1], EulerRotation[2]));
}
-
+
}
SColor background = SColor(255,100,101,140);
@@ -110,7 +110,7 @@ int main(int argc, char *argv[]){
// Initialize bullet
phys_genesis();
-
+
//Create a new lua state, this gets shared everywhere
lua_State *state = luaL_newstate();
L = state;
@@ -157,8 +157,12 @@ int main(int argc, char *argv[]){
printf("About to check if device run\n");
printf("Device is %p\n",device);
while(device->run()){
+ //printf("Start gameloop net\n");
gameloop_net(L);
+ //printf("End gameloop net\n");
+ //printf("Start gameloop phys\n");
gameloop_phys(UpdateElement);
+ //printf("End gameloop phys\n");
if(device->isWindowActive()){
driver->beginScene(true, true, background);
@@ -183,7 +187,6 @@ int main(int argc, char *argv[]){
lua_call(state,0,0);
lua_pop(state,1);
}else{
- printf("Tick was nil...\n");
lua_pop(state,2);
}
}