Changeset 512 for abuse/trunk/src/imlib/timage.cpp
- Timestamp:
- Apr 20, 2011, 12:39:27 AM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/src/imlib/timage.cpp
r494 r512 11 11 #include "config.h" 12 12 13 #include "common.h" 14 13 15 #include "timage.h" 14 16 … … 70 72 int size=0,x,y; 71 73 uint8_t *sl,*datap,*marker; 72 w=im-> width();73 h=im-> height();74 w=im->Size().x; 75 h=im->Size().y; 74 76 75 77 im->lock(); 76 78 77 79 // first we must find out how much data to allocate 78 for (y=0; y<im-> height(); y++)80 for (y=0; y<im->Size().y; y++) 79 81 { 80 82 sl=im->scan_line(y); … … 99 101 100 102 data=(uint8_t *)malloc(size); 101 int ww=im-> width(),hh=im->height();103 int ww=im->Size().x,hh=im->Size().y; 102 104 datap=data; 103 105 if (!datap) 104 { printf("size = %d %d (%d)\n",im-> width(),im->height(),size); }106 { printf("size = %d %d (%d)\n",im->Size().x,im->Size().y,size); } 105 107 CONDITION(datap,"malloc error for trans_image::data"); 106 108 … … 112 114 { 113 115 *datap=0; // start the skip at 0 114 while (x<im-> width()&& (*sl)==0)116 while (x<im->Size().x && (*sl)==0) 115 117 { sl++; x++; (*datap)++; } 116 118 datap++; … … 121 123 *marker=0; 122 124 datap++; // skip over this spot 123 while (x<im-> width()&& (*sl)!=0)125 while (x<im->Size().x && (*sl)!=0) 124 126 { 125 127 (*marker)++; … … 274 276 275 277 screen_line=screen->scan_line(y)+x; 276 int sw=screen-> width()-w;278 int sw=screen->Size().x-w; 277 279 x1-=x; x2-=x; 278 280 for (; ysteps>0; ysteps--) … … 343 345 344 346 screen->lock(); 345 screen_skip = screen-> width()- w;347 screen_skip = screen->Size().x - w; 346 348 for (; ysteps; ysteps--) 347 349 { … … 366 368 ix+=skip; 367 369 368 if (s_off>=screen->scan_line(screen-> height()+1))370 if (s_off>=screen->scan_line(screen->Size().y+1)) 369 371 printf("bad write in trans_image::put_image_offseted"); 370 372 } … … 386 388 screen->lock(); 387 389 screen_line=screen->scan_line(y)+x; 388 int sw=screen-> width();390 int sw=screen->Size().x; 389 391 x1-=x; x2-=x; 390 392 for (; ysteps>0; ysteps--) … … 451 453 screen->lock(); 452 454 screen_line=screen->scan_line(y)+x; 453 int sw=screen-> width();455 int sw=screen->Size().x; 454 456 x1-=x; x2-=x; 455 457 for (; ysteps>0; ysteps--) … … 529 531 screen->lock(); 530 532 screen_line=screen->scan_line(y)+x; 531 int sw=screen-> width();533 int sw=screen->Size().x; 532 534 x1-=x; x2-=x; 533 535 for (; ysteps>0; ysteps--) … … 857 859 *blend_line,*screen_line; 858 860 if (!datap) return ; 859 CONDITION(y>=blendy && y+ysteps<blendy+blend-> height()+1,"Blend doesn't fit on trans_image");861 CONDITION(y>=blendy && y+ysteps<blendy+blend->Size().y+1,"Blend doesn't fit on trans_image"); 860 862 861 863 blend_amount=16-blend_amount; … … 979 981 screen->lock(); 980 982 screen_line=screen->scan_line(y)+x; 981 int sw=screen-> width();983 int sw=screen->Size().x; 982 984 x1-=x; x2-=x; 983 985 for (; ysteps>0; ysteps--)
Note: See TracChangeset
for help on using the changeset viewer.