Update documentation.

This commit is contained in:
Drifter
2018-01-29 12:36:26 -05:00
parent 16aa7900e0
commit 17332379cb
2 changed files with 11 additions and 9 deletions
+7 -5
View File
@@ -170,7 +170,7 @@ native bool DHookRemoveEntityListener(ListenType type, ListenCB callback);
* @param hooktype Type of hook
* @param returntype Type type of return
* @param thistype Type of this pointer or ignore (ignore can be used if not needed)
* @param callback Callback function
* @param callback Optional callback function, if not set here must be set when hooking.
*
* @return Returns setup handle for the hook or INVALID_HANDLE.
*/
@@ -187,7 +187,6 @@ native Handle DHookCreate(int offset, HookType hooktype, ReturnType returntype,
* @noreturn
*/
native void DHookAddParam(Handle setup, HookParamType type, int size=-1, DHookPassFlag flag=DHookPass_ByVal);
//native DHookAddParam(Handle:setup, HookParamType:type);
/* Hook entity
*
@@ -195,8 +194,9 @@ native void DHookAddParam(Handle setup, HookParamType type, int size=-1, DHookPa
* @param post True to make the hook a post hook. (If you need to change the retunr value or need the return value use a post hook! If you need to change params and return use a pre and post hook!)
* @param entity Entity index to hook on.
* @param removalcb Callback for when the hook is removed (Entity hooks are auto-removed on entity destroyed and will call this callback)
* @param callback Optional callback function, if not set here must be set when creating the hook.
*
* @error Invalid setup handle, invalid entity or invalid hook type.
* @error Invalid setup handle, invalid address, invalid hook type or invalid callback.
* @return -1 on fail a hookid on success
*/
native int DHookEntity(Handle setup, bool post, int entity, DHookRemovalCB removalcb=INVALID_FUNCTION, DHookCallback callback=INVALID_FUNCTION);
@@ -206,8 +206,9 @@ native int DHookEntity(Handle setup, bool post, int entity, DHookRemovalCB remov
* @param setup Setup handle to use to add the hook.
* @param post True to make the hook a post hook. (If you need to change the retunr value or need the return value use a post hook! If you need to change params and return use a pre and post hook!)
* @param removalcb Callback for when the hook is removed (Game rules hooks are auto-removed on map end and will call this callback)
* @param callback Optional callback function, if not set here must be set when creating the hook.
*
* @error Invalid setup handle, failing to get gamerules pointer or invalid hook type.
* @error Invalid setup handle, invalid address, invalid hook type or invalid callback.
* @return -1 on fail a hookid on success
*/
native int DHookGamerules(Handle setup, bool post, DHookRemovalCB removalcb=INVALID_FUNCTION, DHookCallback callback=INVALID_FUNCTION);
@@ -218,8 +219,9 @@ native int DHookGamerules(Handle setup, bool post, DHookRemovalCB removalcb=INVA
* @param post True to make the hook a post hook. (If you need to change the retunr value or need the return value use a post hook! If you need to change params and return use a pre and post hook!)
* @param addr This pointer address.
* @param removalcb Callback for when the hook is removed (Entity hooks are auto-removed on entity destroyed and will call this callback)
* @param callback Optional callback function, if not set here must be set when creating the hook.
*
* @error Invalid setup handle, invalid address or invalid hook type.
* @error Invalid setup handle, invalid address, invalid hook type or invalid callback.
* @return -1 on fail a hookid on success
*/
native int DHookRaw(Handle setup, bool post, Address addr, DHookRemovalCB removalcb=INVALID_FUNCTION, DHookCallback callback=INVALID_FUNCTION);