Changeset 527


Ignore:
Timestamp:
Apr 22, 2011, 4:13:04 AM (12 years ago)
Author:
Sam Hocevar
Message:

imlib: some cleaning up in trans_image before I templatise half of it.

Location:
abuse/trunk/src
Files:
15 edited

Legend:

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

    r524 r527  
    13511351    case 123 : current_object->set_fxacel(lnumber_value(CAR(args))); break;
    13521352    case 124 : current_object->set_fyacel(lnumber_value(CAR(args))); break;
    1353     case 125 : return current_object->picture()->width(); break;
    1354     case 126 : return current_object->picture()->height(); break;
     1353    case 125 : return current_object->picture()->Size().x; break;
     1354    case 126 : return current_object->picture()->Size().y; break;
    13551355    case 127 : { dprintf("trap\n"); } break;   // I use this to set gdb break points
    13561356    case 128 : { return current_level->platform_push(current_object,lnumber_value(CAR(args)),
     
    15001500      game_object *o=(game_object *)lpointer_value(CAR(args));
    15011501      int32_t x=o->x-current_object->x,
    1502         y=-(o->y-o->picture()->height()/2-(current_object->y-(current_object->picture()->height()/2)));
     1502        y=-(o->y-o->picture()->Size().y/2-(current_object->y-(current_object->picture()->Size().y/2)));
    15031503      return lisp_atan2(y,x);
    15041504    } break;
  • abuse/trunk/src/cop.cpp

    r512 r527  
    183183
    184184    o->x=q->x;
    185     o->y=q->y+29-q->picture()->height();
     185    o->y=q->y+29-q->picture()->Size().y;
    186186
    187187    rand_on+=o->lvars[point_angle];
     
    653653    ret=player_move(o,xm,ym,but);
    654654    top->x=o->x;
    655     top->y=o->y+29-top->picture()->height();
     655    top->y=o->y+29-top->picture()->Size().y;
    656656
    657657    if ((but&2) && !o->lvars[is_teleporting] && o->state!=S_climbing && o->state!=S_climb_off)
     
    753753      if (bot->direction<0)
    754754        o->x+=4;
    755       o->y=bot->y+29-bot->picture()->height();
     755      o->y=bot->y+29-bot->picture()->Size().y;
    756756
    757757      void *ret=NULL;
  • abuse/trunk/src/dev.cpp

    r518 r527  
    33273327    if (figures[type]->has_sequence((character_state)j))
    33283328    {
    3329       int s=figures[type]->get_sequence((character_state)j)->size();
     3329      int s=figures[type]->get_sequence((character_state)j)->MemUsage();
    33303330      if (print)
    33313331        dprintf("(%s=%d)",state_names[j],s);
  • abuse/trunk/src/devsel.cpp

    r513 r527  
    3333    case SPEC_FORETILE :
    3434    {
    35       return cache.foret(foretiles[0])->im->width()/scale;
     35      return cache.foret(foretiles[0])->im->Size().x/scale;
    3636    } break;
    3737    case SPEC_BACKTILE :
     
    5050    case SPEC_FORETILE :
    5151    {
    52       return cache.foret(foretiles[0])->im->height()/scale;
     52      return cache.foret(foretiles[0])->im->Size().y/scale;
    5353    } break;
    5454    case SPEC_BACKTILE :
  • abuse/trunk/src/imlib/supmorph.cpp

    r518 r527  
    2828             int aneal_steps, void (*stat_fun)(int))
    2929{
    30   int x,y,w1=hint1->width(),
    31           h1=hint1->height(),
    32           w2=hint2->width(),
    33           h2=hint2->height();
     30  int x,y,w1=hint1->Size().x,
     31          h1=hint1->Size().y,
     32          w2=hint2->Size().x,
     33          h2=hint2->Size().y;
    3434  if (w1>w2) w=w1; else w=w2;
    3535  if (h1>h2) h=h1; else h=h2;
     
    4141  memset(hints2,0,256*2);
    4242
    43   dp=hint1->t_data();
     43  dp=hint1->Data();
    4444  for (y=0; y<h1; y++)
    4545  {
     
    5858
    5959  // hint2 image2
    60   dp=hint2->t_data();
     60  dp=hint2->Data();
    6161  for (y=0; y<h2; y++)
    6262  {
     
    102102
    103103  /**************** Now scan the images again setup hints *********************/
    104   dp=hint1->t_data();
     104  dp=hint1->Data();
    105105  for (y=0; y<h1; y++)
    106106  {
     
    124124  }
    125125
    126   dp=hint2->t_data();
     126  dp=hint2->Data();
    127127  for (y=0; y<h2; y++)
    128128  {
  • abuse/trunk/src/imlib/timage.cpp

    r521 r527  
    1717image *trans_image::make_image()
    1818{
    19   image *im=new image(vec2i(w,h));
     19  image *im = new image(m_size);
    2020
    2121  im->Lock();
    22   uint8_t *d=im->scan_line(0),*dp=data,*dline;
     22  uint8_t *d=im->scan_line(0),*dp=m_data,*dline;
    2323  int y,x;
    24   for (y=0; y<h; y++)
     24  for (y=0; y<m_size.y; y++)
    2525  {
    2626    x=0;
    2727    dline=d;
    28     memset(dline,0,w);
    29     while(x<w)
     28    memset(dline,0,m_size.x);
     29    while(x<m_size.x)
    3030    {
    3131      int skip=*(dp++);
    3232      dline+=skip;
    3333      x+=skip;
    34       if (x<w)
     34      if (x<m_size.x)
    3535      {
    3636    int run=*(dp++);
     
    5151  int size=0,x,y;
    5252  uint8_t *sl,*datap,*marker;
    53   w=im->Size().x;
    54   h=im->Size().y;
     53  m_size = im->Size();
    5554
    5655  im->Lock();
     
    6160    sl=im->scan_line(y);
    6261    x=0;
    63     while (x<w)
     62    while (x<m_size.x)
    6463    {
    6564      size++;
    66       while (x<w && *sl==0) { sl++; x++; }
    67 
    68       if (x<w)
     65      while (x<m_size.x && *sl==0) { sl++; x++; }
     66
     67      if (x<m_size.x)
    6968      {
    7069        size++;  // byte for the size of the run
    71         while (x<w && (*sl)!=0)
     70        while (x<m_size.x && (*sl)!=0)
    7271        {
    7372      size++;
     
    7978  }
    8079
    81   data=(uint8_t *)malloc(size);
     80  m_data=(uint8_t *)malloc(size);
    8281  int ww=im->Size().x,hh=im->Size().y;
    83   datap=data;
     82  datap=m_data;
    8483  if (!datap)
    8584  { printf("size = %d %d (%d)\n",im->Size().x,im->Size().y,size);  }
    86   CONDITION(datap,"malloc error for trans_image::data");
     85  CONDITION(datap,"malloc error for trans_image::m_data");
    8786
    8887  for (y=0; y<hh; y++)  // now actually make the runs
     
    116115}
    117116
     117trans_image::~trans_image()
     118{
     119    free(m_data);
     120}
     121
    118122void trans_image::put_scan_line(image *screen, int x, int y, int line)   // always transparent
    119123{
    120124  int x1, y1, x2, y2;
    121125  screen->GetClip(x1, y1, x2, y2);
    122   if (y + line < y1 || y + line >= y2 || x >= x2 || x + w - 1 < x1)
     126  if (y + line < y1 || y + line >= y2 || x >= x2 || x + m_size.x - 1 < x1)
    123127    return; // clipped off completely?
    124128
    125   uint8_t *datap=data;
     129  uint8_t *datap=m_data;
    126130  int ix;
    127131  while (line)            // skip scan line data until we get to the line of interest
    128132  {
    129     for (ix=0; ix<w; )
     133    for (ix=0; ix<m_size.x; )
    130134    {
    131135      ix+=*datap;        // skip blank space
    132136      datap++;
    133       if (ix<w)
     137      if (ix<m_size.x)
    134138      {
    135139    int run_length=*datap;     // skip run
     
    147151  uint8_t *screen_line=screen->scan_line(y)+x;
    148152
    149   for (ix=0; ix<w; )
     153  for (ix=0; ix<m_size.x; )
    150154  {
    151155    int skip=*datap;              // how much space to skip?
     
    154158    ix+=skip;
    155159
    156     if (ix<w)
     160    if (ix<m_size.x)
    157161    {
    158162      int run_length=*datap;
     
    204208{
    205209    // check to see if it is totally clipped out first
    206     if (y + h <= y1 || y >= y2 || x >= x2 || x + w <= x1)
     210    if (y + m_size.y <= y1 || y >= y2 || x >= x2 || x + m_size.x <= x1)
    207211        return NULL;
    208212
    209     uint8_t *parser = data;
     213    uint8_t *parser = m_data;
    210214
    211215    int skiplines = Max(y1 - y, 0); // number of lines to skip
    212     ysteps = Min(y2 - y, height() - skiplines); // number of lines to draw
     216    ysteps = Min(y2 - y, m_size.y - skiplines); // number of lines to draw
    213217    y += skiplines; // first line to draw
    214218
    215219    while (skiplines--)
    216220    {
    217         for (int ix = 0; ix < w; )
     221        for (int ix = 0; ix < m_size.x; )
    218222        {
    219223            ix += *parser++; // skip over empty space
    220224
    221             if (ix >= w)
     225            if (ix >= m_size.x)
    222226                break;
    223227
     
    227231    }
    228232
    229     screen->AddDirty(Max(x, x1), y, Min(x + width(), x2), y + h);
     233    screen->AddDirty(Max(x, x1), y, Min(x + m_size.x, x2), y + m_size.y);
    230234    return parser;
    231235}
     
    246250
    247251  screen_line=screen->scan_line(y)+x;
    248   int sw=screen->Size().x-w;
     252  int sw=screen->Size().x-m_size.x;
    249253  x1 -= x; x2 -= x;
    250254  for (; ysteps>0; ysteps--)
    251255  {
    252256    int ix,slam_length;
    253     for (ix=0; ix<w; )
     257    for (ix=0; ix<m_size.x; )
    254258    {
    255259      int blank=(*datap);
     
    259263
    260264      datap++;
    261       if (ix<w)
     265      if (ix<m_size.x)
    262266      {
    263267    slam_length=*datap;     // find the length of this run
     
    310314void trans_image::put_image_offseted(image *screen, uint8_t *s_off)   // if screen x & y offset already calculated save a mul
    311315{
    312   int ix,ysteps=height();
     316  int ix,ysteps=m_size.y;
    313317  int screen_skip;
    314   uint8_t skip,*datap=data;
     318  uint8_t skip,*datap=m_data;
    315319
    316320  screen->Lock();
    317   screen_skip = screen->Size().x - w;
     321  screen_skip = screen->Size().x - m_size.x;
    318322  for (; ysteps; ysteps--)
    319323  {
    320     for (ix=0; ix<w; )
     324    for (ix=0; ix<m_size.x; )
    321325    {
    322326      skip=*datap;       // skip leading blank space
     
    329333
    330334
    331       if (ix<w)
     335      if (ix<m_size.x)
    332336      {
    333337    skip=*datap;
     
    364368  {
    365369    int ix,slam_length;
    366     for (ix=0; ix<w; )
     370    for (ix=0; ix<m_size.x; )
    367371    {
    368372      ix+=(*datap);       // skip over empty space
    369373      datap++;
    370       if (ix<w)
     374      if (ix<m_size.x)
    371375      {
    372376    slam_length=*datap;     // find the length of this run
     
    430434  {
    431435    int ix,slam_length;
    432     for (ix=0; ix<w; )
     436    for (ix=0; ix<m_size.x; )
    433437    {
    434438      ix+=(*datap);       // skip over empty space
    435439      datap++;
    436       if (ix<w)
     440      if (ix<m_size.x)
    437441      {
    438442    slam_length=*datap;     // find the length of this run
     
    509513  {
    510514    int ix,slam_length;
    511     for (ix=0; ix<w; )
     515    for (ix=0; ix<m_size.x; )
    512516    {
    513517      ix+=(*datap);       // skip over empty space
    514518      datap++;
    515       if (ix<w)
     519      if (ix<m_size.x)
    516520      {
    517521    slam_length=*datap;     // find the length of this run
     
    592596    screen_line=screen->scan_line(y);
    593597
    594     for (ix=0; ix<w; )
     598    for (ix=0; ix<m_size.x; )
    595599    {
    596600      ix+=(*datap);       // skip over empty space
    597601      datap++;
    598       if (ix<w)
     602      if (ix<m_size.x)
    599603      {
    600604    slam_length=*datap;     // find the length of this run
     
    687691    screen_line=screen->scan_line(y);
    688692
    689     for (ix=0; ix<w; )
     693    for (ix=0; ix<m_size.x; )
    690694    {
    691695      ix+=(*datap);       // skip over empty space
    692696      datap++;
    693       if (ix<w)
     697      if (ix<m_size.x)
    694698      {
    695699    slam_length=*datap;     // find the length of this run
     
    771775    screen_line=screen->scan_line(y);
    772776
    773     for (ix=0; ix<w; )
     777    for (ix=0; ix<m_size.x; )
    774778    {
    775779      ix+=(*datap);       // skip over empty space
    776780      datap++;
    777       if (ix<w)
     781      if (ix<m_size.x)
    778782      {
    779783    slam_length=*datap;     // find the length of this run
     
    844848
    845849
    846     for (ix=0; ix<w; )
     850    for (ix=0; ix<m_size.x; )
    847851    {
    848852      ix+=(*datap);       // skip over empty space
    849853      datap++;
    850       if (ix<w)
     854      if (ix<m_size.x)
    851855      {
    852856    slam_length=*datap;     // find the length of this run
     
    935939
    936940  // see if the last scanline is clipped off
    937   if (y + ysteps == y2 - 1) ysteps -= 2;
    938   else if (y + ysteps == y2 - 2) ysteps--;
    939 /*  {
    940     for (int x=0; x<w; )
    941     {
    942       int skip=*datap; datap++;
    943       x+=skip;
    944       if (x<w)
    945       {
    946     int run_size=*datap;
    947     datap+=run_size+1;
    948     x+=run_size;
    949       }
    950     }
    951     if (y==y2 - 1)
    952       return;
    953     else
    954       y++;
    955   }*/
     941  ysteps = Min(ysteps, y2 - 1 - y - 2);
    956942
    957943  screen->Lock();
     
    962948  {
    963949    int ix,slam_length;
    964     for (ix=0; ix<w; )
     950    for (ix=0; ix<m_size.x; )
    965951    {
    966952      ix+=(*datap);       // skip over empty space
    967953      datap++;
    968       if (ix<w)
     954      if (ix<m_size.x)
    969955      {
    970956    slam_length=*datap;     // find the length of this run
     
    1011997}
    1012998
    1013 int trans_image::size()
    1014 {
    1015   uint8_t *d=data;
    1016   int t=0;
    1017   for (int y=0; y<h; y++)
    1018   {
    1019     int x=0;
    1020     while (x<w)
    1021     {
    1022       x+=*d; d++; t++;
    1023       if (x<w)
    1024       {
    1025     int s=*d; d++; t+=s+1;
    1026     d+=s;
    1027     x+=s;
    1028       }
    1029     }
    1030   }
    1031   return t+4+4;
    1032 }
     999size_t trans_image::MemUsage()
     1000{
     1001    uint8_t *d = m_data;
     1002    size_t t = 0;
     1003
     1004    for (int y = 0; y < m_size.y; y++)
     1005    {
     1006        for (int x = 0; x < m_size.x; x++)
     1007        {
     1008            x += *d; d++; t++;
     1009
     1010            if (x >= m_size.x)
     1011                break;
     1012
     1013            int s = *d; d++; t += s + 1; d += s; x += s;
     1014        }
     1015    }
     1016    return t + 4 + 4;
     1017}
     1018
  • abuse/trunk/src/imlib/timage.h

    r524 r527  
    2525class trans_image       // transpernet image
    2626{
    27   unsigned char *data;
    28   short w,h;
     27public:
     28  trans_image(image *im, char const *name);  // name has no meaning if MEM_CHECK is off
    2929
    30 public :
    31   short height() { return h; }
    32   short width() { return w; }
    33   trans_image(image *im, char const *name);  // name has no meaning if MEM_CHECK is off
     30  inline vec2i Size() { return m_size; }
     31  uint8_t *Data() { return m_data; }
     32
    3433  void put_image(image *screen, int x, int y);   // always transparent
    3534
     
    5453  void put_predator(image *screen, int x, int y);
    5554  void put_scan_line(image *screen, int x, int y, int line);   // always transparent
    56   unsigned char *t_data() { return data; }
    57   int size();
     55  size_t MemUsage();
    5856  image *make_image();
    59   ~trans_image() { free(data); }
     57  ~trans_image();
    6058
    6159private:
    6260  uint8_t *ClipToLine(image *screen, int x1, int y1, int x2, int y2,
    6361                      int x, int &y, int &ysteps);
    64 } ;
    6562
     63  vec2i m_size;
     64  uint8_t *m_data;
     65};
    6666
    6767#endif
    6868
    69 
    70 
    71 
    72 
  • abuse/trunk/src/items.cpp

    r526 r527  
    273273}
    274274
    275 int figure::size()
    276 {
    277   return forward->size()+backward->size()+
    278   hit->size()+
    279   f_damage->size()+
    280   b_damage->size()+sizeof(figure);
     275size_t figure::MemUsage()
     276{
     277    return forward->MemUsage() + backward->MemUsage() + hit->size()
     278            + f_damage->size() + b_damage->size() + sizeof(figure);
    281279}
    282280
  • abuse/trunk/src/items.h

    r512 r527  
    5454
    5555  foretile(bFILE *fp);
    56   int32_t size() { return im->width()*im->height()+4+2+1+points->size(); }
     56  int32_t size() { return im->Size().x*im->Size().y+4+2+1+points->size(); }
    5757  ~foretile() { delete im; delete points; delete micro_image; }
    5858} ;
     
    6666  point_list *hit;
    6767  boundary *f_damage,*b_damage;
    68   int size();
     68  size_t MemUsage();
    6969
    7070  figure(bFILE *fp, int type);
    71   int width() { return forward->width(); }
    72   int height() { return forward->height(); }
     71  int width() { return forward->Size().x; }
     72  int height() { return forward->Size().y; }
    7373
    74 /*  int32_t size(int type)         // taken from spaint items
    75   {
    76     if
    77     return forward->width()*backward->height()+4+
    78                        1+1+       // hit & xcfg
    79                touch->size()+
    80                hit->size()+
    81                damage->size();
    82   }*/
    83 
    84   ~figure() { delete forward; delete backward;
    85           delete hit;
    86           delete f_damage; delete b_damage; }
     74  ~figure() { delete forward; delete backward; delete hit;
     75              delete f_damage; delete b_damage; }
    8776} ;
    8877
  • abuse/trunk/src/level.cpp

    r524 r527  
    30073007    if (o!=exclude && o->hurtable())
    30083008    {
    3009       int32_t y1=o->y,y2=o->y-o->picture()->height();
     3009      int32_t y1=o->y,y2=o->y-o->picture()->Size().y;
    30103010      int32_t cx=abs(o->x-x),cy1=abs(y1-y),d1,d2,cy2=abs(y2-y);
    30113011      if (cx<cy1)
  • abuse/trunk/src/loader2.cpp

    r523 r527  
    455455  ERROR(big_font_pict!=-1 || small_font_pict!=-1,
    456456    "No font loaded (use load_big_font or load_small_font)!");
    457   f_wid=cache.foret(foretiles[0])->im->width();
    458   f_hi=cache.foret(foretiles[0])->im->height();
     457  f_wid=cache.foret(foretiles[0])->im->Size().x;
     458  f_hi=cache.foret(foretiles[0])->im->Size().y;
    459459  b_wid=cache.backt(backtiles[0])->im->Size().x;
    460460  b_hi=cache.backt(backtiles[0])->im->Size().y;
  • abuse/trunk/src/objects.cpp

    r519 r527  
    587587void game_object::picture_space(int32_t &x1, int32_t &y1,int32_t &x2, int32_t &y2)
    588588{
    589   int xc=x_center(),w=picture()->width(),h=picture()->height();
     589  int xc=x_center(),w=picture()->Size().x,h=picture()->Size().y;
    590590  if (direction>0)
    591591    x1=x-xc;
     
    682682  trans_image *cpict=picture();
    683683  cpict->put_fade(screen,
    684           (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    685           y-cpict->height()+1-current_vyadd,
     684          (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     685          y-cpict->Size().y+1-current_vyadd,
    686686          count,max,
    687687          color_table,the_game->current_palette());
     
    694694  if (fade_count())
    695695    cpict->put_fade_tint(screen,
    696                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    697                y-cpict->height()+1-current_vyadd,
     696               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     697               y-cpict->Size().y+1-current_vyadd,
    698698               fade_count(),fade_max(),
    699699               cache.ctint(tint_id)->data,
     
    703703  else
    704704    cpict->put_remaped(screen,
    705                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    706                y-cpict->height()+1-current_vyadd,
     705               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     706               y-cpict->Size().y+1-current_vyadd,
    707707               cache.ctint(tint_id)->data);
    708708}
     
    714714  if (fade_count())
    715715    cpict->put_fade_tint(screen,
    716                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    717                y-cpict->height()+1-current_vyadd,
     716               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     717               y-cpict->Size().y+1-current_vyadd,
    718718               fade_count(),fade_max(),
    719719               cache.ctint(tint_id)->data,
     
    723723  else
    724724    cpict->put_double_remaped(screen,
    725                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    726                y-cpict->height()+1-current_vyadd,
     725               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     726               y-cpict->Size().y+1-current_vyadd,
    727727               cache.ctint(tint_id)->data,
    728728               cache.ctint(tint2)->data);
     
    735735  trans_image *cpict=picture();
    736736  cpict->put_predator(screen,
    737              (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    738              y-cpict->height()+1-current_vyadd);
     737             (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     738             y-cpict->Size().y+1-current_vyadd);
    739739
    740740}
     
    758758      trans_image *cpict=picture();
    759759      cpict->put_image(screen,
    760                (direction<0 ? x-(cpict->width()-x_center()-1) : x-x_center())-current_vxadd,
    761                y-cpict->height()+1-current_vyadd);
     760               (direction<0 ? x-(cpict->Size().x-x_center()-1) : x-x_center())-current_vxadd,
     761               y-cpict->Size().y+1-current_vyadd);
    762762    }
    763763  }
     
    787787    if (checks&2)
    788788    {
    789       h=picture()->height();
     789      h=picture()->Size().y;
    790790      x2=x+xv;
    791791      y2=y-h+1+yv;
  • abuse/trunk/src/objects.h

    r494 r527  
    127127  void picture_space(int32_t &x1, int32_t &y1,int32_t &x2, int32_t &y2);
    128128  int tx(int x) { if (direction>0) return x-x_center(); else return x_center()-x; }
    129   int ty(int y) { return y-picture()->height()+1; }
     129  int ty(int y) { return y-picture()->Size().y+1; }
    130130  void defaults();
    131131
  • abuse/trunk/src/seq.cpp

    r524 r527  
    1616#include "lisp.h"
    1717
    18 int sequence::size()
     18size_t sequence::MemUsage()
    1919{
    20   int t=0;
    21   for (int i=0; i<total; i++)
    22   {
    23     if (cache.loaded(seq[i]))
    24       t+=cache.fig(seq[i])->size();
    25   }
    26   return t;
     20    size_t t = 0;
     21    for (int i = 0; i < total; i++)
     22        if (cache.loaded(seq[i]))
     23            t += cache.fig(seq[i])->MemUsage();
     24    return t;
    2725}
    2826
  • abuse/trunk/src/seq.h

    r494 r527  
    3838  int length() { return total; }
    3939  int get_advance(int current) { return cache.fig(seq[current])->advance; }
    40   int size();
     40  size_t MemUsage();
    4141  ~sequence();
    4242};
Note: See TracChangeset for help on using the changeset viewer.