q16avel/q16horz

git-svn-id: https://svn.eduke32.com/eduke32@6731 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2018-03-07 04:21:52 +00:00
parent d9722401ed
commit 48270bfb9c
3 changed files with 19 additions and 11 deletions

View file

@ -1320,7 +1320,9 @@ const memberlabel_t UserdefsLabels[]=
const memberlabel_t InputLabels[]=
{
{ "avel", INPUT_AVEL, 0, 0 },
{ "q16avel", INPUT_Q16AVEL, 0, 0 },
{ "horz", INPUT_HORZ, 0, 0 },
{ "q16horz", INPUT_Q16HORZ, 0, 0 },
{ "fvel", INPUT_FVEL, 0, 0 },
{ "svel", INPUT_SVEL, 0, 0 },
{ "bits", INPUT_BITS, 0, 0 },

View file

@ -715,7 +715,9 @@ enum ActorLabel_t
enum InputLabel_t
{
INPUT_AVEL,
INPUT_Q16AVEL,
INPUT_HORZ,
INPUT_Q16HORZ,
INPUT_FVEL,
INPUT_SVEL,
INPUT_BITS,

View file

@ -906,13 +906,15 @@ int32_t __fastcall VM_GetPlayerInput(int32_t const playerNum, int32_t labelNum)
switch (labelNum)
{
case INPUT_AVEL: labelNum = fix16_to_int(i->qavel); break;
case INPUT_HORZ: labelNum = fix16_to_int(i->qhorz); break;
case INPUT_FVEL: labelNum = i->fvel; break;
case INPUT_SVEL: labelNum = i->svel; break;
case INPUT_BITS: labelNum = i->bits; break;
case INPUT_AVEL: labelNum = fix16_to_int(i->q16avel); break;
case INPUT_Q16AVEL: labelNum = i->q16avel; break;
case INPUT_HORZ: labelNum = fix16_to_int(i->q16horz); break;
case INPUT_Q16HORZ: labelNum = i->q16horz; break;
case INPUT_FVEL: labelNum = i->fvel; break;
case INPUT_SVEL: labelNum = i->svel; break;
case INPUT_BITS: labelNum = i->bits; break;
case INPUT_EXTBITS: labelNum = i->extbits; break;
default: labelNum = -1; break;
default: labelNum = -1; break;
}
return labelNum;
@ -930,11 +932,13 @@ void __fastcall VM_SetPlayerInput(int32_t const playerNum, int32_t const labelNu
switch (labelNum)
{
case INPUT_AVEL: i->qavel = fix16_from_int(iSet); break;
case INPUT_HORZ: i->qhorz = fix16_from_int(iSet); break;
case INPUT_FVEL: i->fvel = iSet; break;
case INPUT_SVEL: i->svel = iSet; break;
case INPUT_BITS: i->bits = iSet; break;
case INPUT_AVEL: i->q16avel = fix16_from_int(iSet); break;
case INPUT_Q16AVEL: i->q16avel = iSet; break;
case INPUT_HORZ: i->q16horz = fix16_from_int(iSet); break;
case INPUT_Q16HORZ: i->q16horz = iSet; break;
case INPUT_FVEL: i->fvel = iSet; break;
case INPUT_SVEL: i->svel = iSet; break;
case INPUT_BITS: i->bits = iSet; break;
case INPUT_EXTBITS: i->extbits = iSet; break;
default: break;
}