engine.c
// This is the C method that will be called when draw_square() is called in Ruby
This is the C method that will be called when draw_square() is called in Ruby
This is the C method that will be called when draw_square () is called in Ruby
static mrb_value draw_square(mrb_state *mrb, mrb_value value) {
  mrb_int x;
  mrb_int y;
  mrb_int width;
  mrb_get_args(mrb, "iii", &x, &y, &width);
  S2D_DrawQuad(x, y, 1.0, 0, 0, 1,
               x + width, y, 1.0, 0, 0, 1,
               x + width, y + width, 1.0, 0, 0, 1,
               x, y + width, 1.0, 0, 0, 1);
  return value;
}
static mrb_value draw_square ( mrb_state * mrb , mrb_value value ) { mrb_int x ; mrb_int y ; mrb_int width ; mrb_get_args ( mrb , " " , & x , & y , & width ) ; S2D_DrawQuad ( x , y , 1.0 , 0 , 0 , 1 , x + width , y , 1.0 , 0 , 0 , 1 , x + width , y + width , 1.0 , 0 , 0 , 1 , x , y + width , 1.0 , 0 , 0 , 1 ) ; return value ; }
This is the C method that will be called when draw_square() is called in Ruby
This is the C method that will be called when draw_square () is called in Ruby