• R/O
  • SSH
  • HTTPS

dxruby: Commit


Commit MetaInfo

Revision541 (tree)
Time2016-09-18 18:03:18
Authormirichi

Log Message

DXRuby1.4.5

Change Summary

Incremental Difference

--- branches/1.4.5/collision.c (revision 540)
+++ branches/1.4.5/collision.c (revision 541)
@@ -1222,10 +1222,18 @@
12221222 if( RTEST(sprite->voffset_sync) )
12231223 {
12241224 struct DXRubyImage *image;
1225- DXRUBY_CHECK_IMAGE( sprite->vimage );
1226- image = DXRUBY_GET_STRUCT( Image, sprite->vimage );
1227- collision->base_x -= (sprite->vcenter_x == Qnil ? image->width / 2 : NUM2FLOAT(sprite->vcenter_x));
1228- collision->base_y -= (sprite->vcenter_y == Qnil ? image->height / 2 : NUM2FLOAT(sprite->vcenter_y));
1225+ if( sprite->vcenter_x == Qnil || sprite->vcenter_y == Qnil )
1226+ {
1227+ DXRUBY_CHECK_IMAGE( sprite->vimage );
1228+ image = DXRUBY_GET_STRUCT( Image, sprite->vimage );
1229+ collision->base_x -= sprite->vcenter_x == Qnil ? image->width / 2 : NUM2FLOAT(sprite->vcenter_x);
1230+ collision->base_y -= sprite->vcenter_y == Qnil ? image->height / 2 : NUM2FLOAT(sprite->vcenter_y);
1231+ }
1232+ else
1233+ {
1234+ collision->base_x -= NUM2FLOAT(sprite->vcenter_x);
1235+ collision->base_y -= NUM2FLOAT(sprite->vcenter_y);
1236+ }
12291237 }
12301238 collision->angle = NUM2FLOAT(sprite->vangle);
12311239 collision->scale_x = NUM2FLOAT(sprite->vscale_x);
--- branches/1.4.5/dxruby.c (revision 540)
+++ branches/1.4.5/dxruby.c (revision 541)
@@ -2972,8 +2972,6 @@
29722972 }
29732973 else
29742974 {
2975- picture = (struct DXRubyPicture_drawLine *)RenderTarget_AllocPictureList( rt, sizeof( struct DXRubyPicture_drawLine ) * 4 );
2976-
29772975 if( x1 > x2 )
29782976 {
29792977 int temp = x1;
@@ -2988,75 +2986,79 @@
29882986 }
29892987
29902988 /* DXRubyPictureオブジェクト設定 */
2991- picture[0].func = RenderTarget_drawLine_func;
2992- picture[0].x1 = x1 - rt->ox + 1;
2993- picture[0].y1 = y1 - rt->oy;
2994- picture[0].x2 = x2 - rt->ox;
2995- picture[0].y2 = y1 - rt->oy;
2996- picture[0].value = Qnil;
2997- picture[0].alpha = 0xff;
2998- picture[0].blendflag = 0;
2999- picture[0].col = col;
2989+ picture = (struct DXRubyPicture_drawLine *)RenderTarget_AllocPictureList( rt, sizeof( struct DXRubyPicture_drawLine ) );
2990+ picture->func = RenderTarget_drawLine_func;
2991+ picture->x1 = x1 - rt->ox + 1;
2992+ picture->y1 = y1 - rt->oy;
2993+ picture->x2 = x2 - rt->ox;
2994+ picture->y2 = y1 - rt->oy;
2995+ picture->value = Qnil;
2996+ picture->alpha = 0xff;
2997+ picture->blendflag = 0;
2998+ picture->col = col;
30002999
30013000 /* リストデータに追加 */
3002- rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)&picture[0];
3001+ rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)picture;
30033002 z = argc < 6 || argv[5] == Qnil ? 0.0f : NUM2FLOAT( argv[5] );
30043003 rt->PictureList[rt->PictureCount].z = z;
3005- picture[0].z = z;
3004+ picture->z = z;
30063005 rt->PictureCount++;
30073006
30083007 /* DXRubyPictureオブジェクト設定 */
3009- picture[1].func = RenderTarget_drawLine_func;
3010- picture[1].x1 = x1 - rt->ox;
3011- picture[1].y1 = y2 - rt->oy;
3012- picture[1].x2 = x2 - rt->ox - 1;
3013- picture[1].y2 = y2 - rt->oy;
3014- picture[1].value = Qnil;
3015- picture[1].alpha = 0xff;
3016- picture[1].blendflag = 0;
3017- picture[1].col = col;
3008+ picture = (struct DXRubyPicture_drawLine *)RenderTarget_AllocPictureList( rt, sizeof( struct DXRubyPicture_drawLine ) );
3009+ picture->func = RenderTarget_drawLine_func;
3010+ picture->x1 = x1 - rt->ox;
3011+ picture->y1 = y2 - rt->oy;
3012+ picture->x2 = x2 - rt->ox - 1;
3013+ picture->y2 = y2 - rt->oy;
3014+ picture->value = Qnil;
3015+ picture->alpha = 0xff;
3016+ picture->blendflag = 0;
3017+ picture->col = col;
30183018
30193019 /* リストデータに追加 */
3020- rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)&picture[1];
3020+ rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)picture;
30213021 z = argc < 6 || argv[5] == Qnil ? 0.0f : NUM2FLOAT( argv[5] );
30223022 rt->PictureList[rt->PictureCount].z = z;
3023- picture[1].z = z;
3023+ picture->z = z;
30243024 rt->PictureCount++;
30253025
30263026 /* DXRubyPictureオブジェクト設定 */
3027- picture[2].func = RenderTarget_drawLine_func;
3028- picture[2].x1 = x1 - rt->ox;
3029- picture[2].y1 = y1 - rt->oy;
3030- picture[2].x2 = x1 - rt->ox;
3031- picture[2].y2 = y2 - rt->oy - 1;
3032- picture[2].value = Qnil;
3033- picture[2].alpha = 0xff;
3034- picture[2].blendflag = 0;
3035- picture[2].col = col;
3027+ picture = (struct DXRubyPicture_drawLine *)RenderTarget_AllocPictureList( rt, sizeof( struct DXRubyPicture_drawLine ) );
3028+ picture->func = RenderTarget_drawLine_func;
3029+ picture->x1 = x1 - rt->ox;
3030+ picture->y1 = y1 - rt->oy;
3031+ picture->x2 = x1 - rt->ox;
3032+ picture->y2 = y2 - rt->oy - 1;
3033+ picture->value = Qnil;
3034+ picture->alpha = 0xff;
3035+ picture->blendflag = 0;
3036+ picture->col = col;
30363037
30373038 /* リストデータに追加 */
3038- rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)&picture[2];
3039+ rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)picture;
30393040 z = argc < 6 || argv[5] == Qnil ? 0.0f : NUM2FLOAT( argv[5] );
30403041 rt->PictureList[rt->PictureCount].z = z;
3041- picture[2].z = z;
3042+ picture->z = z;
30423043 rt->PictureCount++;
30433044
30443045 /* DXRubyPictureオブジェクト設定 */
3045- picture[3].func = RenderTarget_drawLine_func;
3046- picture[3].x1 = x2 - rt->ox;
3047- picture[3].y1 = y1 - rt->oy + 1;
3048- picture[3].x2 = x2 - rt->ox;
3049- picture[3].y2 = y2 - rt->oy;
3050- picture[3].value = Qnil;
3051- picture[3].alpha = 0xff;
3052- picture[3].blendflag = 0;
3053- picture[3].col = col;
3046+ picture = (struct DXRubyPicture_drawLine *)RenderTarget_AllocPictureList( rt, sizeof( struct DXRubyPicture_drawLine ) );
3047+ picture->func = RenderTarget_drawLine_func;
3048+ picture->x1 = x2 - rt->ox;
3049+ picture->y1 = y1 - rt->oy + 1;
3050+ picture->x2 = x2 - rt->ox;
3051+ picture->y2 = y2 - rt->oy;
3052+ picture->value = Qnil;
3053+ picture->alpha = 0xff;
3054+ picture->blendflag = 0;
3055+ picture->col = col;
30543056
30553057 /* リストデータに追加 */
3056- rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)&picture[3];
3058+ rt->PictureList[rt->PictureCount].picture = (struct DXRubyPicture *)picture;
30573059 z = argc < 6 || argv[5] == Qnil ? 0.0f : NUM2FLOAT( argv[5] );
30583060 rt->PictureList[rt->PictureCount].z = z;
3059- picture[3].z = z;
3061+ picture->z = z;
30603062 rt->PictureCount++;
30613063 }
30623064
--- branches/1.4.5/font.c (revision 540)
+++ branches/1.4.5/font.c (revision 541)
@@ -590,7 +590,7 @@
590590 {
591591 struct DXRubyFont *font = DXRUBY_GET_STRUCT( Font, self );
592592 int intBlackBoxX, intBlackBoxY, intCellIncX, intPtGlyphOriginX, intPtGlyphOriginY, intTmAscent, intTmDescent;
593- VALUE ary[6];
593+ VALUE ary[7];
594594
595595 Font_getInfo_internal( vstr, font, &intBlackBoxX, &intBlackBoxY, &intCellIncX, &intPtGlyphOriginX, &intPtGlyphOriginY, &intTmAscent, &intTmDescent );
596596
--- branches/1.4.5/version.h (revision 540)
+++ branches/1.4.5/version.h (revision 541)
@@ -1,10 +1,10 @@
11 /*
22 ###################################
33 #
4-# DXRuby 1.4.4
4+# DXRuby 1.4.5
55 #
66 ###################################
77 */
8-#define DXRUBY_VERSION "1.4.4"
8+#define DXRUBY_VERSION "1.4.5"
99
1010 //#define DXRUBY15
Show on old repository browser