sourcepawn/jit/sp_vm_basecontext.cpp
branchrefac-jit
changeset 2174 01c5adfae757
parent 2173 c38e83232dcc
child 2180 aae5f448b508
     1.1 --- a/sourcepawn/jit/sp_vm_basecontext.cpp	Mon Jul 07 05:28:42 2008 +0000
     1.2 +++ b/sourcepawn/jit/sp_vm_basecontext.cpp	Mon Jul 07 06:24:54 2008 +0000
     1.3 @@ -769,3 +769,26 @@
     1.4  {
     1.5  	return (cell_t *)(m_pPlugin->memory + m_ctx.frm + (2 * sizeof(cell_t)));
     1.6  }
     1.7 +
     1.8 +void BaseContext::SetKey(int k, void *value)
     1.9 +{
    1.10 +	if (k < 1 || k > 4)
    1.11 +	{
    1.12 +		return;
    1.13 +	}
    1.14 +
    1.15 +	m_keys[k - 1] = value;
    1.16 +	m_keys_set[k - 1] = true;
    1.17 +}
    1.18 +
    1.19 +bool BaseContext::GetKey(int k, void **value)
    1.20 +{
    1.21 +	if (k < 1 || k > 4 || m_keys_set[k - 1] == false)
    1.22 +	{
    1.23 +		return false;
    1.24 +	}
    1.25 +
    1.26 +	*value = m_keys[k - 1];
    1.27 +
    1.28 +	return true;
    1.29 +}