diff --git a/ss/PlainSpin.cc b/ss/PlainSpin.cc index 759f91d..6a7d7e8 100644 --- a/ss/PlainSpin.cc +++ b/ss/PlainSpin.cc @@ -30,7 +30,7 @@ PlainSpin::PlainSpin(SSMain * _SSMain) : SSMode(_SSMain) void PlainSpin::update() { SSMode::update(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); int numMonitors = m_SSMain->getNumMonitors(); int width = m_SSMain->getWidth(); int height = m_SSMain->getHeight(); diff --git a/ss/Towers.cc b/ss/Towers.cc index 6269ae2..36d1693 100644 --- a/ss/Towers.cc +++ b/ss/Towers.cc @@ -174,7 +174,7 @@ void Towers::update() for (unsigned int i = 0; i < delta / 2; i++) worldStep(); - glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); + glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); int numMonitors = m_SSMain->getNumMonitors(); int width = m_SSMain->getWidth(); int height = m_SSMain->getHeight(); @@ -269,36 +269,36 @@ void Towers_collide_callback(void * data, dGeomID o1, dGeomID o2) { const int maxNumContacts = 2; Towers * t = (Towers *) data; - static dContact contact[maxNumContacts]; - dBodyID b1 = dGeomGetBody(o1); - dBodyID b2 = dGeomGetBody(o2); - if (b1 && b2 && dAreConnected(b1, b2)) - return; - int num = dCollide(o1, o2, maxNumContacts, - &contact[0].geom, sizeof(dContact)); - int i; - for (i = 0; i < num; i++) - { - contact[i].surface.mode = - dContactSlip1 | dContactSlip2 | dContactBounce | - dContactSoftERP | dContactSoftCFM | dContactApprox1; - contact[i].surface.mu = 0.5; - contact[i].surface.slip1 = 0.0; - contact[i].surface.slip2 = 0.0; - contact[i].surface.soft_erp = 0.8; - contact[i].surface.soft_cfm = 0.01; - contact[i].surface.bounce = 0.0; - dJointID joint = dJointCreateContact(t->m_world, - t->m_contactJointGroup, contact + i); - dJointAttach(joint, b1, b2); - } + static dContact contact[maxNumContacts]; + dBodyID b1 = dGeomGetBody(o1); + dBodyID b2 = dGeomGetBody(o2); + if (b1 && b2 && dAreConnected(b1, b2)) + return; + int num = dCollide(o1, o2, maxNumContacts, + &contact[0].geom, sizeof(dContact)); + int i; + for (i = 0; i < num; i++) + { + contact[i].surface.mode = + dContactSlip1 | dContactSlip2 | dContactBounce | + dContactSoftERP | dContactSoftCFM | dContactApprox1; + contact[i].surface.mu = 0.5; + contact[i].surface.slip1 = 0.0; + contact[i].surface.slip2 = 0.0; + contact[i].surface.soft_erp = 0.8; + contact[i].surface.soft_cfm = 0.01; + contact[i].surface.bounce = 0.0; + dJointID joint = dJointCreateContact(t->m_world, + t->m_contactJointGroup, contact + i); + dJointAttach(joint, b1, b2); + } } /* invokes ODE to do physics on our world */ void Towers::worldStep() { - dSpaceCollide(m_space, this, Towers_collide_callback); - dWorldQuickStep(m_world, WORLD_STEP); - dJointGroupEmpty(m_contactJointGroup); + dSpaceCollide(m_space, this, Towers_collide_callback); + dWorldQuickStep(m_world, WORLD_STEP); + dJointGroupEmpty(m_contactJointGroup); }