Changeset 2254 for libcaca/trunk/src/cacademo.c
- Timestamp:
- Mar 2, 2008, 3:27:43 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
libcaca/trunk/src/cacademo.c
r2049 r2254 231 231 float angle = (0.0075f * completed * 360) * 3.14 / 180, x, y; 232 232 unsigned int i; 233 int w = cucul_get_canvas_width(mask); 234 int h = cucul_get_canvas_height(mask); 233 235 234 236 switch(tmode) … … 294 296 for(i = 0; i < 8; i++) 295 297 { 296 int w = cucul_get_canvas_width(mask); 297 int h = cucul_get_canvas_height(mask); 298 int z = ((i & 1) ? h : -h) * (100 - completed) / 100; 299 300 cucul_fill_box(mask, i * w / 8, z, (i + 1) * w / 8, z + h, '#'); 298 int z = ((i & 1) ? w : (-w)/2) * (100 - completed) / 100; 299 cucul_fill_box(mask, i * w / 8, z , (w / 8) + 1, z + h, '#'); 301 300 } 302 301 break; 303 302 304 303 case TRANSITION_HLINES: 304 305 305 for(i = 0; i < 6; i++) 306 306 { 307 int w = cucul_get_canvas_width(mask); 308 int h = cucul_get_canvas_height(mask); 309 int z = ((i & 1) ? w : -w) * (100 - completed) / 100; 310 311 cucul_fill_box(mask, z, i * h / 6, z + w, (i + 1) * h / 6, '#'); 307 int z = ((i & 1) ? w : (-w)/2) * (100 - completed) / 100; 308 cucul_fill_box(mask, z, i * h / 6, z + w, (h / 6) + 1, '#'); 312 309 } 313 310 break;
Note: See TracChangeset
for help on using the changeset viewer.