Input: Implement RGSS3 functionality in bindings
Ie. using symbols instead of Input:: constants to query button states.
This commit is contained in:
parent
5a6c0c14ed
commit
64f1e32fdc
4 changed files with 70 additions and 37 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue