Ignore:
Timestamp:
Jan 10, 2005, 1:33:40 AM (16 years ago)
Author:
Sam Hocevar
Message:
  • oops, forgot to commit #ifdef fixes.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • pwntcha/trunk/src/image.c

    r439 r442  
    1616#include "common.h"
    1717
    18 #if defined(WIN32)
     18#if defined(HAVE_IL_H)
     19#   error "DevIL routines not implemented yet"
     20#elif defined(HAVE_OLECTL_H)
    1921#   include <windows.h>
    2022#   include <ocidl.h>
    2123#   include <olectl.h>
    22 BOOL oleload(LPCTSTR name, LPPICTURE* pic);
     24static BOOL oleload(LPCTSTR name, LPPICTURE* pic);
    2325struct priv
    2426{
     
    4042{
    4143    struct image *img;
    42 #if defined(WIN32)
     44#if defined(HAVE_IL_H)
     45#elif defined(HAVE_OLECTL_H)
    4346    struct priv *priv = malloc(sizeof(struct priv));
    4447    LPPICTURE pic = NULL;
     
    5861        return NULL;
    5962
    60 #if defined(WIN32)
     63#if defined(HAVE_OLECTL_H)
    6164    if(!oleload((LPCTSTR)name, &pic))
    6265    {
     
    119122
    120123    img = (struct image *)malloc(sizeof(struct image));
    121 #if defined(WIN32)
     124#if defined(HAVE_IL_H)
     125#elif defined(HAVE_OLECTL_H)
    122126    img->width = width;
    123127    img->height = height;
     
    153157{
    154158    struct image *img;
    155 #if defined(WIN32)
     159#if defined(HAVE_IL_H)
     160#elif defined(HAVE_OLECTL_H)
    156161    struct priv *priv = malloc(sizeof(struct priv));
    157162    HDC dc;
     
    183188
    184189    img = (struct image *)malloc(sizeof(struct image));
    185 #if defined(WIN32)
     190#if defined(HAVE_IL_H)
     191#elif defined(HAVE_OLECTL_H)
    186192    dc = CreateCompatibleDC(NULL);
    187193    if(GetDeviceCaps(dc, BITSPIXEL) < 24)
     
    233239void image_free(struct image *img)
    234240{
    235 #if defined(WIN32)
     241#if defined(HAVE_IL_H)
     242#elif defined(HAVE_OLECTL_H)
    236243    struct priv *priv = img->priv;
    237244    DeleteObject(priv->bitmap);
     
    253260void image_save(struct image *img, const char *name)
    254261{
    255 #if defined(WIN32)
     262#if defined(HAVE_IL_H)
     263#elif defined(HAVE_OLECTL_H)
    256264
    257265#elif defined(HAVE_SDL_IMAGE_H)
     
    307315}
    308316
    309 #if defined(WIN32)
    310 BOOL oleload(LPCTSTR name, LPPICTURE* pic)
     317#if defined(HAVE_OLECTL_H)
     318static BOOL oleload(LPCTSTR name, LPPICTURE* pic)
    311319{
    312320    HRESULT ret;
Note: See TracChangeset for help on using the changeset viewer.