Ignore:
Timestamp:
May 16, 2011, 2:37:19 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: make JCFont use vec2i classes.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/level.cpp

    r666 r668  
    16231623    sd.add_by_hand(new spec_entry(SPEC_DATA_ARRAY,"player_names",NULL,name_len,0));
    16241624
    1625     sd.add_by_hand(new spec_entry(SPEC_IMAGE,"thumb nail",NULL,4+160*(100+wm->font()->height()*2),0));
     1625    sd.add_by_hand(new spec_entry(SPEC_IMAGE,"thumb nail",NULL,4+160*(100+wm->font()->Size().y*2),0));
    16261626  }
    16271627
     
    16351635void level::write_thumb_nail(bFILE *fp, image *im)
    16361636{
    1637   image *i = new image(vec2i(160, 100 + wm->font()->height() * 2));
     1637  image *i = new image(vec2i(160, 100 + wm->font()->Size().y * 2));
    16381638  i->clear();
    16391639  scale_put(im,i,0,0,160,100);
    16401640  if (first_name)
    1641     wm->font()->put_string(i,80-strlen(first_name)*wm->font()->width()/2,100,first_name);
     1641    wm->font()->PutString(i, vec2i(80 - strlen(first_name) * wm->font()->Size().x / 2, 100), first_name);
    16421642
    16431643  time_t t;
     
    16461646
    16471647  strftime(buf,80,"%T %A %B %d",localtime(&t));
    1648   wm->font()->put_string(i,80-strlen(buf)*wm->font()->width()/2,100+wm->font()->height(),buf);
     1648  wm->font()->PutString(i, vec2i(80, 100) + vec2i(-strlen(buf), 2) * wm->font()->Size() / vec2i(2),buf);
    16491649
    16501650  fp->write_uint16(i->Size().x);
Note: See TracChangeset for help on using the changeset viewer.