Changeset 644


Ignore:
Timestamp:
May 13, 2011, 9:13:58 AM (9 years ago)
Author:
Sam Hocevar
Message:

imlib: reverse the image::put_image logic.

Location:
abuse/trunk/src
Files:
25 edited

Legend:

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

    r643 r644  
    451451    main_screen->clear();
    452452    image *im=cache.img(cache.reg("art/frame.spe","end_level_screen",SPEC_IMAGE,1));
    453     im->put_image(main_screen,0,0);
     453    main_screen->PutImage(im, 0, 0);
    454454
    455455
  • abuse/trunk/src/automap.cpp

    r643 r644  
    2323{
    2424  if (!automap_window) return ;
    25   image *screen=automap_window->screen;
     25  image *screen=automap_window->m_surf;
    2626
    2727  long sx,ex,sy,ey,x,y,window_xstart,window_ystart,
     
    6464  if (draw_xstart==old_dx && draw_ystart==old_dy)
    6565  {
    66    automap_window->screen->Lock();
    67    automap_window->screen->AddDirty(centerx,centery,centerx + 1,centery + 1);
     66   automap_window->m_surf->Lock();
     67   automap_window->m_surf->AddDirty(centerx,centery,centerx + 1,centery + 1);
    6868    if ((tick++)&4)
    69       automap_window->screen->PutPixel(vec2i(centerx,centery),255);
     69      automap_window->m_surf->PutPixel(vec2i(centerx,centery),255);
    7070    else
    71       automap_window->screen->PutPixel(vec2i(centerx,centery),27);
    72    automap_window->screen->Unlock();
     71      automap_window->m_surf->PutPixel(vec2i(centerx,centery),27);
     72   automap_window->m_surf->Unlock();
    7373    return ;
    7474  }
     
    103103
    104104
    105   // draw the tiles that will be around the border of the automap with put_image
     105  // draw the tiles that will be around the border of the automap with PutImage
    106106  // because it handles clipping, but for ths reason is slower, the rest
    107107  // we will slam on as fast as possible
    108108
    109   screen->SetClip(window_xstart,window_ystart,window_xend+1,window_yend+1);
    110 /*  for (i=draw_xstart,j=draw_ystart,x=sx,y=sy; y<=ey; j+=AUTOTILE_HEIGHT,y++)
    111     foretiles[cur_lev->get_fg(x,y)]->micro_image->put_image(screen,i,j,0);
     109  screen->SetClip(window_xstart, window_ystart, window_xend+1, window_yend+1);
     110#if 0
     111  for (i=draw_xstart,j=draw_ystart,x=sx,y=sy; y<=ey; j+=AUTOTILE_HEIGHT,y++)
     112    screen->PutImage(foretiles[cur_lev->get_fg(x, y)]->micro_image, i, j, 0);
    112113
    113114  for (i=draw_xstart+ex*AUTOTILE_WIDTH,j=draw_ystart,y=sy,x=ex; y<=ey; j+=AUTOTILE_HEIGHT,y++)
    114     foretiles[cur_lev->get_fg(x,y)]->micro_image->put_image(screen,i,j,0);
     115    screen->PutImage(foretiles[cur_lev->get_fg(x, y)]->micro_image, i, j, 0);
    115116
    116117  for (i=draw_xstart,j=draw_ystart,x=sx,y=sy; x<=ex; i+=AUTOTILE_WIDTH,x++)
    117     foretiles[cur_lev->get_fg(x,y)]->micro_image->put_image(screen,i,j,0);
     118    screen->PutImage(foretiles[cur_lev->get_fg(x, y)]->micro_image, i, j, 0);
    118119
    119120  for (i=draw_xstart,j=draw_ystart+ey*AUTOTILE_HEIGHT,x=sx,y=ex; x<=ex; i+=AUTOTILE_WIDTH,x++)
    120     foretiles[cur_lev->get_fg(x,y)]->micro_image->put_image(screen,i,j,0); */
    121 
    122 
     121    screen->PutImage(foretiles[cur_lev->get_fg(x, y)]->micro_image, i, j, 0);
     122#endif
    123123
    124124  unsigned short *fgline;
     
    132132    int id=foretiles[ (*fgline)&0x7fff];
    133133    if (id>=0)
    134           cache.foret(id)->micro_image->put_image(screen,i,j,0);
     134          screen->PutImage(cache.foret(id)->micro_image, i, j, 0);
    135135    else
    136           cache.foret(foretiles[0])->micro_image->put_image(screen,i,j,0);
     136          screen->PutImage(cache.foret(foretiles[0])->micro_image, i, j, 0);
    137137      }
    138138      else
     
    143143  // draw the person as a dot, no need to add a dirty because we marked the
    144144  // whole screen already
    145   automap_window->screen->Lock();
     145  automap_window->m_surf->Lock();
    146146  if ((tick++)&4)
    147     automap_window->screen->PutPixel(vec2i(centerx,centery),255);
     147    automap_window->m_surf->PutPixel(vec2i(centerx,centery),255);
    148148  else
    149     automap_window->screen->PutPixel(vec2i(centerx,centery),27);
    150   automap_window->screen->Unlock();
     149    automap_window->m_surf->PutPixel(vec2i(centerx,centery),27);
     150  automap_window->m_surf->Unlock();
    151151
    152152  // set the clip back to full window size because soemthing else could mess with the area
    153   automap_window->screen->SetClip(0,0,screen->Size().x,screen->Size().y);
     153  automap_window->m_surf->SetClip(0,0,screen->Size().x,screen->Size().y);
    154154}
    155155
     
    168168        automap_window = wm->new_window(0, 0, w * AUTOTILE_WIDTH,
    169169                                        h * AUTOTILE_HEIGHT, NULL, "Map");
    170         automap_window->screen->bar(17, 1, 17 + 8 * 6 + 3, 6,
     170        automap_window->m_surf->bar(17, 1, 17 + 8 * 6 + 3, 6,
    171171                                    wm->medium_color());
    172         wm->font()->put_string(automap_window->screen, 20, 2, "Automap",
     172        wm->font()->put_string(automap_window->m_surf, 20, 2, "Automap",
    173173                               wm->dark_color());
    174174        draw();
  • abuse/trunk/src/clisp.cpp

    r643 r644  
    18441844      int32_t y1=lnumber_value(CAR(args)); args=lcdr(args);
    18451845      int32_t id=lnumber_value(CAR(args));
    1846       cache.img(id)->put_image(main_screen,x1,y1,1);
     1846      main_screen->PutImage(cache.img(id), x1, y1, 1);
    18471847    } break;
    18481848    case 217 :
  • abuse/trunk/src/console.cpp

    r643 r644  
    4545      {
    4646    if (*s)
    47       fnt->put_char(con_win->screen,dx,dy,*s);
     47      fnt->put_char(con_win->m_surf,dx,dy,*s);
    4848      }
    4949    }
    50     fnt->put_char(con_win->screen,wx()+cx*xa,wy()+cy*ya,'_');
     50    fnt->put_char(con_win->m_surf,wx()+cx*xa,wy()+cy*ya,'_');
    5151  }
    5252}
     
    5858    con_win=wm->new_window(lastx,lasty,screen_w(),screen_h(),NULL,name);
    5959    redraw();
    60     con_win->screen->SetClip(con_win->x1(),con_win->y1(),con_win->x2()+1,con_win->y2()+1);
     60    con_win->m_surf->SetClip(con_win->x1(),con_win->y1(),con_win->x2()+1,con_win->y2()+1);
    6161  }
    6262}
     
    9898{
    9999  if (con_win)
    100     fnt->put_char(con_win->screen,cx*fnt->width()+wx(),cy*fnt->height()+wy(),'_');
     100    fnt->put_char(con_win->m_surf,cx*fnt->width()+wx(),cy*fnt->height()+wy(),'_');
    101101}
    102102
     
    108108    int fw=fnt->width(),fh=fnt->height();
    109109    int dx=wx()+x*fw,dy=wy()+y*fh;
    110     con_win->screen->bar(dx,dy,dx+fw-1,dy+fh-1,wm->black());
    111     fnt->put_char(con_win->screen,dx,dy,ch);
     110    con_win->m_surf->bar(dx,dy,dx+fw-1,dy+fh-1,wm->black());
     111    fnt->put_char(con_win->m_surf,dx,dy,ch);
    112112  }
    113113}
  • abuse/trunk/src/cop.cpp

    r643 r644  
    829829    player_draw(just_fired,o->get_tint());
    830830    if (o->controller() && o->controller()->local_player())
    831       cache.img(S_health_image)->put_image(main_screen,o->controller()->cx2-20,
    832                         o->controller()->cy1+5,1);
     831      main_screen->PutImage(cache.img(S_health_image), o->controller()->cx2-20,
     832                            o->controller()->cy1+5,1);
    833833      } break;
    834834      case FAST_POWER :
     
    850850    o->state=(character_state)old_state;
    851851    if (o->controller() && o->controller()->local_player())
    852       cache.img(S_fast_image)->put_image(main_screen,o->controller()->cx2-20,
    853                         o->controller()->cy1+5,1);
     852      main_screen->PutImage(cache.img(S_fast_image), o->controller()->cx2-20,
     853                            o->controller()->cy1+5,1);
    854854      } break;
    855855      case FLY_POWER :
     
    871871
    872872    if (o->controller() && o->controller()->local_player())
    873       cache.img(S_fly_image)->put_image(main_screen,o->controller()->cx2-20,
    874                         o->controller()->cy1+5,1);
     873      main_screen->PutImage(cache.img(S_fly_image), o->controller()->cx2-20,
     874                            o->controller()->cy1+5,1);
    875875      } break;
    876876      case SNEAKY_POWER :
     
    884884
    885885    if (o->controller() && o->controller()->local_player())
    886       cache.img(S_sneaky_image)->put_image(main_screen,o->controller()->cx2-20,
    887                         o->controller()->cy1+5,1);
     886      main_screen->PutImage(cache.img(S_sneaky_image), o->controller()->cx2-20,
     887                            o->controller()->cy1+5,1);
    888888      } break;
    889889    }
     
    10481048  main_screen->clear();
    10491049  image *im=cache.img(cache.reg("art/frame.spe","end_level_screen",SPEC_IMAGE,1));
    1050   im->put_image(main_screen,0,0);
     1050  main_screen->PutImage(im, 0, 0);
    10511051  int x1=im->Size().x+1,y1=0,y2=main_screen->Size().y;
    10521052  JCFont *fnt=wm->font();
  • abuse/trunk/src/dev.cpp

    r643 r644  
    110110      f->PutImage(screen, cache.img(id), vec2i(x, y));
    111111    else
    112       cache.img(id)->put_image(screen,x,y);
     112      screen->PutImage(cache.img(id), x, y);
    113113  }
    114114  virtual int width() { return cache.img(id)->Size().x; }
     
    481481    if (f->x-vx>=0 && f->x-vx<=(v->cx2-v->cx1+1) && f->y-vy>=0 && f->y-vy<=(v->cy2-v->cy1+1))
    482482    {
    483       image *im=cache.img(light_buttons[f->type]);
    484       im->put_image(main_screen,f->x-vx+v->cx1-im->Size().x/2,f->y-vy+v->cy1-im->Size().y/2,1);
    485       main_screen->rectangle(f->x1-vx+v->cx1,f->y1-vy+v->cy1,f->x2-vx+v->cx1,f->y2-vy+v->cy1,
    486                 wm->medium_color());
     483      image *im = cache.img(light_buttons[f->type]);
     484      main_screen->PutImage(im, f->x - vx + v->cx1 - im->Size().x / 2,
     485                                f->y - vy + v->cy1 - im->Size().y / 2, 1);
     486      main_screen->rectangle(f->x1 - vx + v->cx1, f->y1 - vy + v->cy1,
     487                             f->x2 - vx + v->cx1, f->y2 - vy + v->cy1,
     488                             wm->medium_color());
    487489    }
    488490      }
     
    599601    tbw=wm->new_window(prop->getd("toolbar x",-1),
    600602               prop->getd("toolbar y",-1),-1,-1,tp);
    601     tp->set_x(setx,tbw->screen);
     603    tp->set_x(setx,tbw->m_surf);
    602604  }
    603605}
     
    758760    music_window=wm->new_window(-1,30,0,0,
    759761             new pick_list(0,0,DEV_MUSIC_PICKLIST,10,song_list,total_songs,0,NULL));
    760     wm->fnt->put_string(music_window->screen,0,1,"songs");
     762    wm->fnt->put_string(music_window->m_surf,0,1,"songs");
    761763  } else
    762764  {
     
    12251227      cur_fg=current_level->get_fg(x,y);
    12261228      if (forew)
    1227     ((tile_picker *)forew->read(DEV_FG_PICKER))->recenter(forew->screen);
     1229    ((tile_picker *)forew->read(DEV_FG_PICKER))->recenter(forew->m_surf);
    12281230      the_game->need_refresh();
    12291231    }
     
    12491251
    12501252      if (forew)
    1251     ((tile_picker *)forew->read(DEV_FG_PICKER))->recenter(forew->screen);
     1253    ((tile_picker *)forew->read(DEV_FG_PICKER))->recenter(forew->m_surf);
    12521254    }
    12531255  }
     
    30103012      im->clear();
    30113013      the_game->get_fg(pat[i])->im->PutImage(im,vec2i(0,0));
    3012       scale_put(im,me->screen,me->x1()+(i%w)*tw,
     3014      scale_put(im,me->m_surf,me->x1()+(i%w)*tw,
    30133015        me->y1()+(i/w)*th,tw,th);
    30143016      if (d==pat[i])
    30153017      {
    30163018    find=i;
    3017     me->screen->rectangle(me->x1()+(i%w)*tw,
    3018               me->y1()+(i/w)*th,
    3019               me->x1()+(i%w)*tw+tw-1,
    3020               me->y1()+(i/w)*th+th-1,wm->bright_color());
     3019    me->m_surf->rectangle(me->x1()+(i%w)*tw,
     3020                            me->y1()+(i/w)*th,
     3021                            me->x1()+(i%w)*tw+tw-1,
     3022                            me->y1()+(i/w)*th+th-1,wm->bright_color());
    30213023      }
    30223024    }
     
    30573059        if (dev_cont->forew)
    30583060          ((tile_picker *)dev_cont->forew->
    3059            read(DEV_FG_PICKER))->recenter(dev_cont->forew->screen);
     3061           read(DEV_FG_PICKER))->recenter(dev_cont->forew->m_surf);
    30603062      }
    30613063    } else if (ev.mouse_button==2)
  • abuse/trunk/src/endgame.cpp

    r643 r644  
    238238      if (i>=30 && i<=37)
    239239      {
    240     cache.img(planet)->put_image(tcopy,0,0);
     240    tcopy->PutImage(cache.img(planet), 0, 0);
    241241    cache.fig(explo_frames1[i-30])->forward->PutImage(tcopy,vec2i(100,50));
    242242        scan_map(main_screen,ex,ey,tcopy,
     
    437437
    438438  int dx=(xres+1)/2-im->Size().x/2,dy=(yres+1)/2-im->Size().y/2;
    439   im->put_image(main_screen,dx,dy);
     439  main_screen->PutImage(im, dx, dy);
    440440  console_font->put_string(main_screen,xres/2+35,yres/2+100-console_font->height()-2,
    441441               lstring_value(to_be));
     
    451451  for (i=0; i<320 && ev.type!=EV_KEY; i++)
    452452  {
    453     im->put_image(main_screen,dx,dy);
     453    main_screen->PutImage(im, dx, dy);
    454454    console_font->put_string(main_screen,xres/2+35,yres/2+100-console_font->height()-2,
    455455               lstring_value(to_be));
     
    503503  for (i=0; i<320 && ev.type!=EV_KEY; i++)
    504504  {
    505     im->put_image(main_screen,dx,dy);
     505    main_screen->PutImage(im, dx, dy);
    506506
    507507    text_draw(205-i,dx+10,dy,dx+319-10,dy+199,lstring_value(end_plot),wm->font(),cmap,wm->bright_color());
  • abuse/trunk/src/game.cpp

    r643 r644  
    476476        int dx = 20, dy = 5;
    477477        image *jim = cache.img(joy_picts[but * 9+(y + 1)*3 + x + 1]);
    478         joy_win->screen->bar(dx, dy, dx + jim->Size().x+6, dy + jim->Size().y+6, wm->black());
    479         jim->put_image(joy_win->screen, dx + 3, dy + 3);
     478        joy_win->m_surf->bar(dx, dy, dx + jim->Size().x+6, dy + jim->Size().y+6, wm->black());
     479        joy_win->m_surf->PutImage(jim, dx + 3, dy + 3);
    480480
    481481        if(but)
     
    605605      main_screen->GetClip(cx1, cy1, cx2, cy2);
    606606      main_screen->SetClip(viewx1, viewy1, viewx2 + 1, viewy2 + 1);
    607       im->put_image(main_screen, (x - xo / btile_width())*btile_width()+viewx1 - xo % btile_width(),
     607      main_screen->PutImage(im, (x - xo / btile_width())*btile_width()+viewx1 - xo % btile_width(),
    608608            (y - yo / btile_height())*btile_height()+viewy1 - yo % btile_height(), 0);
    609609      main_screen->SetClip(cx1, cy1, cx2, cy2);
     
    720720        main_screen->SetClip(v->cx1, v->cy1, v->cx2 + 1, v->cy2 + 1);
    721721      image *tit = cache.img(title_screen);
    722       tit->put_image(main_screen, main_screen->Size().x/2 - tit->Size().x/2,
     722      main_screen->PutImage(tit, main_screen->Size().x/2 - tit->Size().x/2,
    723723                    main_screen->Size().y/2 - tit->Size().y/2);
    724724      if(state == SCENE_STATE)
     
    828828    else bt = get_bg(0);
    829829
    830         bt->im->put_image(main_screen, draw_x, draw_y);
     830        main_screen->PutImage(bt->im, draw_x, draw_y);
    831831//        if(!(dev & EDIT_MODE) && bt->next)
    832832//      current_level->put_bg(x, y, bt->next);
     
    10791079    dev_cont->dev_draw(v);
    10801080    if(cache.in_use())
    1081     cache.img(vmm_image)->put_image(main_screen, v->cx1, v->cy2 - cache.img(vmm_image)->Size().y+1);
     1081    main_screen->PutImage(cache.img(vmm_image), v->cx1, v->cy2 - cache.img(vmm_image)->Size().y+1);
    10821082
    10831083    if(dev & DRAW_LIGHTS)
     
    11721172    {
    11731173        main_screen->clear();
    1174         im->put_image(main_screen, (xres + 1) / 2 - im->Size().x / 2,
    1175                               (yres + 1) / 2 - im->Size().y / 2);
     1174        main_screen->PutImage(im, (xres + 1) / 2 - im->Size().x / 2,
     1175                                  (yres + 1) / 2 - im->Size().y / 2);
    11761176    }
    11771177
     
    12721272
    12731273        int dx = (xres + 1) / 2 - gray->Size().x / 2, dy = (yres + 1) / 2 - gray->Size().y / 2;
    1274         gray->put_image(main_screen, dx, dy);
    1275         smoke[0]->put_image(main_screen, dx + 24, dy + 5);
     1274        main_screen->PutImage(gray, dx, dy);
     1275        main_screen->PutImage(smoke[0], dx + 24, dy + 5);
    12761276
    12771277        fade_in(NULL, 16);
     
    12931293                break;
    12941294
    1295             gray->put_image(main_screen, dx, dy);
    1296             smoke[i % 5]->put_image(main_screen, dx + 24, dy + 5);
     1295            main_screen->PutImage(gray, dx, dy);
     1296            main_screen->PutImage(smoke[i % 5], dx + 24, dy + 5);
    12971297            text_draw(205 - i, dx + 15, dy, dx + 320 - 15, dy + 199, str, wm->font(), cmap, wm->bright_color());
    12981298            wm->flush_screen();
     
    15001500    {
    15011501      image *tit = cache.img(title_screen);
    1502       tit->put_image(main_screen, main_screen->Size().x/2 - tit->Size().x/2,
    1503                     main_screen->Size().y/2 - tit->Size().y/2);
     1502      main_screen->PutImage(tit, main_screen->Size().x/2 - tit->Size().x/2,
     1503                            main_screen->Size().y/2 - tit->Size().y/2);
    15041504    }
    15051505    set_state(MENU_STATE);   // then go to menu state so windows will turn off
     
    15731573    {
    15741574      for(view *f = first_view; f; f = f->next)
    1575         cache.img(pause_image)->put_image(main_screen, (f->cx1 + f->cx2)/2 - cache.img(pause_image)->Size().x/2,
     1575        main_screen->PutImage(cache.img(pause_image), (f->cx1 + f->cx2)/2 - cache.img(pause_image)->Size().x/2,
    15761576                   f->cy1 + 5, 1);
    15771577    }
     
    18971897                                        ((button *)ev.message.data)->push();
    18981898/*                                        volume_window->inm->redraw();
    1899                                         draw_value(volume_window->screen, 2, 43,
     1899                                        draw_value(volume_window->m_surf, 2, 43,
    19001900                                                (volume_window->x2()-volume_window->x1()-1), 8, sfx_volume, 127);
    1901                                         draw_value(volume_window->screen, 2, 94,
     1901                                        draw_value(volume_window->m_surf, 2, 94,
    19021902                                                (volume_window->x2()-volume_window->x1()-1), 8, music_volume, 127);
    19031903*/
  • abuse/trunk/src/gui.cpp

    r643 r644  
    8888void ico_button::draw(int active, image *screen)
    8989{
    90   int x1,y1,x2,y2;
    91   area(x1,y1,x2,y2);
     90    int x1, y1, x2, y2;
     91    area(x1, y1, x2, y2);
    9292
    93   if (active!=act  && activate_id!=-1 && active)
    94     wm->Push(new Event(activate_id,NULL));
     93    if (active != act && activate_id != -1 && active)
     94        wm->Push(new Event(activate_id, NULL));
    9595
    96   if (up && !active)
    97     cache.img(u)->put_image(screen,x1,y1);
    98   else if (up && active)
    99     cache.img(ua)->put_image(screen,x1,y1);
    100   else if (!up && !active)
    101     cache.img(d)->put_image(screen,x1,y1);
    102   else cache.img(da)->put_image(screen,x1,y1);
     96    screen->PutImage(cache.img((up && !active) ? u :
     97                               (up && active) ? ua :
     98                               (!up && !active) ? d : da), x1, y1);
    10399
    104   if (act!=active && active && activate_id!=-1)
    105     wm->Push(new Event(activate_id,NULL));
    106   act=active;
     100    if (act != active && active && activate_id != -1)
     101        wm->Push(new Event(activate_id, NULL));
     102    act = active;
    107103
    108   if (active && key[0])
    109   {
    110     int g=80;
    111     screen->bar(0,0,144,20,0);
    112     wm->font()->put_string(screen,0,0,symbol_str(key),color_table->Lookup(g>>3,g>>3,g>>3));
    113   } else if (!active && key[0])
    114   {
    115     screen->bar(0,0,144,20,0);
    116   }
    117 
     104    if (active && key[0])
     105    {
     106        int g=80;
     107        screen->bar(0, 0, 144, 20, 0);
     108        wm->font()->put_string(screen, 0, 0, symbol_str(key),
     109                               color_table->Lookup(g>>3, g>>3, g>>3));
     110    }
     111    else if (!active && key[0])
     112    {
     113        screen->bar(0, 0, 144, 20, 0);
     114    }
    118115}
    119116
  • abuse/trunk/src/help.cpp

    r643 r644  
    3131  int x1=xres/2-im->Size().x/2,y1=yres/2-im->Size().y/2;
    3232  int x2=x1+im->Size().x,y2=y1+im->Size().y;
    33   im->put_image(main_screen,x1,y1);
     33  main_screen->PutImage(im, x1, y1);
    3434  main_screen->bar(0,0,x1-1,yres,0);
    3535  main_screen->bar(0,0,xres,y1-1,0);
  • abuse/trunk/src/imlib/fonts.cpp

    r555 r644  
    2828void texture_font::put_char(image *screen,  int x, int y, char ch)
    2929{ if (fntpat)
    30     fntpat->put_part_masked(screen,let, x,y,
     30    screen->PutPartMasked(fntpat, let, x,y,
    3131       ((int)ch%32)*tl,((int)ch/32)*th,0,0,tl-1,th-1);
    32   else let->put_part(screen,x,y,((int)ch%32)*tl,((int)ch/32)*th,
    33      ((int)ch%32)*tl+tl-1,((int)ch/32)*th+th-1,1);
     32  else screen->PutPart(let, x, y, ((int)ch%32)*tl, ((int)ch/32)*th,
     33     ((int)ch%32)*tl+tl-1, ((int)ch/32)*th+th-1, 1);
    3434}
    3535
     
    7474  {
    7575    tmp.clear();
    76     letters->put_part(&tmp,0,0,((int)ch%32)*tl,((int)ch/32)*th,
    77               ((int)ch%32)*tl+tl-1,((int)ch/32)*th+th-1,1);
    78     let[ch]=new TransImage(&tmp,"JCfont");
     76    tmp.PutPart(letters, 0, 0, ((int)ch%32)*tl, ((int)ch/32)*th,
     77                ((int)ch%32)*tl+tl-1, ((int)ch/32)*th+th-1, 1);
     78    let[ch] = new TransImage(&tmp, "JCfont");
    7979  }
    8080}
  • abuse/trunk/src/imlib/guistat.cpp

    r555 r644  
    5959  long h=wm->font()->height();
    6060
    61   whom->stat_win->screen->bar(whom->stat_win->x1()+1,whom->stat_win->y2()-h-1,whom->stat_win->x2()-1,
     61  whom->stat_win->m_surf->bar(whom->stat_win->x1()+1,whom->stat_win->y2()-h-1,whom->stat_win->x2()-1,
    6262              whom->stat_win->y2()-1,wm->black());
    63   whom->stat_win->screen->bar(whom->stat_win->x1()+2,whom->stat_win->y2()-h,whom->stat_win->x2()-2,
     63  whom->stat_win->m_surf->bar(whom->stat_win->x1()+2,whom->stat_win->y2()-h,whom->stat_win->x2()-2,
    6464              whom->stat_win->y2()-2,wm->dark_color());
    6565  if (perc)
    66     whom->stat_win->screen->bar(whom->stat_win->x1()+3,whom->stat_win->y2()-h+1,
     66    whom->stat_win->m_surf->bar(whom->stat_win->x1()+3,whom->stat_win->y2()-h+1,
    6767                whom->stat_win->x1()+l*perc/100,
    6868                whom->stat_win->y2()-3,wm->bright_color());
     
    106106    int my = first->stat_win->y1() + wm->font()->height() / 2;
    107107    first->stat_win=wm->new_window(wx, wy, len3, h1*2+h2, NULL, "status");
    108     wm->font()->put_string(first->stat_win->screen, mx, my, first->name, wm->black());
    109     wm->font()->put_string(first->stat_win->screen, mx, my, first->name, wm->bright_color());
     108    wm->font()->put_string(first->stat_win->m_surf, mx, my, first->name, wm->black());
     109    wm->font()->put_string(first->stat_win->m_surf, mx, my, first->name, wm->bright_color());
    110110    if (first->show)
    111       first->show->draw(first->stat_win->screen, (first->stat_win->x2()-first->stat_win->x1())/2-
     111      first->show->draw(first->stat_win->m_surf, (first->stat_win->x2()-first->stat_win->x1())/2-
    112112                first->show->width()/2, my+h1, NULL);
    113113
  • abuse/trunk/src/imlib/image.cpp

    r555 r644  
    319319
    320320
    321 void image::put_image(image *screen, int16_t x, int16_t y, char transparent)
     321void image::PutImage(image *im, int16_t x, int16_t y, char transparent)
    322322{
    323323    int16_t i, j, xl, yl;
     
    325325
    326326    // the screen is clipped then we only want to put part of the image
    327     if(screen->m_special)
    328     {
    329         put_part(screen, x, y, 0, 0, m_size.x-1, m_size.y-1, transparent);
     327    if(m_special)
     328    {
     329        PutPart(im, x, y, 0, 0, im->m_size.x-1, im->m_size.y-1, transparent);
    330330        return;
    331331    }
    332332
    333     if(x < screen->Size().x && y < screen->Size().y)
    334     {
    335         xl = m_size.x;
    336         if(x + xl > screen->Size().x) // clip to the border of the screen
    337             xl = screen->Size().x - x;
    338         yl = m_size.y;
    339         if(y + yl > screen->Size().y)
    340             yl = screen->Size().y - y;
     333    if(x < m_size.x && y < m_size.y)
     334    {
     335        xl = im->m_size.x;
     336        if(x + xl > m_size.x) // clip to the border of the screen
     337            xl = m_size.x - x;
     338        yl = im->m_size.y;
     339        if(y + yl > m_size.y)
     340            yl = m_size.y - y;
    341341
    342342        int startx = 0, starty = 0;
     
    355355            return;
    356356
    357         screen->AddDirty(x, y, x + xl, y + yl);
    358         screen->Lock();
     357        AddDirty(x, y, x + xl, y + yl);
    359358        Lock();
     359        im->Lock();
    360360        for(j = starty; j < yl; j++, y++)
    361361        {
    362             pg1 = screen->scan_line(y);
    363             pg2 = scan_line(j);
     362            pg1 = scan_line(y);
     363            pg2 = im->scan_line(j);
    364364            if(transparent)
    365365            {
     
    375375                memcpy(&pg1[x], pg2, xl); // straight copy
    376376        }
     377        im->Unlock();
    377378        Unlock();
    378         screen->Unlock();
    379379    }
    380380}
     
    434434
    435435
    436 void image::put_part(image *screen, int16_t x, int16_t y,
    437         int16_t x1, int16_t y1, int16_t x2, int16_t y2, char transparent)
     436void image::PutPart(image *im, int16_t x, int16_t y, int16_t x1, int16_t y1,
     437                    int16_t x2, int16_t y2, char transparent)
    438438{
    439439  int16_t xlen, ylen, j, i;
     
    442442
    443443  int cx1, cy1, cx2, cy2;
    444   screen->GetClip(cx1, cy1, cx2, cy2);
    445 
     444  GetClip(cx1, cy1, cx2, cy2);
    446445
    447446  // see if the are to be put is outside of actual image, if so adjust
     
    449448  if (x1<0) { x+=-x1; x1=0; }
    450449  if (y1<0) { y+=-y1; y1=0; }
    451   if (x2>=m_size.x) x2=m_size.x-1;
    452   if (y2>=m_size.y) y2=m_size.y-1;
     450  if (x2>=im->m_size.x) x2=im->m_size.x-1;
     451  if (y2>=im->m_size.y) y2=im->m_size.y-1;
    453452  if (x1>x2 || y1>y2) return ;      // return if it was adjusted so that nothing will be put
    454 
    455453
    456454  // see if the image gets clipped off the screen
    457455  if (x >= cx2 || y >= cy2 || x + (x2 - x1) < cx1 || y + (y2 - y1) < cy1)
    458456    return ;
    459 
    460457
    461458  if (x<cx1)
     
    471468  if (x1>x2 || y1>y2) return ;
    472469
    473 
    474 
    475 
    476470  xlen=x2-x1+1;
    477471  ylen=y2-y1+1;
    478472
    479   screen->AddDirty(x, y, x + xlen, y + ylen);
    480 
    481   screen->Lock();
     473  AddDirty(x, y, x + xlen, y + ylen);
     474
    482475  Lock();
    483   pg1=screen->scan_line(y);
    484   pg2=scan_line(y1);
     476  im->Lock();
     477  pg1 = scan_line(y);
     478  pg2 = im->scan_line(y1);
    485479
    486480  if (transparent)
     
    490484      for (i=0, source=&pg2[x1], dest=&pg1[x]; i<xlen; i++, source++, dest++)
    491485        if (*source) *dest=*source;
    492       pg1=screen->next_line(y+j, pg1);
    493       pg2=next_line(y1+j, pg2);
     486      pg1=next_line(y+j, pg1);
     487      pg2=im->next_line(y1+j, pg2);
    494488    }
    495489  }
     
    498492  {
    499493    memcpy(&pg1[x], &pg2[x1], xlen);   // strait copy
    500     pg1=screen->next_line(y+j, pg1);
    501     pg2=next_line(y1+j, pg2);
    502   }
     494    pg1 = next_line(y+j, pg1);
     495    pg2 = im->next_line(y1+j, pg2);
     496  }
     497  im->Unlock();
    503498  Unlock();
    504   screen->Unlock();
    505 }
    506 
    507 void image::put_part_xrev(image *screen, int16_t x, int16_t y,
    508         int16_t x1, int16_t y1, int16_t x2, int16_t y2, char transparent)
     499}
     500
     501void image::PutPartXrev(image *im, int16_t x, int16_t y, int16_t x1,
     502                        int16_t y1, int16_t x2, int16_t y2, char transparent)
    509503{
    510504  int16_t xl, yl, j, i;
     
    512506  CHECK(x1<=x2 && y1<=y2);
    513507
    514   i=x1; x1=m_size.x-x2-1;  // reverse the x locations
    515   x2=m_size.x-i-1;
     508  i=x1; x1=im->m_size.x-x2-1;  // reverse the x locations
     509  x2=im->m_size.x-i-1;
    516510
    517511  if (x1<0)
     
    520514  { y-=y1; y1=0; }
    521515
    522   if (screen->m_special)
     516  if (m_special)
    523517  {
    524518    int cx1, cy1, cx2, cy2;
    525     screen->m_special->GetClip(cx1, cy1, cx2, cy2);
     519    m_special->GetClip(cx1, cy1, cx2, cy2);
    526520    // FIXME: don't we need < cx1 instead of < 0 here?
    527521    if (x >= cx2 || y >= cy2 || x + (x2 - x1) < 0 || y + (y2 - y1) < 0)
     
    536530    { y2 = cy2 - 1 - y + y1; }
    537531  }
    538   else  if (x>screen->Size().x || y>screen->Size().y || x+x2<0 || y+y2<0)
     532  else  if (x > m_size.x || y > m_size.y || x+x2<0 || y+y2<0)
    539533    return ;
    540534
    541   if (x<screen->Size().x && y<screen->Size().y && x1<m_size.x && y1<m_size.y &&
     535  if (x<m_size.x && y<m_size.y && x1<im->m_size.x && y1<im->m_size.y &&
    542536      x1<=x2 && y1<=y2)
    543537  {
    544     if (x2>=m_size.x)
    545       x2=m_size.x-1;
    546     if (y2>=m_size.y)
    547       y2=m_size.y-1;
     538    if (x2>=im->m_size.x)
     539      x2=im->m_size.x-1;
     540    if (y2>=im->m_size.y)
     541      y2=im->m_size.y-1;
    548542    xl=x2-x1+1;
    549     if (x+xl>screen->Size().x)
    550       xl=screen->Size().x-x;
     543    if (x+xl>m_size.x)
     544      xl=m_size.x-x;
    551545    yl=y2-y1+1;
    552     if (y+yl>screen->Size().y)
    553       yl=screen->Size().y-y;
    554     screen->AddDirty(x, y, x + xl, y + yl);
    555     screen->Lock();
     546    if (y+yl>m_size.y)
     547      yl=m_size.y-y;
     548    AddDirty(x, y, x + xl, y + yl);
    556549    Lock();
     550    im->Lock();
    557551    for (j=0; j<yl; j++)
    558552    {
    559       pg1=screen->scan_line(y+j);
    560       pg2=scan_line(y1+j);
     553      pg1=scan_line(y+j);
     554      pg2=im->scan_line(y1+j);
    561555      if (transparent)
    562556      {
     
    569563    }
    570564    Unlock();
    571     screen->Unlock();
    572   }
    573 }
    574 
    575 
    576 void image::put_part_masked(image *screen, image *mask, int16_t x, int16_t y,
    577         int16_t maskx, int16_t masky,
    578         int16_t x1, int16_t y1, int16_t x2, int16_t y2)
     565    im->Unlock();
     566  }
     567}
     568
     569void image::PutPartMasked(image *im, image *mask, int16_t x, int16_t y,
     570                          int16_t maskx, int16_t masky,
     571                          int16_t x1, int16_t y1, int16_t x2, int16_t y2)
    579572{
    580573  int16_t xl, yl, j, i, ml, mh;
     
    582575  CHECK(x1<=x2 && y1<=y2);
    583576
    584   if (screen->m_special)
     577  if (m_special)
    585578  {
    586579    int cx1, cy1, cx2, cy2;
    587     screen->m_special->GetClip(cx1, cy1, cx2, cy2);
     580    m_special->GetClip(cx1, cy1, cx2, cy2);
    588581    if (x >= cx2 || y >= cy2 || x+(x2-x1)<0 || y+(y2-y1)<0) return ;
    589582    if (x<cx1)
     
    596589    { y2 = cy2 - 1 + y1 - y; }
    597590  }
    598   else  if (x>screen->Size().x || y>screen->Size().y || x+x1<0 || y+y1<0)
     591  else  if (x>m_size.x || y>m_size.y || x+x1<0 || y+y1<0)
    599592    return ;
    600593
    601594  ml=mask->Size().x;
    602595  mh=mask->Size().y;
    603   if (x<screen->Size().x && y<screen->Size().y && x1<m_size.x && y1<m_size.y &&
     596  if (x<m_size.x && y<m_size.y && x1<im->m_size.x && y1<im->m_size.y &&
    604597      maskx<ml && masky<mh && x1<=x2 && y1<=y2)
    605598  {
    606599
    607     if (x2>=m_size.x)
    608       x2=m_size.x-1;
    609     if (y2>=m_size.y)
    610       y2=m_size.y-1;
     600    if (x2>=im->m_size.x)
     601      x2=im->m_size.x-1;
     602    if (y2>=im->m_size.y)
     603      y2=im->m_size.y-1;
    611604    xl=x2-x1+1;
    612     if (x+xl>screen->Size().x)
    613       xl=screen->Size().x-x-1;
     605    if (x+xl>m_size.x)
     606      xl=m_size.x-x-1;
    614607    yl=y2-y1+1;
    615     if (y+yl>screen->Size().y)
    616       yl=screen->Size().y-y-1;
    617     screen->AddDirty(x, y, x + xl, y + yl);
    618     screen->Lock();
     608    if (y+yl>m_size.y)
     609      yl=m_size.y-y-1;
     610    AddDirty(x, y, x + xl, y + yl);
     611    Lock();
    619612    mask->Lock();
    620     Lock();
     613    im->Lock();
    621614    for (j=0; j<yl; j++)
    622615    {
    623       pg1=screen->scan_line(y+j);
    624       pg2=scan_line(y1+j);
     616      pg1=scan_line(y+j);
     617      pg2=im->scan_line(y1+j);
    625618      pg3=mask->scan_line(masky++);
    626619      if (masky>=mh)           // wrap the mask around if out of bounds
     
    634627      }
    635628    }
     629    im->Unlock();
     630    mask->Unlock();
    636631    Unlock();
    637     mask->Unlock();
    638     screen->Unlock();
    639632  }
    640633}
  • abuse/trunk/src/imlib/image.h

    r555 r644  
    119119    void fill_image(image *screen, int16_t x1, int16_t y1,
    120120                    int16_t x2, int16_t y2, int16_t align = 1);
    121     void put_image(image *screen, int16_t x, int16_t y, char transparent = 0);
    122     void put_part(image *screen, int16_t x, int16_t y, int16_t x1, int16_t y1,
    123                   int16_t x2, int16_t y2, char transparent = 0);
    124     void put_part_xrev(image *screen, int16_t x, int16_t y,
    125                        int16_t x1, int16_t y1, int16_t x2, int16_t y2,
    126                        char transparent = 0);
    127     void put_part_masked(image *screen, image *mask, int16_t x, int16_t y,
    128                          int16_t maskx, int16_t masky, int16_t x1, int16_t y1,
    129                          int16_t x2, int16_t y2);
     121    void PutImage(image *screen, int16_t x, int16_t y, char transparent = 0);
     122    void PutPart(image *screen, int16_t x, int16_t y, int16_t x1, int16_t y1,
     123                 int16_t x2, int16_t y2, char transparent = 0);
     124    void PutPartXrev(image *screen, int16_t x, int16_t y,
     125                     int16_t x1, int16_t y1, int16_t x2, int16_t y2,
     126                     char transparent = 0);
     127    void PutPartMasked(image *screen, image *mask, int16_t x, int16_t y,
     128                       int16_t maskx, int16_t masky, int16_t x1, int16_t y1,
     129                       int16_t x2, int16_t y2);
    130130    image *copy_part_dithered(int16_t x1, int16_t y1, int16_t x2, int16_t y2);
    131131    void bar(int16_t x1, int16_t y1, int16_t x2, int16_t y2, uint8_t color);
  • abuse/trunk/src/imlib/input.cpp

    r643 r644  
    392392    {
    393393      if (!active)
    394         visual->put_image(screen,x,y);
     394        screen->PutImage(visual, x, y);
    395395      else
    396         pressed->put_image(screen,x,y);
    397     } else act_pict->put_image(screen,x,y);
     396        screen->PutImage(pressed, x, y);
     397    } else screen->PutImage(act_pict, x, y);
    398398  }
    399399  else
     
    425425        wm->font()->put_string(screen,x+3,y+4,text);
    426426      }
    427       else visual->put_image(screen,x+3,y+3,1);
     427      else screen->PutImage(visual, x + 3, y + 3, 1);
    428428    } else
    429429    {
     
    434434      screen->bar(x1+1,y1+1,x2-1,y2-1,wm->medium_color());
    435435      if (visual)
    436         visual->put_image(screen,x1+3,y1+3,1);
     436        screen->PutImage(visual, x1 + 3, y1 + 3, 1);
    437437      else
    438438      {
  • abuse/trunk/src/imlib/jwindow.cpp

    r643 r644  
    7272        {
    7373            p->hide();
    74             m_screen->AddDirty(p->x, p->y, p->x + p->l, p->y + p->h);
     74            m_surf->AddDirty(p->x, p->y, p->x + p->l, p->y + p->h);
    7575        }
    7676    }
     
    9393        Jwindow *k;
    9494        for (k = first; k->next != j; k = k->next)
    95             k->screen->AddDirty(j->x - k->x, j->y - k->y,
    96                                 j->x + j->l - k->x, j->y + j->h - k->y);
    97         k->screen->AddDirty(j->x - k->x, j->y - k->y,
    98                             j->x + j->l - k->x, j->y + j->h - k->y);
     95            k->m_surf->AddDirty(j->x - k->x, j->y - k->y,
     96                                  j->x + j->l - k->x, j->y + j->h - k->y);
     97        k->m_surf->AddDirty(j->x - k->x, j->y - k->y,
     98                              j->x + j->l - k->x, j->y + j->h - k->y);
    9999        k->next = j->next;
    100100    }
    101     m_screen->AddDirty(j->x, j->y, j->x + j->l, j->y + j->h);
     101    m_surf->AddDirty(j->x, j->y, j->x + j->l, j->y + j->h);
    102102    j->hide();
    103103}
     
    108108    {
    109109        j->show();
    110         j->screen->AddDirty(0, 0, j->l, j->h);
     110        j->m_surf->AddDirty(0, 0, j->l, j->h);
    111111    }
    112112}
     
    180180    {
    181181      Jwindow *j=ev.window;
    182 /*      m_screen->AddDirty(j->x,j->y,j->x+j->l,j->y+j->h);
     182/*      m_surf->AddDirty(j->x,j->y,j->x+j->l,j->y+j->h);
    183183      for (p=first; p!=j; p=p->next)
    184         p->screen->AddDirty(j->x-p->x,j->y-p->y,j->x+j->l-p->x,j->y+j->h-p->y); */
    185       j->screen->AddDirty(0, 0, j->l, j->h);
     184        p->m_surf->AddDirty(j->x-p->x,j->y-p->y,j->x+j->l-p->x,j->y+j->h-p->y); */
     185      j->m_surf->AddDirty(0, 0, j->l, j->h);
    186186      flush_screen();
    187187    }
     
    214214  {
    215215    for (Jwindow *j = first; j; j = j->next)
    216        j->screen->AddDirty(ev.redraw.x1 - j->x, ev.redraw.y1 - j->y,
    217                            ev.redraw.x2 + 1 - j->x, ev.redraw.y2 + 1 - j->y);
    218     m_screen->AddDirty(ev.redraw.x1, ev.redraw.y1, ev.redraw.x2 + 1, ev.redraw.y2 + 1);
     216       j->m_surf->AddDirty(ev.redraw.x1 - j->x, ev.redraw.y1 - j->y,
     217                             ev.redraw.x2 + 1 - j->x, ev.redraw.y2 + 1 - j->y);
     218    m_surf->AddDirty(ev.redraw.x1, ev.redraw.y1, ev.redraw.x2 + 1, ev.redraw.y2 + 1);
    219219    flush_screen();
    220220    ev.type=EV_SPURIOUS;   // we took care of this one by ourselves.
     
    224224void Jwindow::resize(int L, int H)
    225225{
    226   screen->SetSize(vec2i(L,H));
     226  m_surf->SetSize(vec2i(L,H));
    227227  l=L; h=H;
    228228}
     
    231231{
    232232  Jwindow *p;
    233   m_screen->AddDirty(j->x, j->y, j->x + j->l, j->y + j->h);
     233  m_surf->AddDirty(j->x, j->y, j->x + j->l, j->y + j->h);
    234234  for (p=first; p!=j; p=p->next)
    235     p->screen->AddDirty(j->x - p->x, j->y - p->y, j->x + j->l - p->x, j->y + j->h - p->y);
     235    p->m_surf->AddDirty(j->x - p->x, j->y - p->y, j->x + j->l - p->x, j->y + j->h - p->y);
    236236  j->resize(l,h);
    237237  if (!frame_suppress)
     
    241241void WindowManager::move_window(Jwindow *j, int x, int y)
    242242{
    243     m_screen->AddDirty(j->x, j->y, j->x + j->l, j->y + j->h);
     243    m_surf->AddDirty(j->x, j->y, j->x + j->l, j->y + j->h);
    244244    for(Jwindow *p = first; p != j; p = p->next)
    245         p->screen->AddDirty(j->x - p->x, j->y - p->y,
    246                             j->x + j->l - p->x, j->y + j->h - p->y);
     245        p->m_surf->AddDirty(j->x - p->x, j->y - p->y,
     246                              j->x + j->l - p->x, j->y + j->h - p->y);
    247247    j->x = x;
    248248    j->y = y;
    249     j->screen->AddDirty(0, 0, j->l, j->h);
     249    j->m_surf->AddDirty(0, 0, j->l, j->h);
    250250}
    251251
     
    255255{
    256256    wm = this;
    257     m_screen = screen;
     257    m_surf = screen;
    258258    hi = Hi; low = Low; med = Med; first = NULL; m_pal = pal; grab = NULL;
    259259    bk = pal->find_closest(0, 0, 0);
     
    299299        Jwindow * search;
    300300        for(search = first; search->next != win; search = search->next)
    301             search->screen->AddDirty(win->x - search->x,
    302                                      win->y - search->y,
    303                                      win->x + win->l - search->x,
    304                                      win->y + win->h - search->y);
    305         search->screen->AddDirty(win->x - search->x, win->y - search->y,
    306                                  win->x + win->l - search->x,
    307                                  win->y + win->h - search->y);
     301            search->m_surf->AddDirty(win->x - search->x,
     302                                       win->y - search->y,
     303                                       win->x + win->l - search->x,
     304                                       win->y + win->h - search->y);
     305        search->m_surf->AddDirty(win->x - search->x, win->y - search->y,
     306                                   win->x + win->l - search->x,
     307                                   win->y + win->h - search->y);
    308308        search->next = win->next;
    309309    }
    310310
    311     m_screen->AddDirty(win->x, win->y, win->x + win->l, win->y + win->h);
     311    m_surf->AddDirty(win->x, win->y, win->x + win->l, win->y + win->h);
    312312}
    313313
     
    315315                                     ifield * fields, char const *name)
    316316{
    317     if(x > m_screen->Size().x - 4)
    318         x = m_screen->Size().x - 25;
    319     if(y > m_screen->Size().y - 4)
    320         y = m_screen->Size().y - 10;
     317    if(x > m_surf->Size().x - 4)
     318        x = m_surf->Size().x - 25;
     319    if(y > m_surf->Size().y - 4)
     320        y = m_surf->Size().y - 10;
    321321
    322322    Jwindow * j = new Jwindow (x, y, l, h, fields, name);
     
    340340        my = mouse->drawy();
    341341
    342         m_screen->put_part(mouse_save, 0, 0, mx, my,
    343                          mx + mouse_pic->Size().x - 1,
    344                          my + mouse_pic->Size().y - 1);
    345         mouse_pic->put_image(m_screen, mx, my, 1);
     342        mouse_save->PutPart(m_surf, 0, 0, mx, my,
     343                            mx + mouse_pic->Size().x - 1,
     344                            my + mouse_pic->Size().y - 1);
     345        m_surf->PutImage(mouse_pic, mx, my, 1);
    346346    }
    347347
    348348    for(p = first; p; p = p->next)
    349349        if(!p->is_hidden())
    350             m_screen->delete_dirty(p->x, p->y, p->x + p->l, p->y + p->h);
    351     update_dirty(m_screen);
     350            m_surf->delete_dirty(p->x, p->y, p->x + p->l, p->y + p->h);
     351    update_dirty(m_surf);
    352352
    353353    if(has_mouse())
    354         mouse_save->put_image(m_screen, mx, my);
     354        m_surf->PutImage(mouse_save, mx, my);
    355355
    356356    for(p = first; p; p = p->next)
     
    361361        if(has_mouse())
    362362        {
    363             p->screen->put_part(mouse_save, 0, 0, mx - p->x, my - p->y,
     363            mouse_save->PutPart(p->m_surf, 0, 0, mx - p->x, my - p->y,
    364364                                mx - p->x + mouse_pic->Size().x - 1,
    365365                                my - p->y + mouse_pic->Size().y - 1);
    366             if(has_mouse())
    367                 mouse_pic->put_image(p->screen, mx - p->x, my - p->y, 1);
     366            p->m_surf->PutImage(mouse_pic, mx - p->x, my - p->y, 1);
    368367        }
    369368
    370 //          m_screen->delete_dirty(p->x, p->y, p->x+p->l, p->y+p->h);
     369//          m_surf->delete_dirty(p->x, p->y, p->x+p->l, p->y+p->h);
    371370        for(q = p->next; q; q = q->next)
    372371            if(!q->is_hidden())
    373                 p->screen->delete_dirty(q->x - p->x, q->y - p->y,
    374                                         q->x + q->l - p->x, q->y + q->h - p->y);
    375         update_dirty(p->screen, p->x, p->y);
     372                p->m_surf->delete_dirty(q->x - p->x, q->y - p->y,
     373                                          q->x + q->l - p->x,
     374                                          q->y + q->h - p->y);
     375        update_dirty(p->m_surf, p->x, p->y);
    376376        if(has_mouse())
    377             mouse_save->put_image(p->screen, mx - p->x, my - p->y, 0);
     377            p->m_surf->PutImage(mouse_save, mx - p->x, my - p->y, 0);
    378378    }
    379379}
     
    392392    reconfigure();
    393393
    394     screen = NULL;
     394    m_surf = NULL;
    395395    next = NULL;
    396396
     
    411411    _y1 = name ? top_border() : jw_top + 5;
    412412
    413     screen = NULL;
    414     inm = new InputManager(screen, f);
     413    m_surf = NULL;
     414    inm = new InputManager(m_surf, f);
    415415    reconfigure(); /* FIXME: TODO */
    416416
     
    433433        if(h < top_border() + bottom_border())
    434434            h = top_border() + bottom_border();
    435     screen = new image(vec2i(l, h), NULL, 2);
    436     screen->clear(backg);
     435    m_surf = new image(vec2i(l, h), NULL, 2);
     436    m_surf->clear(backg);
    437437    // Keep this from getting destroyed when image list is cleared
    438     image_list.unlink(screen);
    439     inm->screen = screen;
     438    image_list.unlink(m_surf);
     439    inm->m_surf = m_surf;
    440440
    441441    next = NULL;
     
    454454    wm->remove_window(this);
    455455    local_close();
    456     if(screen)
    457         delete screen;
     456    delete m_surf;
    458457    delete inm;
    459458    if(_name)
     
    494493        if (right_border() >= 1)
    495494        {
    496             screen->widget_bar (0, 0, l - 1, h - 1, hi, med, low);
     495            m_surf->widget_bar (0, 0, l - 1, h - 1, hi, med, low);
    497496            if (right_border() >= 3)
    498                 screen->widget_bar (right_border() - 1, top_border() - 1,
     497                m_surf->widget_bar(right_border() - 1, top_border() - 1,
     498                                     l - left_border(), h - bottom_border(),
     499                                     low, med, hi);
     500
     501          else
     502            m_surf->line (left_border() - 1, top_border() - 1,
     503                           right_border() - 1, top_border() - 1, low);
     504        }
     505      m_surf->rectangle (2, 2, top_border() - 2, top_border() - 3,
     506                           wm->black ());
     507      m_surf->widget_bar (3, 3, top_border() - 3, top_border() - 4, hi, med, low);     // draws the 'close' button
     508    }
     509
     510  else
     511    {
     512      if (right_border() >= 1)
     513        {
     514          m_surf->widget_bar (0, 0, l - 1, h - 1, hi, med, low);
     515          if (right_border() >= 3)
     516            m_surf->widget_bar (right_border() - 1, jw_top + 4,
    499517                                l - left_border(), h - bottom_border(), low,
    500518                                med, hi);
    501519
    502520          else
    503             screen->line (left_border() - 1, top_border() - 1,
    504                            right_border() - 1, top_border() - 1, low);
    505         }
    506       screen->rectangle (2, 2, top_border() - 2, top_border() - 3,
    507                            wm->black ());
    508       screen->widget_bar (3, 3, top_border() - 3, top_border() - 4, hi, med, low);     // draws the 'close' button
    509     }
    510 
    511   else
    512     {
    513       if (right_border() >= 1)
    514         {
    515           screen->widget_bar (0, 0, l - 1, h - 1, hi, med, low);
    516           if (right_border() >= 3)
    517             screen->widget_bar (right_border() - 1, jw_top + 4,
    518                                 l - left_border(), h - bottom_border(), low,
    519                                 med, hi);
    520 
    521           else
    522             screen->line (left_border() - 1, jw_top + 4, right_border() - 1,
     521            m_surf->line (left_border() - 1, jw_top + 4, right_border() - 1,
    523522                           jw_top + 4, low);
    524523        }
    525       screen->rectangle (1, 1, 4, 4, wm->black ());
    526       screen->widget_bar (2, 2, 3, 3, hi, med, low);   // draws the 'close' button
     524      m_surf->rectangle (1, 1, 4, 4, wm->black ());
     525      m_surf->widget_bar (2, 2, 3, 3, hi, med, low);   // draws the 'close' button
    527526    }
    528527  if (_name && _name[0])
    529528    {
    530       screen->bar (top_border(), 1,
     529      m_surf->bar (top_border(), 1,
    531530                    top_border() + fnt->width() * strlen (_name) + 1,
    532531                    top_border() - 2, med);
    533       fnt->put_string (screen, top_border() + 1, 1, _name, low);
    534     }
    535   screen->bar (x1 (), y1 (), x2 (), y2 (), backg);  // clear 'client' region
     532      fnt->put_string (m_surf, top_border() + 1, 1, _name, low);
     533    }
     534  m_surf->bar (x1 (), y1 (), x2 (), y2 (), backg);  // clear 'client' region
    536535  inm->redraw ();
    537536}
     
    591590{
    592591    if(owner)
    593         screen = owner->screen;
     592        m_surf = owner->m_surf;
    594593    if(active)
    595         active->draw(0, screen);
     594        active->draw(0, m_surf);
    596595    active = NULL;
    597596}
     
    603602
    604603  if(owner)
    605       screen = owner->screen;
     604      m_surf = owner->m_surf;
    606605
    607606  if (j)
     
    626625      {
    627626    if (active)
    628           active->draw(0,screen);
     627          active->draw(0,m_surf);
    629628
    630629    active=in_area;
    631630
    632631    if (active)
    633       active->draw(1,screen);
     632      active->draw(1,m_surf);
    634633      }
    635634    }
    636635    if (ev.type==EV_KEY && ev.key==JK_TAB && active)
    637636    {
    638       active->draw(0,screen);
     637      active->draw(0,m_surf);
    639638      do
    640639      {
     
    642641    if (!active) active=first;
    643642      } while (active && !active->selectable());
    644       active->draw(1,screen);
     643      active->draw(1,m_surf);
    645644    }
    646645  } else active=grab;
     
    649648  {
    650649    if (ev.type!=EV_MOUSE_MOVE && ev.type!=EV_MOUSE_BUTTON)
    651       active->handle_event(ev,screen,this);
     650      active->handle_event(ev,m_surf,this);
    652651    else
    653652    {
     
    657656      {
    658657    if (j)
    659       active->handle_event(ev,screen,j->inm);
    660     else active->handle_event(ev,screen,this);
     658      active->handle_event(ev,m_surf,j->inm);
     659    else active->handle_event(ev,m_surf,this);
    661660      }
    662661    }
     
    679678    ifield *i;
    680679    if(owner)
    681         screen = owner->screen;
     680        m_surf = owner->m_surf;
    682681    for(i = first; i; i = i->next)
    683         i->draw_first(screen);
     682        i->draw_first(m_surf);
    684683    if(active)
    685         active->draw(1, screen);
    686 }
    687 
    688 InputManager::InputManager(image *Screen, ifield *First)
     684        active->draw(1, m_surf);
     685}
     686
     687InputManager::InputManager(image *screen, ifield *First)
    689688{
    690689    no_selections_allowed = 0;
     
    692691    grab = NULL;
    693692    owner = NULL;
    694     screen = Screen;
     693    m_surf = screen;
    695694    active = first = First;
    696695    while(active && !active->selectable())
    697696        active = active->next;
    698     if(screen)
     697    if(m_surf)
    699698        redraw();
    700699}
     
    706705    grab = NULL;
    707706    owner = Owner;
    708     screen = NULL;
     707    m_surf = NULL;
    709708    active = first = First;
    710709    while(active && !active->selectable())
  • abuse/trunk/src/imlib/jwindow.h

    r643 r644  
    3131class InputManager
    3232{
    33   friend class Jwindow;
     33    friend class Jwindow;
     34
     35public:
     36    InputManager(image *screen, ifield *first);
     37    InputManager(Jwindow *owner, ifield *first);
     38    ~InputManager();
     39
     40    void handle_event(Event &ev, Jwindow *j);
     41    ifield *get(int id);
     42    void redraw();
     43    void add(ifield *i);
     44    void remap(Filter *f);
     45    ifield *unlink(int id);     // unlinks ID from fields list and return the pointer to it
     46    void clear_current();
     47    void grab_focus(ifield *i);
     48    void release_focus();
     49    void allow_no_selections();
    3450
    3551private:
    36   image *screen;
    37   ifield *first, *active, *grab;
    38   Jwindow *cur, *owner;
    39   int no_selections_allowed;
    40 
    41 public:
    42   InputManager(image *screen, ifield *first);
    43   InputManager(Jwindow *owner, ifield *first);
    44   void handle_event(Event &ev, Jwindow *j);
    45   ifield *get(int id);
    46   void redraw();
    47   void add(ifield *i);
    48   void remap(Filter *f);
    49   ifield *unlink(int id);     // unlinks ID from fields list and return the pointer to it
    50   void clear_current();
    51   void grab_focus(ifield *i);
    52   void release_focus();
    53   void allow_no_selections();
    54   ~InputManager();
    55 } ;
     52    image *m_surf;
     53    ifield *first, *active, *grab;
     54    Jwindow *cur, *owner;
     55    int no_selections_allowed;
     56};
    5657
    5758class ifield
     
    8788    friend class InputManager;
    8889
    89 private:
    90     char *_name;
    91     bool _hidden;
    92     bool _moveable;
    93 
    94     void reconfigure();
    95 
    96 protected:
    97     Jwindow *owner;
    98     int _x1, _y1, _x2, _y2;
    99 
    10090public:
    10191    Jwindow *next;
    10292    int x, y, l, h, backg;
    103     image *screen;
    10493    InputManager *inm;
    10594    void *local_info;  // pointer to info block for local system (may support windows)
     
    111100    virtual void redraw();
    112101    void resize(int L, int H);
    113     void clear(int color = 0) { screen->bar(x1(), y1(), x2(), y2(), color); }
     102    void clear(int color = 0) { m_surf->bar(x1(), y1(), x2(), y2(), color); }
    114103    void show() { _hidden = false; }
    115104    void hide() { _hidden = true; }
     
    122111    int x2() { return _x2; }
    123112    int y2() { return _y2; }
    124     void clip_in() { screen->SetClip(x1(), y1(), x2() + 1, y2() + 1); }
    125     void clip_out() { screen->SetClip(0, 0, l, h); }
     113    void clip_in() { m_surf->SetClip(x1(), y1(), x2() + 1, y2() + 1); }
     114    void clip_out() { m_surf->SetClip(0, 0, l, h); }
    126115    char *read(int id) { return inm->get(id)->read(); }
    127116    void local_close();
     
    131120    static int top_border();
    132121    static int bottom_border();
     122
     123    image *m_surf;
     124
     125protected:
     126    Jwindow *owner;
     127    int _x1, _y1, _x2, _y2;
     128
     129private:
     130    char *_name;
     131    bool _hidden;
     132    bool _moveable;
     133
     134    void reconfigure();
    133135};
    134136
     
    183185private:
    184186    palette *m_pal;
    185     image *m_screen;
     187    image *m_surf;
    186188};
    187189
  • abuse/trunk/src/imlib/pmenu.cpp

    r643 r644  
    3737  bar=wm->new_window(X, Y, w, 0, NULL);
    3838  bar->freeze();  // can't drag this window
    39   bar->screen->widget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),
     39  bar->m_surf->widget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),
    4040            wm->dark_color());
    4141
     
    207207                     NULL);
    208208  win->freeze();
    209   win->screen->widget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
     209  win->m_surf->widget_bar(0,0,w-1,h-1,wm->bright_color(),wm->medium_color(),wm->dark_color());
    210210
    211211  int has_flags=0;
     
    228228  {
    229229    int h=wm->font()->height();
    230     parent->screen->widget_bar(x,y+h/2-1,x+w-1,y+h/2,wm->dark_color(),wm->medium_color(),wm->bright_color());
     230    parent->m_surf->widget_bar(x,y+h/2-1,x+w-1,y+h/2,wm->dark_color(),wm->medium_color(),wm->bright_color());
    231231  } else
    232232  {
     
    234234    {
    235235      if (xp!=-1)
    236         parent->screen->xor_bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->dark_color());
     236        parent->m_surf->xor_bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->dark_color());
    237237      else
    238238      {
    239     parent->screen->bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->dark_color());
    240     wm->font()->put_string(parent->screen,x+1,y+1,n,wm->medium_color());
    241     if (on_off && *on_off) wm->font()->put_string(parent->screen,bx+1,y+1,"*",wm->medium_color());
     239    parent->m_surf->bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->dark_color());
     240    wm->font()->put_string(parent->m_surf,x+1,y+1,n,wm->medium_color());
     241    if (on_off && *on_off) wm->font()->put_string(parent->m_surf,bx+1,y+1,"*",wm->medium_color());
    242242      }
    243243    } else
    244244    {
    245245      if (xp!=-1)
    246         parent->screen->xor_bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->dark_color());
     246        parent->m_surf->xor_bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->dark_color());
    247247      else
    248248      {
    249     parent->screen->bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->medium_color());
    250     wm->font()->put_string(parent->screen,x+1,y+1,n,wm->bright_color());
    251     if (on_off && *on_off) wm->font()->put_string(parent->screen,bx+1,y+1,"*",wm->bright_color());
     249    parent->m_surf->bar(bx,y,x+w-1,y+wm->font()->height()+1,wm->medium_color());
     250    wm->font()->put_string(parent->m_surf,x+1,y+1,n,wm->bright_color());
     251    if (on_off && *on_off) wm->font()->put_string(parent->m_surf,bx+1,y+1,"*",wm->bright_color());
    252252      }
    253253    }
     
    290290{
    291291  if (p->xp!=-1) return p->xp;
    292   int w=bar->screen->Size().x;
     292  int w=bar->m_surf->Size().x;
    293293
    294294
     
    381381  mx-=bar->x;
    382382  my-=bar->y;
    383   if (mx<0 || my<0 || mx>=bar->screen->Size().x || my>=bar->screen->Size().y) return NULL;
     383  if (mx<0 || my<0 || mx>=bar->m_surf->Size().x || my>=bar->m_surf->Size().y) return NULL;
    384384  else
    385385  {
  • abuse/trunk/src/imlib/scroller.cpp

    r643 r644  
    501501    for (int j=0; j<th; j++,dy+=tex->Size().y)
    502502      for (int i=0,dx=x; i<tw; i++,dx+=tex->Size().x)
    503         tex->put_image(screen,dx,dy);
     503        screen->PutImage(tex, dx, dy);
    504504
    505505    screen->SetClip(cx1, cy1, cx2, cy2);
  • abuse/trunk/src/imlib/sprite.cpp

    r555 r644  
    2626void sprite::restore_background()
    2727{ if (x+save->Size().x>=0 && y+save->Size().y>=0 && x<=xres && y<=yres)
    28       save->put_image(screen,x,y); }
     28      screen->PutImage(save, x, y); }
    2929
    3030void sprite::get_background()
    3131{ if (x+visual->Size().x>=0 && y+visual->Size().y>=0 && x<=xres && y<=yres)
    32    screen->put_part(save,0,0,x,y,x+save->Size().x-1,y+save->Size().y-1); }
     32   save->PutPart(screen,0,0,x,y,x+save->Size().x-1,y+save->Size().y-1); }
    3333
    3434void sprite::draw()
    3535{ if (x+visual->Size().x>=0 && y+visual->Size().y>=0 && x<=xres && y<=yres)
    36    visual->put_image(screen,x,y,1); }
     36   screen->PutImage(visual, x, y, 1); }
    3737
    3838sprite::sprite(image *Screen, image *Visual, int X, int Y)
  • abuse/trunk/src/loadgame.cpp

    r643 r644  
    6060}
    6161
    62 Jwindow *create_num_window(int mx, int total_saved, int lines, image **thumb_nails)
     62Jwindow *create_num_window(int mx, int total_saved, int lines, image **thumbnails)
    6363{
    6464  ico_button *buts[MAX_SAVE_GAMES];
     
    7777        x += iw;
    7878    }
    79     if (thumb_nails) { while (!thumb_nails[n]) n++; }
     79    if (thumbnails) { while (!thumbnails[n]) n++; }
    8080    buts[i]=new ico_button(x, y, ID_LOAD_GAME_NUMBER + n,
    8181               save_buts[n*3+0],save_buts[n*3+0],save_buts[n*3+1],save_buts[n*3+2],NULL);
     
    167167{
    168168    int total_saved=0;
    169     image *thumb_nails[MAX_SAVE_GAMES];
     169    image *thumbnails[MAX_SAVE_GAMES];
    170170    int start_num=0;
    171171    int max_w=160,max_h=100;
    172     memset(thumb_nails,0,sizeof(thumb_nails));
     172    memset(thumbnails,0,sizeof(thumbnails));
    173173
    174174    image *first=NULL;
     
    191191            if (se && se->type==SPEC_IMAGE)
    192192            {
    193                 thumb_nails[start_num] = new image(fp, se);
    194                 if (thumb_nails[start_num]->Size().x>max_w) max_w=thumb_nails[start_num]->Size().x;
    195                 if (thumb_nails[start_num]->Size().y>max_h) max_h=thumb_nails[start_num]->Size().y;
    196                 if (!first) first=thumb_nails[start_num];
     193                thumbnails[start_num] = new image(fp, se);
     194                if (thumbnails[start_num]->Size().x>max_w) max_w=thumbnails[start_num]->Size().x;
     195                if (thumbnails[start_num]->Size().y>max_h) max_h=thumbnails[start_num]->Size().y;
     196                if (!first) first=thumbnails[start_num];
    197197                total_saved++;
    198198            }
     
    202202        if (fail && show_all)
    203203        {
    204             thumb_nails[start_num] = new image(vec2i(160, 100));
    205             thumb_nails[start_num]->clear();
    206             console_font->put_string(thumb_nails[start_num],0,0,symbol_str("no_saved"));
     204            thumbnails[start_num] = new image(vec2i(160, 100));
     205            thumbnails[start_num]->clear();
     206            console_font->put_string(thumbnails[start_num],0,0,symbol_str("no_saved"));
    207207            total_saved++;
    208             if (!first) first=thumb_nails[start_num];
     208            if (!first) first=thumbnails[start_num];
    209209        }
    210210        delete fp;
     
    233233
    234234
    235     Jwindow *l_win=create_num_window(0,total_saved,MAX_SAVE_LINES,thumb_nails);
     235    Jwindow *l_win=create_num_window(0,total_saved,MAX_SAVE_LINES,thumbnails);
    236236    Jwindow *preview=wm->new_window(l_win->x+l_win->l+5,l_win->y,max_w,max_h,NULL,title);
    237237
    238     first->put_image(preview->screen,preview->x1(),preview->y1());
     238    preview->m_surf->PutImage(first, preview->x1(), preview->y1());
    239239
    240240    Event ev;
     
    252252            int draw_num=ev.message.id-ID_LOAD_GAME_PREVIEW;
    253253            preview->clear();
    254             thumb_nails[draw_num]->put_image(preview->screen,preview->x1(),preview->y1());
     254            preview->m_surf->PutImage(thumbnails[draw_num], preview->x1(), preview->y1());
    255255        }
    256256
     
    263263
    264264    for (i=0; i<total_saved; i++)
    265         if (thumb_nails[i])
    266             delete thumb_nails[i];
     265        delete thumbnails[i];
    267266
    268267    return got_level;
  • abuse/trunk/src/menu.cpp

    r643 r644  
    240240      int by2=by1+bh-1;
    241241
    242       main_screen->put_part(save,0,0,mx+1,by1,mx+mw-2,by2);
     242      save->PutPart(main_screen, 0, 0, mx + 1, by1, mx + mw - 2, by2);
    243243      tint_area(mx+1,by1,mx+mw-2,by2,63,63,63,color);
    244244
     
    256256      }
    257257      wm->flush_screen();
    258       save->put_image(main_screen,mx+1,by1);
     258      main_screen->PutImage(save, mx + 1, by1);
    259259    } else { Timer tmp; tmp.WaitMs(10); }
    260260
     
    520520      {
    521521        image *tit=cache.img(title_screen);
    522           tit->put_image(main_screen,main_screen->Size().x/2-tit->Size().x/2,
    523                           main_screen->Size().y/2-tit->Size().y/2);
     522          main_screen->PutImage(tit, main_screen->Size().x/2-tit->Size().x/2,
     523                                main_screen->Size().y/2-tit->Size().y/2);
    524524      }
    525525      inm->redraw();
  • abuse/trunk/src/netcfg.cpp

    r643 r644  
    275275  int ns_w=ns->Size().x,ns_h=ns->Size().y;
    276276  int x=(xres+1)/2-ns_w/2,y=(yres+1)/2-ns_h/2;
    277   ns->put_image(main_screen,x,y);
     277  main_screen->PutImage(ns, x, y);
    278278  JCFont *fnt=wm->font();
    279279
     
    315315  }
    316316
    317   screen_backup->put_image(main_screen, 0, 0);
     317  main_screen->PutImage(screen_backup, 0, 0);
    318318  wm->flush_screen();
    319319  delete screen_backup;
     
    340340  int ns_w=ns->Size().x,ns_h=ns->Size().y;
    341341  int x=(xres+1)/2-ns_w/2,y=(yres+1)/2-ns_h/2;
    342   ns->put_image(main_screen,x,y);
     342  main_screen->PutImage(ns, x, y);
    343343  JCFont *fnt=wm->font();
    344344  image *ok_image=cache.img(cache.reg("art/frame.spe","dev_ok",SPEC_IMAGE,1))->copy(),
     
    460460  int ns_w=ns->Size().x,ns_h=ns->Size().y;
    461461  int x=(xres+1)/2-ns_w/2,y=(yres+1)/2-ns_h/2;
    462   ns->put_image(main_screen, x, y);
     462  main_screen->PutImage(ns, x, y);
    463463  char const *nw_s = symbol_str("Networking");
    464464  JCFont *fnt=wm->font();
  • abuse/trunk/src/profile.cpp

    r643 r644  
    122122  float time_scaler=(float)max_bar_length/prof_list[0].total_time;
    123123
    124   prof_win->screen->bar(0,prof_win->y1(),prof_win->screen->Size().x-1,prof_win->screen->Size().y,0);
     124  prof_win->m_surf->bar(0,prof_win->y1(),prof_win->m_surf->Size().x-1,prof_win->m_surf->Size().y,0);
    125125  int dy = 0;
    126126  for (; i<prof_height; i++)
    127127  {
    128     console_font->put_string(prof_win->screen,spliter+1,dy,object_names[prof_list[i].otype]);
    129     prof_win->screen->bar(spliter-1-(int)(prof_list[i].total_time*time_scaler),dy+1,
     128    console_font->put_string(prof_win->m_surf,spliter+1,dy,object_names[prof_list[i].otype]);
     129    prof_win->m_surf->bar(spliter-1-(int)(prof_list[i].total_time*time_scaler),dy+1,
    130130              spliter-1,
    131131              dy+console_font->height()-1,wm->bright_color());
  • abuse/trunk/src/ui/volumewindow.cpp

    r555 r644  
    4444    l = cache.img(bg)->Size().x;
    4545    h = cache.img(bg)->Size().y;
    46     screen = new image(cache.img(bg)->Size(), NULL, 2);
     46    m_surf = new image(cache.img(bg)->Size(), NULL, 2);
    4747    redraw();
    4848}
     
    5050void VolumeWindow::redraw()
    5151{
    52     cache.img(bg)->put_image(screen, 0, 0);
     52    m_surf->PutImage(cache.img(bg), 0, 0);
    5353    draw_music_vol();
    5454    draw_sfx_vol();
     
    6262    if(t != 0)
    6363    {
    64         cache.img(slider)->put_image(screen, x1, y1);
    65 //      screen->bar(x1,y1,dx,y2,c1);
     64        m_surf->PutImage(cache.img(slider), x1, y1);
     65//      m_surf->bar(x1,y1,dx,y2,c1);
    6666    }
    6767    else
     
    6969
    7070    if(dx < x2)
    71         screen->bar(dx + 1, y1, x2, y2, c2);
     71        m_surf->bar(dx + 1, y1, x2, y2, c2);
    7272}
    7373
Note: See TracChangeset for help on using the changeset viewer.