.doc/ext/reflex/update_event.cpp in reflexion-0.1.15 vs .doc/ext/reflex/update_event.cpp in reflexion-0.1.16
- old
+ new
@@ -16,17 +16,16 @@
{
return new_type<Reflex::UpdateEvent>(klass);
}
static
-VALUE initialize(VALUE self)
+VALUE initialize(VALUE self, VALUE now, VALUE dt)
{
CHECK;
- check_arg_count(__FILE__, __LINE__, "UpdateEvent#initialize", argc, 0, 1, 2);
- THIS->now = (argc >= 1) ? to<double>(argv[0]) : 0;
- THIS->dt = (argc >= 2) ? to<float>(argv[1]) : 0;
+ THIS->now = to<double>(now);
+ THIS->dt = to<float>(dt);
return rb_call_super(0, NULL);
}
static
@@ -59,10 +58,10 @@
{
Module mReflex = rb_define_module("Reflex");
cUpdateEvent = mReflex.define_class("UpdateEvent", Reflex::event_class());
rb_define_alloc_func(cUpdateEvent, alloc);
- rb_define_private_method(cUpdateEvent, "initialize", RUBY_METHOD_FUNC(initialize), -1);
+ rb_define_private_method(cUpdateEvent, "initialize", RUBY_METHOD_FUNC(initialize), 2);
rb_define_private_method(cUpdateEvent, "initialize_copy", RUBY_METHOD_FUNC(initialize_copy), 1);
rb_define_method(cUpdateEvent, "now", RUBY_METHOD_FUNC(now), 0);
rb_define_method(cUpdateEvent, "dt", RUBY_METHOD_FUNC(dt), 0);
}