Move scared guts of core into logic (bug 5680, r=fyren).

--HG--
rename : core/ExtensionSys.cpp => core/logic/ExtensionSys.cpp
rename : core/ExtensionSys.h => core/logic/ExtensionSys.h
rename : core/HandleSys.cpp => core/logic/HandleSys.cpp
rename : core/HandleSys.h => core/logic/HandleSys.h
rename : core/NativeInvoker.cpp => core/logic/NativeInvoker.cpp
rename : core/NativeInvoker.h => core/logic/NativeInvoker.h
rename : core/NativeOwner.cpp => core/logic/NativeOwner.cpp
rename : core/NativeOwner.h => core/logic/NativeOwner.h
rename : core/PluginSys.cpp => core/logic/PluginSys.cpp
rename : core/PluginSys.h => core/logic/PluginSys.h
rename : core/ShareSys.cpp => core/logic/ShareSys.cpp
rename : core/ShareSys.h => core/logic/ShareSys.h
rename : core/smn_fakenatives.cpp => core/logic/smn_fakenatives.cpp
rename : core/logic/AutoHandleRooter.h => public/AutoHandleRooter.h
This commit is contained in:
David Anderson
2013-03-29 11:37:29 -07:00
parent 502c6f0dae
commit 045ee262a8
71 changed files with 3973 additions and 1131 deletions
+16 -16
View File
@@ -31,8 +31,8 @@
#include "sm_globals.h"
#include "sourcemm_api.h"
#include "HandleSys.h"
#include "EventManager.h"
#include "logic_bridge.h"
static cell_t sm_HookEvent(IPluginContext *pContext, const cell_t *params)
{
@@ -113,7 +113,7 @@ static cell_t sm_CreateEvent(IPluginContext *pContext, const cell_t *params)
if (pInfo)
{
return g_HandleSys.CreateHandle(g_EventManager.GetHandleType(), pInfo, pContext->GetIdentity(), g_pCoreIdent, NULL);
return handlesys->CreateHandle(g_EventManager.GetHandleType(), pInfo, pContext->GetIdentity(), g_pCoreIdent, NULL);
}
return BAD_HANDLE;
@@ -125,7 +125,7 @@ static cell_t sm_FireEvent(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -141,7 +141,7 @@ static cell_t sm_FireEvent(IPluginContext *pContext, const cell_t *params)
/* Free handle on game event */
HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
handlesys->FreeHandle(hndl, &sec);
return 1;
}
@@ -152,7 +152,7 @@ static cell_t sm_CancelCreatedEvent(IPluginContext *pContext, const cell_t *para
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -168,7 +168,7 @@ static cell_t sm_CancelCreatedEvent(IPluginContext *pContext, const cell_t *para
/* Free handle on game event */
HandleSecurity sec(pContext->GetIdentity(), g_pCoreIdent);
g_HandleSys.FreeHandle(hndl, &sec);
handlesys->FreeHandle(hndl, &sec);
return 1;
}
@@ -179,7 +179,7 @@ static cell_t sm_GetEventName(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -196,7 +196,7 @@ static cell_t sm_GetEventBool(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -214,7 +214,7 @@ static cell_t sm_GetEventInt(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -232,7 +232,7 @@ static cell_t sm_GetEventFloat(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -252,7 +252,7 @@ static cell_t sm_GetEventString(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -272,7 +272,7 @@ static cell_t sm_SetEventBool(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -292,7 +292,7 @@ static cell_t sm_SetEventInt(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -312,7 +312,7 @@ static cell_t sm_SetEventFloat(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -333,7 +333,7 @@ static cell_t sm_SetEventString(IPluginContext *pContext, const cell_t *params)
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);
@@ -354,7 +354,7 @@ static cell_t sm_SetEventBroadcast(IPluginContext *pContext, const cell_t *param
HandleError err;
EventInfo *pInfo;
if ((err=g_HandleSys.ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
if ((err=handlesys->ReadHandle(hndl, g_EventManager.GetHandleType(), NULL, (void **)&pInfo))
!= HandleError_None)
{
return pContext->ThrowNativeError("Invalid game event handle %x (error %d)", hndl, err);