Convert remainder of sdkhooks.inc to newdecls.

This commit is contained in:
Nicholas Hastings 2015-01-27 18:06:14 -08:00
parent 3040708d4e
commit dbbc30368d

View File

@ -299,17 +299,15 @@ typeset SDKHookCB
* *
* @param entity Entity index * @param entity Entity index
* @param classname Class name * @param classname Class name
* @noreturn
*/ */
forward OnEntityCreated(entity, const String:classname[]); forward void OnEntityCreated(int entity, const char[] classname);
/** /**
* @brief When an entity is destroyed * @brief When an entity is destroyed
* *
* @param entity Entity index * @param entity Entity index
* @noreturn
*/ */
forward OnEntityDestroyed(entity); forward void OnEntityDestroyed(int entity);
/** /**
* @brief When the game description is retrieved * @brief When the game description is retrieved
@ -317,18 +315,18 @@ forward OnEntityDestroyed(entity);
* @note Not supported on ep2v. * @note Not supported on ep2v.
* *
* @param gameDesc Game description * @param gameDesc Game description
* @noreturn * @return Plugin_Changed if gameDesc has been edited, else no change.
*/ */
forward Action:OnGetGameDescription(String:gameDesc[64]); forward Action OnGetGameDescription(char gameDesc[64]);
/** /**
* @brief When the level is initialized * @brief When the level is initialized
* *
* @param mapName Name of the map * @param mapName Name of the map
* @param mapEntities Entities of the map * @param mapEntities Entities of the map
* @noreturn * @return Plugin_Changed if mapEntities has been edited, else no change.
*/ */
forward Action:OnLevelInit(const String:mapName[], String:mapEntities[2097152]); forward Action OnLevelInit(const char[] mapName, char mapEntities[2097152]);
/** /**
* @brief Hooks an entity * @brief Hooks an entity
@ -336,9 +334,8 @@ forward Action:OnLevelInit(const String:mapName[], String:mapEntities[2097152]);
* @param entity Entity index * @param entity Entity index
* @param type Type of function to hook * @param type Type of function to hook
* @param callback Function to call when hook is called * @param callback Function to call when hook is called
* @noreturn
*/ */
native SDKHook(entity, SDKHookType:type, SDKHookCB:callback); native void SDKHook(int entity, SDKHookType type, SDKHookCB callback);
/** /**
* @brief Hooks an entity * @brief Hooks an entity
@ -348,7 +345,7 @@ native SDKHook(entity, SDKHookType:type, SDKHookCB:callback);
* @param callback Function to call when hook is called * @param callback Function to call when hook is called
* @return bool Hook Successful * @return bool Hook Successful
*/ */
native bool:SDKHookEx(entity, SDKHookType:type, SDKHookCB:callback); native bool SDKHookEx(int entity, SDKHookType type, SDKHookCB callback);
/** /**
* @brief Unhooks an entity * @brief Unhooks an entity
@ -356,9 +353,8 @@ native bool:SDKHookEx(entity, SDKHookType:type, SDKHookCB:callback);
* @param entity Entity index * @param entity Entity index
* @param type Type of function to unhook * @param type Type of function to unhook
* @param callback Callback function to unhook * @param callback Callback function to unhook
* @noreturn
*/ */
native SDKUnhook(entity, SDKHookType:type, SDKHookCB:callback); native void SDKUnhook(int entity, SDKHookType type, SDKHookCB callback);
/** /**
* @brief Applies damage to an entity * @brief Applies damage to an entity
@ -373,9 +369,10 @@ native SDKUnhook(entity, SDKHookType:type, SDKHookCB:callback);
* @param weapon Weapon index (orangebox and later) or -1 for unspecified * @param weapon Weapon index (orangebox and later) or -1 for unspecified
* @param damageForce Velocity of damage force * @param damageForce Velocity of damage force
* @param damagePosition Origin of damage * @param damagePosition Origin of damage
* @noreturn
*/ */
native SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType=DMG_GENERIC, weapon=-1, const Float:damageForce[3]=NULL_VECTOR, const Float:damagePosition[3]=NULL_VECTOR); native void SDKHooks_TakeDamage(int entity, int inflictor, int attacker,
float damage, int damageType=DMG_GENERIC, int weapon=-1,
const float damageForce[3]=NULL_VECTOR, const float damagePosition[3]=NULL_VECTOR);
/** /**
* @brief Forces a client to drop the specified weapon * @brief Forces a client to drop the specified weapon
@ -384,15 +381,15 @@ native SDKHooks_TakeDamage(entity, inflictor, attacker, Float:damage, damageType
* @param weapon Weapon entity index. * @param weapon Weapon entity index.
* @param vecTarget Location to toss weapon to, or NULL_VECTOR for default. * @param vecTarget Location to toss weapon to, or NULL_VECTOR for default.
* @param vecVelocity Velocity at which to toss weapon, or NULL_VECTOR for default. * @param vecVelocity Velocity at which to toss weapon, or NULL_VECTOR for default.
* @noreturn
* @error Invalid client or weapon entity, weapon not owned by client. * @error Invalid client or weapon entity, weapon not owned by client.
*/ */
native SDKHooks_DropWeapon(client, weapon, const Float:vecTarget[3]=NULL_VECTOR, const Float:vecVelocity[3]=NULL_VECTOR); native void SDKHooks_DropWeapon(int client, int weapon, const float vecTarget[3]=NULL_VECTOR,
const float vecVelocity[3]=NULL_VECTOR);
/** /**
* Do not edit below this line! * Do not edit below this line!
*/ */
public Extension:__ext_sdkhooks = public Extension __ext_sdkhooks =
{ {
name = "SDKHooks", name = "SDKHooks",
file = "sdkhooks.ext", file = "sdkhooks.ext",