Ignore:
Timestamp:
Mar 15, 2008, 12:55:44 AM (11 years ago)
Author:
Sam Hocevar
Message:
  • Rename the "eh" variable to "wm" because it's a window manager, not an event handler.
  • No longer pass the window manager to functions, there's only one.

Inspired by Win32 Abuse changelog for January 28, 2001:

  • Starting work on singleton code; will get rid of all

references to an arbitrary window_manager* because
there's only going to be one, and it's not ever
going to change.

File:
1 edited

Legend:

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

    r56 r106  
    787787    {
    788788      c1=morph_sel_frame_color;
    789       c2=eh->bright_color();
     789      c2=wm->bright_color();
    790790    } else
    791791    {
    792792      c2=morph_sel_frame_color;
    793       c1=eh->bright_color();
     793      c1=wm->bright_color();
    794794    }
    795795   
     
    16301630    sd.add_by_hand(new spec_entry(SPEC_DATA_ARRAY,"player_names",NULL,name_len,0));
    16311631
    1632     sd.add_by_hand(new spec_entry(SPEC_IMAGE,"thumb nail",NULL,4+160*(100+eh->font()->height()*2),0));
     1632    sd.add_by_hand(new spec_entry(SPEC_IMAGE,"thumb nail",NULL,4+160*(100+wm->font()->height()*2),0));
    16331633  }
    16341634
     
    16421642void level::write_thumb_nail(bFILE *fp, image *im)
    16431643{
    1644   image *i=new image(160,100+eh->font()->height()*2);
     1644  image *i=new image(160,100+wm->font()->height()*2);
    16451645  i->clear();
    16461646  scale_put(im,i,0,0,160,100);
    16471647  if (first_name)
    1648     eh->font()->put_string(i,80-strlen(first_name)*eh->font()->width()/2,100,first_name);
     1648    wm->font()->put_string(i,80-strlen(first_name)*wm->font()->width()/2,100,first_name);
    16491649
    16501650  time_t t;
     
    16531653
    16541654  strftime(buf,80,"%T %A %B %d",localtime(&t)); 
    1655   eh->font()->put_string(i,80-strlen(buf)*eh->font()->width()/2,100+eh->font()->height(),buf);
     1655  wm->font()->put_string(i,80-strlen(buf)*wm->font()->width()/2,100+wm->font()->height(),buf);
    16561656
    16571657  fp->write_uint16(i->width());
Note: See TracChangeset for help on using the changeset viewer.