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

    r494 r512  
    1212
    1313#include <string.h>
     14
     15#include "common.h"
    1416
    1517#include "game.h"
     
    6062  ico_button *buts[MAX_SAVE_GAMES];
    6163  int y = 0, i;
    62   int ih=cache.img(save_buts[0])->height();
     64  int ih=cache.img(save_buts[0])->Size().y;
    6365  int x=0;
    6466  for (i=0; i<total_saved; i++,y+=ih)
     
    9395  if (last_free) return last_free;    // if there are any slots not created yet...
    9496
    95   int w=cache.img(save_buts[0])->width();
     97  int w=cache.img(save_buts[0])->Size().x;
    9698  int mx=last_demo_mx-w/2;
    9799  if(mx + w + 10 > xres) mx = xres - w - 10;
     
    179181            {
    180182                thumb_nails[start_num]=new image(se,fp);
    181                 if (thumb_nails[start_num]->width()>max_w) max_w=thumb_nails[start_num]->width();
    182                 if (thumb_nails[start_num]->height()>max_h) max_h=thumb_nails[start_num]->height();
     183                if (thumb_nails[start_num]->Size().x>max_w) max_w=thumb_nails[start_num]->Size().x;
     184                if (thumb_nails[start_num]->Size().y>max_h) max_h=thumb_nails[start_num]->Size().y;
    183185                if (!first) first=thumb_nails[start_num];
    184186                total_saved++;
     
    203205
    204206    int i;
    205 /*  int ih=cache.img(save_buts[0])->height();
     207/*  int ih=cache.img(save_buts[0])->Size().y;
    206208  ico_button *buts[MAX_SAVE_GAMES];
    207209  int y=0;
Note: See TracChangeset for help on using the changeset viewer.