natives.h 3.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /**
  2. * vim: set ts=4 :
  3. * =============================================================================
  4. * TF2 Econ Dynamic Extension
  5. * Copyright (C) 2023 nosoop. All rights reserved.
  6. * =============================================================================
  7. *
  8. * This program is free software; you can redistribute it and/or modify it under
  9. * the terms of the GNU General Public License, version 3.0, as published by the
  10. * Free Software Foundation.
  11. *
  12. * This program is distributed in the hope that it will be useful, but WITHOUT
  13. * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
  14. * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
  15. * details.
  16. *
  17. * You should have received a copy of the GNU General Public License along with
  18. * this program. If not, see <http://www.gnu.org/licenses/>.
  19. *
  20. * As a special exception, AlliedModders LLC gives you permission to link the
  21. * code of this program (as well as its derivative works) to "Half-Life 2," the
  22. * "Source Engine," the "SourcePawn JIT," and any Game MODs that run on software
  23. * by the Valve Corporation. You must obey the GNU General Public License in
  24. * all respects for all other code used. Additionally, AlliedModders LLC grants
  25. * this exception to all derivative works. AlliedModders LLC defines further
  26. * exceptions, found in LICENSE.txt (as of this writing, version JULY-31-2007),
  27. * or <http://www.sourcemod.net/license.php>.
  28. *
  29. * Version: $Id$
  30. */
  31. #ifndef _INCLUDE_SOURCEMOD_EXTENSION_NATIVES_H_
  32. #define _INCLUDE_SOURCEMOD_EXTENSION_NATIVES_H_
  33. /**
  34. * @file natives.h
  35. * @brief Declares native bindings for SourcePawn.
  36. */
  37. class EconInjectedAttributeHandler : public IHandleTypeDispatch {
  38. public:
  39. void OnHandleDestroy(HandleType_t type, void* object);
  40. };
  41. extern HandleType_t g_EconInjectedAttributeType;
  42. extern EconInjectedAttributeHandler g_EconInjectedAttributeHandler;
  43. cell_t sm_EconAttributeCreate(IPluginContext *pContext, const cell_t *params);
  44. cell_t sm_EconAttributeSetClass(IPluginContext *pContext, const cell_t *params);
  45. cell_t sm_EconAttributeSetName(IPluginContext *pContext, const cell_t *params);
  46. cell_t sm_EconAttributeSetDescriptionFormat(IPluginContext *pContext, const cell_t *params);
  47. cell_t sm_EconAttributeSetCustomKeyValue(IPluginContext *pContext, const cell_t *params);
  48. cell_t sm_EconAttributeSetDefIndex(IPluginContext *pContext, const cell_t *params);
  49. cell_t sm_EconAttributeClearDefIndex(IPluginContext *pContext, const cell_t *params);
  50. cell_t sm_EconAttributeRegister(IPluginContext *pContext, const cell_t *params);
  51. cell_t sm_EconAttributeClear(IPluginContext *pContext, const cell_t *params);
  52. const sp_nativeinfo_t g_EconAttributeNatives[] = {
  53. { "TF2EconDynAttribute.TF2EconDynAttribute", sm_EconAttributeCreate },
  54. { "TF2EconDynAttribute.SetClass", sm_EconAttributeSetClass },
  55. { "TF2EconDynAttribute.SetName", sm_EconAttributeSetName },
  56. { "TF2EconDynAttribute.SetDescriptionFormat", sm_EconAttributeSetDescriptionFormat },
  57. { "TF2EconDynAttribute.SetCustom", sm_EconAttributeSetCustomKeyValue },
  58. { "TF2EconDynAttribute.SetDefIndex", sm_EconAttributeSetDefIndex },
  59. { "TF2EconDynAttribute.ClearDefIndex", sm_EconAttributeClearDefIndex },
  60. { "TF2EconDynAttribute.Register", sm_EconAttributeRegister },
  61. { "TF2EconDynAttribute.Clear", sm_EconAttributeClear },
  62. {NULL, NULL},
  63. };
  64. #endif //_INCLUDE_SOURCEMOD_EXTENSION_NATIVES_H_