|
From: John D. <go...@us...> - 2003-09-13 17:57:11
|
Log Message:
-----------
DSL Library Initial checkin
Modified Files:
--------------
/cvsroot/decaldev/source/DecalFilters:
CharacterStats.cpp
DecalFilters.idl
DecalFiltersCP.h
World.cpp
Revision Data
-------------
Index: CharacterStats.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/CharacterStats.cpp,v
retrieving revision 1.44
retrieving revision 1.45
diff -u -d -r1.44 -r1.45
--- CharacterStats.cpp 13 Aug 2003 22:41:31 -0000 1.44
+++ CharacterStats.cpp 13 Sep 2003 17:57:09 -0000 1.45
@@ -133,8 +133,6 @@
{
USES_CONVERSION;
- static _bstr_t strEvent( _T( "event" ) );
-
long dwType; pMessage->get_Type( &dwType );
switch( dwType )
{
Index: DecalFilters.idl
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/DecalFilters.idl,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- DecalFilters.idl 30 Aug 2003 16:57:22 -0000 1.35
+++ DecalFilters.idl 13 Sep 2003 17:57:09 -0000 1.36
@@ -606,6 +606,7 @@
[id(1), helpstring("method CreateObject")] HRESULT CreateObject(IWorldObject *pObject);
[id(2), helpstring("method ReleaseObject")] HRESULT ReleaseObject(IWorldObject *pObject);
[id(3), helpstring("method ChangeObject")] HRESULT ChangeObject(IWorldObject *pObject, BSTR Change);
+ [id(4), helpstring("method MovedObject")] HRESULT MoveObject(IWorldObject *pObject);
};
[
Index: DecalFiltersCP.h
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/DecalFiltersCP.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- DecalFiltersCP.h 8 Dec 2001 11:28:45 -0000 1.6
+++ DecalFiltersCP.h 13 Sep 2003 17:57:09 -0000 1.7
@@ -181,6 +181,32 @@
return varResult.scode;
}
+ HRESULT Fire_MovedObject(IWorldObject * pObject)
+ {
+ CComVariant varResult;
+ T* pT = static_cast<T*>(this);
+ int nConnectionIndex;
+ CComVariant* pvars = new CComVariant[1];
+ int nConnections = m_vec.GetSize();
+
+ for (nConnectionIndex = 0; nConnectionIndex < nConnections; nConnectionIndex++)
+ {
+ pT->Lock();
+ CComPtr<IUnknown> sp = m_vec.GetAt(nConnectionIndex);
+ pT->Unlock();
+ IDispatch* pDispatch = reinterpret_cast<IDispatch*>(sp.p);
+ if (pDispatch != NULL)
+ {
+ VariantClear(&varResult);
+ pvars[0] = pObject;
+ DISPPARAMS disp = { pvars, NULL, 1, 0 };
+ pDispatch->Invoke(0x4, IID_NULL, LOCALE_USER_DEFAULT, DISPATCH_METHOD, &disp, &varResult, NULL, NULL);
+ }
+ }
+ delete[] pvars;
+ return varResult.scode;
+
+ }
HRESULT Fire_ChangeObject(IWorldObject * pObject, BSTR Change)
{
CComVariant varResult;
Index: World.cpp
===================================================================
RCS file: /cvsroot/decaldev/source/DecalFilters/World.cpp,v
retrieving revision 1.53
retrieving revision 1.54
diff -u -d -r1.53 -r1.54
--- World.cpp 8 Sep 2003 03:14:31 -0000 1.53
+++ World.cpp 13 Sep 2003 17:57:09 -0000 1.54
@@ -1767,7 +1767,7 @@
// }
// }
pData->m_flags |= FLAG_LOCATION;
- Fire_ChangeObject(pData->m_p, strLocationChange);
+ Fire_MovedObject(pData->m_p);
}
}
|