Merge pull request #240 from Nextra/kvd

Improve handling of KeyValueData
This commit is contained in:
Vincent Herbet
2015-05-05 12:01:29 +02:00
7 changed files with 109 additions and 27 deletions

View File

@ -473,6 +473,24 @@ native get_kvd(kvd_handle, KeyValueData:member, any:...);
// keyvalues structure rather than changing the internal engine strings.
native set_kvd(kvd_handle, KeyValueData:member, any:...);
/**
* Creates a KeyValueData handle.
*
* @note Handles should be freed using free_kvd().
*
* @return New KeyValueData handle
*/
native create_kvd();
/**
* Frees a KeyValueData handle.
*
* @param kvd_handle KeyValueData handle
*
* @noreturn
*/
native free_kvd(kvd_handle);
// These functions are used with the clientdata data structure (FM_UpdateClientData)
// Get: 0 extra params - Return integer; 1 extra param - by ref float or vector; 2 extra params - string and length
// Set: Use anything

View File

@ -70,7 +70,7 @@ enum Ham
/**
* Description: Typically this is similar to an engine keyvalue call.
* Use the kvd natives from fakemeta to handle the kvd_handle passed.
* NOTE: Do not pass handle 0 to this! Use get_kvd_handle(0) from fakemeta instead!
* NOTE: Do not pass handle 0 to this! Use create_kvd() from fakemeta instead!
* Forward params: function(this, kvd_handle);
* Return type: None.
* Execute params: ExecuteHam(Ham_Keyvalue, this, kvd_handle);