core/EventManager.cpp
changeset 4139 de7d1cd00703
parent 4075 bf9f4d0fd9fb
child 4353 b642023bec0c
     1.1 --- a/core/EventManager.cpp	Wed Oct 09 08:43:08 2013 -0400
     1.2 +++ b/core/EventManager.cpp	Wed Oct 09 08:43:08 2013 -0400
     1.3 @@ -30,7 +30,6 @@
     1.4   */
     1.5  
     1.6  #include "EventManager.h"
     1.7 -#include "ForwardSys.h"
     1.8  #include "sm_stringutil.h"
     1.9  #include "logic_bridge.h"
    1.10  
    1.11 @@ -133,12 +132,12 @@
    1.12  			{
    1.13  				if (pHook->pPreHook)
    1.14  				{
    1.15 -					g_Forwards.ReleaseForward(pHook->pPreHook);
    1.16 +					forwardsys->ReleaseForward(pHook->pPreHook);
    1.17  				}
    1.18  
    1.19  				if (pHook->pPostHook)
    1.20  				{
    1.21 -					g_Forwards.ReleaseForward(pHook->pPostHook);
    1.22 +					forwardsys->ReleaseForward(pHook->pPostHook);
    1.23  				}
    1.24  
    1.25  				delete pHook;
    1.26 @@ -197,12 +196,12 @@
    1.27  		if (mode == EventHookMode_Pre)
    1.28  		{
    1.29  			/* Create forward for a pre hook */
    1.30 -			pHook->pPreHook = g_Forwards.CreateForwardEx(NULL, ET_Hook, 3, GAMEEVENT_PARAMS);
    1.31 +			pHook->pPreHook = forwardsys->CreateForwardEx(NULL, ET_Hook, 3, GAMEEVENT_PARAMS);
    1.32  			/* Add to forward list */
    1.33  			pHook->pPreHook->AddFunction(pFunction);
    1.34  		} else {
    1.35  			/* Create forward for a post hook */
    1.36 -			pHook->pPostHook = g_Forwards.CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
    1.37 +			pHook->pPostHook = forwardsys->CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
    1.38  			/* Should we copy data from a pre hook to the post hook? */
    1.39  			pHook->postCopy = (mode == EventHookMode_Post);
    1.40  			/* Add to forward list */
    1.41 @@ -229,7 +228,7 @@
    1.42  		/* Create pre hook forward if necessary */
    1.43  		if (!pHook->pPreHook)
    1.44  		{
    1.45 -			pHook->pPreHook = g_Forwards.CreateForwardEx(NULL, ET_Event, 3, GAMEEVENT_PARAMS);
    1.46 +			pHook->pPreHook = forwardsys->CreateForwardEx(NULL, ET_Event, 3, GAMEEVENT_PARAMS);
    1.47  		}
    1.48  
    1.49  		/* Add plugin function to forward list */
    1.50 @@ -238,7 +237,7 @@
    1.51  		/* Create post hook forward if necessary */
    1.52  		if (!pHook->pPostHook)
    1.53  		{
    1.54 -			pHook->pPostHook = g_Forwards.CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
    1.55 +			pHook->pPostHook = forwardsys->CreateForwardEx(NULL, ET_Ignore, 3, GAMEEVENT_PARAMS);
    1.56  		}
    1.57  
    1.58  		/* If postCopy is false, then we may want to set it to true */
    1.59 @@ -285,7 +284,7 @@
    1.60  	/* If forward's list contains 0 functions now, free it */
    1.61  	if ((*pEventForward)->GetFunctionCount() == 0)
    1.62  	{
    1.63 -		g_Forwards.ReleaseForward(*pEventForward);
    1.64 +		forwardsys->ReleaseForward(*pEventForward);
    1.65  		*pEventForward = NULL;
    1.66  	}
    1.67