mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-13 15:44:36 +00:00
update bullet so it actually works
Moved the addSourceDirectory for physics/Bullet into the Engine/Source/CMakeLists.txt file that way it can actually appear where we expect it to in the solution explorer.
This commit is contained in:
parent
c7be48130a
commit
13fa178cf6
5986 changed files with 1811270 additions and 453803 deletions
|
|
@ -4,16 +4,13 @@
|
|||
See license in Gwen.h
|
||||
*/
|
||||
|
||||
|
||||
#include "Gwen/Events.h"
|
||||
|
||||
using namespace Gwen;
|
||||
using namespace Gwen::Event;
|
||||
|
||||
|
||||
Handler::Handler()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Handler::~Handler()
|
||||
|
|
@ -25,29 +22,27 @@ void Handler::CleanLinks()
|
|||
{
|
||||
// Tell all the callers that we're dead
|
||||
std::list<Caller*>::iterator iter = m_Callers.begin();
|
||||
while ( iter != m_Callers.end() )
|
||||
while (iter != m_Callers.end())
|
||||
{
|
||||
Caller* pCaller = *iter;
|
||||
UnRegisterCaller( pCaller );
|
||||
pCaller->RemoveHandler( this );
|
||||
UnRegisterCaller(pCaller);
|
||||
pCaller->RemoveHandler(this);
|
||||
iter = m_Callers.begin();
|
||||
}
|
||||
}
|
||||
|
||||
void Handler::RegisterCaller( Caller* pCaller )
|
||||
void Handler::RegisterCaller(Caller* pCaller)
|
||||
{
|
||||
m_Callers.push_back( pCaller );
|
||||
m_Callers.push_back(pCaller);
|
||||
}
|
||||
|
||||
void Handler::UnRegisterCaller( Caller* pCaller )
|
||||
void Handler::UnRegisterCaller(Caller* pCaller)
|
||||
{
|
||||
m_Callers.remove( pCaller );
|
||||
m_Callers.remove(pCaller);
|
||||
}
|
||||
|
||||
|
||||
Caller::Caller()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Caller::~Caller()
|
||||
|
|
@ -61,51 +56,50 @@ void Caller::CleanLinks()
|
|||
for (iter = m_Handlers.begin(); iter != m_Handlers.end(); ++iter)
|
||||
{
|
||||
handler& h = *iter;
|
||||
h.pObject->UnRegisterCaller( this );
|
||||
h.pObject->UnRegisterCaller(this);
|
||||
}
|
||||
|
||||
m_Handlers.clear();
|
||||
}
|
||||
|
||||
void Caller::Call( Controls::Base* pThis )
|
||||
void Caller::Call(Controls::Base* pThis)
|
||||
{
|
||||
std::list<handler>::iterator iter;
|
||||
for (iter = m_Handlers.begin(); iter != m_Handlers.end(); ++iter)
|
||||
{
|
||||
handler& h = *iter;
|
||||
(h.pObject->*h.fnFunction)( pThis );
|
||||
(h.pObject->*h.fnFunction)(pThis);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Caller::AddInternal( Event::Handler* pObject, Event::Handler::Function pFunction )
|
||||
void Caller::AddInternal(Event::Handler* pObject, Event::Handler::Function pFunction)
|
||||
{
|
||||
handler h;
|
||||
h.fnFunction = pFunction;
|
||||
h.pObject = pObject;
|
||||
|
||||
m_Handlers.push_back( h );
|
||||
m_Handlers.push_back(h);
|
||||
|
||||
pObject->RegisterCaller( this );
|
||||
pObject->RegisterCaller(this);
|
||||
}
|
||||
|
||||
void Caller::RemoveHandler( Event::Handler* pObject )
|
||||
void Caller::RemoveHandler(Event::Handler* pObject)
|
||||
{
|
||||
pObject->UnRegisterCaller( this );
|
||||
pObject->UnRegisterCaller(this);
|
||||
|
||||
std::list<handler>::iterator iter = m_Handlers.begin();
|
||||
|
||||
while ( iter != m_Handlers.end() )
|
||||
while (iter != m_Handlers.end())
|
||||
{
|
||||
handler& h = *iter;
|
||||
|
||||
if ( h.pObject == pObject )
|
||||
if (h.pObject == pObject)
|
||||
{
|
||||
iter = m_Handlers.erase( iter );
|
||||
iter = m_Handlers.erase(iter);
|
||||
}
|
||||
else
|
||||
{
|
||||
++iter;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue