diff --git a/rcbasic_runtime/rc_spritelib.h b/rcbasic_runtime/rc_spritelib.h index 49c5133..7c76a68 100644 --- a/rcbasic_runtime/rc_spritelib.h +++ b/rcbasic_runtime/rc_spritelib.h @@ -650,6 +650,8 @@ void rc_setSpriteBox(int spr_id, int w, int h) b2PolygonShape* fix_shape = (b2PolygonShape*)rc_sprite[spr_id].physics.shape; fix_shape->SetAsBox(w/2, h/2); + rc_sprite[spr_id].physics.offset_x = w/2; + rc_sprite[spr_id].physics.offset_y = h/2; rc_sprite[spr_id].physics.box_width = w; rc_sprite[spr_id].physics.box_height = h; diff --git a/rcbasic_runtime/rcbasic_runtime.layout b/rcbasic_runtime/rcbasic_runtime.layout index d528a06..bd42810 100755 --- a/rcbasic_runtime/rcbasic_runtime.layout +++ b/rcbasic_runtime/rcbasic_runtime.layout @@ -2,17 +2,218 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + @@ -22,180 +223,19 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + @@ -203,44 +243,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -