Changeset 662
- Timestamp:
- May 15, 2011, 5:31:48 PM (11 years ago)
- Location:
- abuse/trunk
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
abuse/trunk/TODO
r661 r662 57 57 -------- 58 58 - move to vec2i: 59 - PutPart -> changer le 2e arg. de la bbox60 59 - AddDirty !! 61 60 - update_dirty -
abuse/trunk/src/imlib/fonts.cpp
r661 r662 29 29 { if (fntpat) 30 30 screen->PutPartMasked(fntpat, vec2i(x, y), let, 31 vec2i(((int)ch%32)*tl,((int)ch/32)*th), vec2i(0,0), vec2i(tl -1,th-1));31 vec2i(((int)ch%32)*tl,((int)ch/32)*th), vec2i(0,0), vec2i(tl,th)); 32 32 else screen->PutPart(let, vec2i(x, y), vec2i(((int)ch%32)*tl, ((int)ch/32)*th), 33 vec2i(((int)ch%32)*tl+tl -1, ((int)ch/32)*th+th-1), 1);33 vec2i(((int)ch%32)*tl+tl, ((int)ch/32)*th+th), 1); 34 34 } 35 35 … … 75 75 tmp.clear(); 76 76 tmp.PutPart(letters, vec2i(0, 0), vec2i(((int)ch%32)*tl, ((int)ch/32)*th), 77 vec2i(((int)ch%32)*tl+tl -1, ((int)ch/32)*th+th-1), 1);77 vec2i(((int)ch%32)*tl+tl, ((int)ch/32)*th+th), 1); 78 78 let[ch] = new TransImage(&tmp, "JCfont"); 79 79 } -
abuse/trunk/src/imlib/image.cpp
r661 r662 327 327 if(m_special) 328 328 { 329 PutPart(im, pos, vec2i(0), im->m_size - vec2i(1), transparent);329 PutPart(im, pos, vec2i(0), im->m_size, transparent); 330 330 return; 331 331 } … … 382 382 void image::PutPart(image *im, vec2i pos, vec2i aa, vec2i bb, int transparent) 383 383 { 384 vec2i span; 385 CHECK(aa <= bb); 384 CHECK(aa < bb); 386 385 387 386 int cx1, cy1, cx2, cy2; … … 392 391 pos += Min(aa, vec2i(0)); 393 392 aa += Min(aa, vec2i(0)); 394 bb = Min(bb, im->m_size - vec2i(1));393 bb = Min(bb, im->m_size); 395 394 // return if it was adjusted so that nothing will be put 396 if (!(aa < =bb))395 if (!(aa < bb)) 397 396 return; 398 397 399 398 // see if the image gets clipped off the screen 400 if (pos.x >= cx2 || pos.y >= cy2 || pos.x + (bb.x - aa.x) < cx1 || pos.y + (bb.y - aa.y) <cy1)399 if (pos.x >= cx2 || pos.y >= cy2 || pos.x + (bb.x - aa.x) <= cx1 || pos.y + (bb.y - aa.y) <= cy1) 401 400 return; 402 401 403 402 aa += Max(vec2i(cx1, cy1) - pos, vec2i(0)); 404 403 pos += Max(vec2i(cx1, cy1) - pos, vec2i(0)); 405 bb = Min(bb, vec2i(cx2, cy2) - vec2i(1) -pos + aa);406 if (!(aa < =bb))407 return; 408 409 span = bb - aa + vec2i(1);404 bb = Min(bb, vec2i(cx2, cy2) - pos + aa); 405 if (!(aa < bb)) 406 return; 407 408 vec2i span = bb - aa; 410 409 411 410 AddDirty(pos.x, pos.y, pos.x + span.x, pos.y + span.y); … … 435 434 vec2i aa, vec2i bb) 436 435 { 437 CHECK(aa < =bb);436 CHECK(aa < bb); 438 437 439 438 if (m_special) … … 442 441 m_special->GetClip(cx1, cy1, cx2, cy2); 443 442 444 if (!(pos < vec2i(cx2, cy2) && pos > =aa - bb))443 if (!(pos < vec2i(cx2, cy2) && pos > aa - bb)) 445 444 return; 446 445 447 446 aa += Max(vec2i(cx1, cy1) - pos, vec2i(0)); 448 447 pos += Max(vec2i(cx1, cy1) - pos, vec2i(0)); 449 bb = Min(bb, vec2i(cx2, cy2) - vec2i(1) -pos + aa);448 bb = Min(bb, vec2i(cx2, cy2) - pos + aa); 450 449 } 451 450 else if (!(pos <= m_size && pos >= -aa)) … … 454 453 vec2i mask_size = mask->Size(); 455 454 456 if (!(pos < m_size && aa < im->m_size && mpos < mask_size && aa < =bb))457 return; 458 459 bb = Min(bb, im->m_size - vec2i(1));460 461 vec2i span = bb - aa + vec2i(1);462 span = Min(span, m_size - pos - vec2i(1));455 if (!(pos < m_size && aa < im->m_size && mpos < mask_size && aa < bb)) 456 return; 457 458 bb = Min(bb, im->m_size); 459 460 vec2i span = bb - aa; 461 span = Min(span, m_size - pos); 463 462 AddDirty(pos.x, pos.y, pos.x + span.x, pos.y + span.y); 464 463 -
abuse/trunk/src/imlib/jwindow.cpp
r661 r662 334 334 { 335 335 m1 = m_pos - m_center; 336 vec2i m2 = m1 + m_sprite->visual->Size() - vec2i(1, 1);336 vec2i m2 = m1 + m_sprite->visual->Size(); 337 337 338 338 m_sprite->save->PutPart(m_surf, vec2i(0, 0), m1, m2); … … 356 356 { 357 357 m_sprite->save->PutPart(p->m_surf, vec2i(0, 0), m1 - p->m_pos, 358 m1 - p->m_pos + m_sprite->visual->Size() - vec2i(1, 1));358 m1 - p->m_pos + m_sprite->visual->Size()); 359 359 p->m_surf->PutImage(m_sprite->visual, m1 - p->m_pos, 1); 360 360 } -
abuse/trunk/src/imlib/sprite.cpp
r661 r662 30 30 void sprite::get_background() 31 31 { if (x+visual->Size().x>=0 && y+visual->Size().y>=0 && x<=xres && y<=yres) 32 save->PutPart(screen,vec2i(0,0), vec2i(x,y), vec2i(x+save->Size().x -1,y+save->Size().y-1)); }32 save->PutPart(screen,vec2i(0,0), vec2i(x,y), vec2i(x+save->Size().x,y+save->Size().y)); } 33 33 34 34 void sprite::draw() -
abuse/trunk/src/menu.cpp
r661 r662 237 237 int by2=by1+bh-1; 238 238 239 save->PutPart(main_screen, vec2i(0, 0), vec2i(mx + 1, by1), vec2i(mx + mw - 2, by2));239 save->PutPart(main_screen, vec2i(0, 0), vec2i(mx + 1, by1), vec2i(mx + mw - 1, by2 + 1)); 240 240 tint_area(mx+1,by1,mx+mw-2,by2,63,63,63,color); 241 241
Note: See TracChangeset
for help on using the changeset viewer.