Input: Implement RGSS3 functionality in bindings

Ie. using symbols instead of Input:: constants to query
button states.
This commit is contained in:
Jonas Kulla 2014-02-03 15:04:57 +01:00
parent 5a6c0c14ed
commit 64f1e32fdc
4 changed files with 70 additions and 37 deletions

View file

@ -237,6 +237,24 @@ rb_get_args(int argc, VALUE *argv, const char *format, ...)
break;
}
case 'n' :
{
if (argI >= argc)
break;
ID *sym = va_arg(ap, ID*);
VALUE symVal = *arg++;
if (!SYMBOL_P(symVal))
rb_raise(rb_eTypeError, "Argument %d: Expected symbol", argI);
*sym = SYM2ID(symVal);
++argI;
break;
}
case '|' :
opt = true;
break;