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/ant.cpp

    r60 r106  
    443443  {
    444444    fade_out(8);
    445     eh->set_mouse_position(0,0);
     445    wm->set_mouse_position(0,0);
    446446    screen->clear();
    447447    image *im=cash.img(cash.reg("art/frame.spe","end_level_screen",SPEC_IMAGE,1));
     
    468468    } else sprintf(msg,"%s : %s",symbol_str("lev_complete"),current_level->original_name());
    469469
    470     int w=eh->font()->width()*strlen(msg),h=eh->font()->height();   
     470    int w=wm->font()->width()*strlen(msg),h=wm->font()->height();   
    471471    int x=(x1+x2)/2-w/2,y=(y1+y2)/2-h/2;
    472     screen->bar(x-10,y-10,x+w+10,y+h+10,eh->bright_color());
    473     screen->bar(x-9,y-9,x+w+9,y+h+9,eh->medium_color());
    474 
    475     eh->font()->put_string(screen,x+1,y+1,msg,eh->dark_color());   
    476     eh->font()->put_string(screen,x,y,msg,eh->bright_color());
    477     eh->flush_screen();
     472    screen->bar(x-10,y-10,x+w+10,y+h+10,wm->bright_color());
     473    screen->bar(x-9,y-9,x+w+9,y+h+9,wm->medium_color());
     474
     475    wm->font()->put_string(screen,x+1,y+1,msg,wm->dark_color());   
     476    wm->font()->put_string(screen,x,y,msg,wm->bright_color());
     477    wm->flush_screen();
    478478    milli_wait(500);
    479479  }
Note: See TracChangeset for help on using the changeset viewer.