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

    r88 r106  
    7373    buts[i]->next=buts[i+1];
    7474
    75   return eh->new_window(mx,yres/2-(WINDOW_FRAME_TOP+ih*5)/2,-1,-1,buts[0]);
     75  return wm->new_window(mx,yres/2-(WINDOW_FRAME_TOP+ih*5)/2,-1,-1,buts[0]);
    7676}
    7777
     
    103103  do
    104104  {
    105     eh->flush_screen();
    106     eh->get_event(ev);
     105    wm->flush_screen();
     106    wm->get_event(ev);
    107107    if (ev.type==EV_MESSAGE && ev.message.id>=ID_LOAD_GAME_NUMBER && ev.message.id<ID_LOAD_GAME_PREVIEW)
    108108      got_level=ev.message.id-ID_LOAD_GAME_NUMBER+1;
     
    113113  } while (!got_level && !quit);
    114114
    115   eh->close_window(l_win);
     115  wm->close_window(l_win);
    116116  the_game->reset_keymap();
    117117  return got_level;
     
    220220
    221221        jwindow *l_win=create_num_window(0,total_saved,thumb_nails);
    222         jwindow *preview=eh->new_window(l_win->x+l_win->l+5,l_win->y,max_w,max_h,NULL,title);
     222        jwindow *preview=wm->new_window(l_win->x+l_win->l+5,l_win->y,max_w,max_h,NULL,title);
    223223
    224224        first->put_image(preview->screen,preview->x1(),preview->y1());
     
    229229        do
    230230        {
    231                 eh->flush_screen();
    232                 eh->get_event(ev);
     231                wm->flush_screen();
     232                wm->get_event(ev);
    233233                if (ev.type==EV_MESSAGE && ev.message.id>=ID_LOAD_GAME_NUMBER && ev.message.id<ID_LOAD_GAME_PREVIEW)
    234234                        got_level=ev.message.id-ID_LOAD_GAME_NUMBER+1;
     
    245245        } while (!got_level && !quit);
    246246
    247         eh->close_window(l_win);
    248         eh->close_window(preview);
     247        wm->close_window(l_win);
     248        wm->close_window(preview);
    249249
    250250        for (i=0;i<total_saved;i++)
Note: See TracChangeset for help on using the changeset viewer.