Ignore:
Timestamp:
Apr 20, 2011, 12:39:27 AM (11 years ago)
Author:
Sam Hocevar
Message:

imlib: use vec2i for image::size and unroll all necessary changes
everywhere else in the code.

File:
1 edited

Legend:

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

    r494 r512  
    1111#include "config.h"
    1212
     13#include "common.h"
     14
    1315#include "sbar.h"
    1416#include "view.h"
     
    7880
    7981  image *im=cache.img(*offset);
    80   int dw=small_render ? im->width()*2 : im->width();
    81   int dh=small_render ? im->height()*2 : im->height();
     82  int dw=small_render ? im->Size().x*2 : im->Size().x;
     83  int dh=small_render ? im->Size().y*2 : im->Size().y;
    8284
    8385  int n=num/100;
     
    105107
    106108    // status bar width & height
    107     int sb_w=(small_render ? sb->width()*2 : sb->width()),
    108     sb_h=(small_render ? sb->height()*2 : sb->height());
     109    int sb_w=(small_render ? sb->Size().x*2 : sb->Size().x),
     110    sb_h=(small_render ? sb->Size().y*2 : sb->Size().y);
    109111
    110112    // status bar x & y position
     
    115117
    116118    // weapon icon width & height
    117     int ww=small_render ? cache.img(bweap[0])->width()*2 : cache.img(bweap[0])->width();
    118     int wh=small_render ? cache.img(bweap[0])->height()*2 : cache.img(bweap[0])->height();
     119    int ww=small_render ? cache.img(bweap[0])->Size().x*2 : cache.img(bweap[0])->Size().x;
     120    int wh=small_render ? cache.img(bweap[0])->Size().y*2 : cache.img(bweap[0])->Size().y;
    119121
    120122
    121123    // numpad y offset
    122124    int np_yo=small_render ? 42 : 21;
    123     int np_w=small_render ? cache.img(sbar_numpad)->width()*2 : cache.img(sbar_numpad)->width();
    124     int np_h=small_render ? cache.img(sbar_numpad)->height()*2 : cache.img(sbar_numpad)->height();
     125    int np_w=small_render ? cache.img(sbar_numpad)->Size().x*2 : cache.img(sbar_numpad)->Size().x;
     126    int np_h=small_render ? cache.img(sbar_numpad)->Size().y*2 : cache.img(sbar_numpad)->Size().y;
    125127
    126128    // selection bar width * height
    127     int sel_w=small_render ? cache.img(sbar_select)->width()*2 : cache.img(sbar_select)->width();
    128     int sel_h=small_render ? cache.img(sbar_select)->height()*2 : cache.img(sbar_select)->height();
     129    int sel_w=small_render ? cache.img(sbar_select)->Size().x*2 : cache.img(sbar_select)->Size().x;
     130    int sel_h=small_render ? cache.img(sbar_select)->Size().y*2 : cache.img(sbar_select)->Size().y;
    129131
    130132    int sel_off=small_render ?  8 : 4;
     
    180182
    181183  // status bar width & height
    182   int sb_w=sb->width(),
    183       sb_h=sb->height();
     184  int sb_w=sb->Size().x,
     185      sb_h=sb->Size().y;
    184186
    185187  if (small_render) { sb_w*=2; sb_h*=2; }
     
    276278
    277279    // status bar width & height
    278     sb_w=sb->width();
    279     sb_h=sb->height();
     280    sb_w=sb->Size().x;
     281    sb_h=sb->Size().y;
    280282  }
    281283
Note: See TracChangeset for help on using the changeset viewer.