Ignore:
Timestamp:
Mar 18, 2008, 12:05:08 AM (11 years ago)
Author:
Sam Hocevar
Message:
  • Cleaned up cache.cpp.
  • Renamed stupid "cash" variable into "cache".
  • Rename cache_list and crc_manager into CacheList? and CrcManager?.
File:
1 edited

Legend:

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

    r106 r123  
    6464  scene_frame *next; 
    6565  scene_frame(char *&s);
    66   ~scene_frame() { cash.unreg(picture); }
     66  ~scene_frame() { cache.unreg(picture); }
    6767} ;
    6868
     
    7373  expect(get_token(s,tmp_name),sWORD,s);
    7474
    75   picture=cash.reg(scene_filename,tmp_name);
     75  picture=cache.reg(scene_filename,tmp_name);
    7676  if (picture<0)
    7777  {
     
    213213  void set_seq(char *seq_name)
    214214  { current_seq=seq_list->get_seq(seq_name); }
    215   int x() { return the_game->screenx(me->x)-cash.fig(current_frame->picture)->xcfg; }       
    216   int y() { return the_game->screeny(me->y)-cash.fig(current_frame->picture)->forward->height(); }
     215  int x() { return the_game->screenx(me->x)-cache.fig(current_frame->picture)->xcfg; }       
     216  int y() { return the_game->screeny(me->y)-cache.fig(current_frame->picture)->forward->height(); }
    217217  int next_frame();  // true if sequence is done
    218218  ~scene_character() { jfree(n); delete seq_list; if (last_frame) delete last_frame; }     
     
    250250  while (p)
    251251  {   
    252     if (x()+cash.fig(p->picture)->width()-1>x2)
    253       x2=x()+cash.fig(p->picture)->width()-1;
    254     if (y()+cash.fig(p->picture)->height()-1>y2)
    255       y2=y()+cash.fig(p->picture)->height()-1;
     252    if (x()+cache.fig(p->picture)->width()-1>x2)
     253      x2=x()+cache.fig(p->picture)->width()-1;
     254    if (y()+cache.fig(p->picture)->height()-1>y2)
     255      y2=y()+cache.fig(p->picture)->height()-1;
    256256    p=p->next;
    257257  } 
     
    261261void scene_character::draw()
    262262{
    263   cash.fig(current_frame->picture)->forward->put_image(screen,x(),y());
     263  cache.fig(current_frame->picture)->forward->put_image(screen,x(),y());
    264264 
    265265}
Note: See TracChangeset for help on using the changeset viewer.