]> git.saurik.com Git - wxWidgets.git/commitdiff
fixed to the IFF handler, moved into one file
authorVáclav Slavík <vslavik@fastmail.fm>
Thu, 17 Jan 2002 19:40:18 +0000 (19:40 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Thu, 17 Jan 2002 19:40:18 +0000 (19:40 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@13613 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

25 files changed:
distrib/msw/tmake/filelist.txt
include/wx/gdicmn.h
include/wx/iffdecod.h [deleted file]
include/wx/imagiff.h
src/common/iffdecod.cpp [deleted file]
src/common/imagiff.cpp
src/files.lst
src/gtk/files.lst
src/gtk1/files.lst
src/mac/carbon/files.lst
src/mac/files.lst
src/mgl/files.lst
src/microwin/files.lst
src/motif/files.lst
src/msw/files.lst
src/msw/makefile.b32
src/msw/makefile.bcc
src/msw/makefile.dos
src/msw/makefile.g95
src/msw/makefile.sc
src/msw/makefile.vc
src/msw/makefile.wat
src/univ/files.lst
src/wxUniv.dsp
src/wxWindows.dsp

index 42f59322c0699acac324cdca7b6dc2063279a647..89f83fe39776c1b5878da71e8d7bb106259248cc 100644 (file)
@@ -166,7 +166,6 @@ gaugecmn.cpp        Common
 gdicmn.cpp     Common
 geometry.cpp   Common
 gifdecod.cpp   Common
-iffdecod.cpp   Common
 hash.cpp       Common  Base
 helpbase.cpp   Common
 http.cpp       Common  Socket,Base
@@ -797,7 +796,6 @@ helpbase.h  WXH
 helphtml.h     WXH
 helpwin.h      WXH
 icon.h WXH
-iffdecod.h     WXH
 image.h        WXH
 imaggif.h      WXH
 imagiff.h      WXH
index b77e75ad53bc10a3e506248006431df1f47fa6ea..199f6aa679879a183c1171485e5cab2f8b0995d8 100644 (file)
@@ -79,6 +79,7 @@ enum wxBitmapType
     wxBITMAP_TYPE_ICON,
     wxBITMAP_TYPE_ICON_RESOURCE,
     wxBITMAP_TYPE_ANI,
+    wxBITMAP_TYPE_IFF,
     wxBITMAP_TYPE_MACCURSOR,
     wxBITMAP_TYPE_MACCURSOR_RESOURCE,
     wxBITMAP_TYPE_ANY = 50
diff --git a/include/wx/iffdecod.h b/include/wx/iffdecod.h
deleted file mode 100644 (file)
index 7520167..0000000
+++ /dev/null
@@ -1,94 +0,0 @@
-//
-// iffdecod.h  - image handler for IFF/ILBM images
-//
-// (c) Steffen Gutmann, 2002
-//
-// Creation date: 08.01.2002
-// Last modified: 12.01.2002
-//
-
-#ifndef WX_IIF_DECODE_H
-#define WX_IIF_DECODE_H
-
-#ifdef __GNUG__
-#pragma interface "iffdecod.h"
-#endif
-
-#include "wx/setup.h"
-#define wxUSE_IFF 1
-
-#if wxUSE_STREAMS && wxUSE_IFF
-
-#include "wx/stream.h"
-#include "wx/image.h"
-
-// --------------------------------------------------------------------------
-// Constants
-// --------------------------------------------------------------------------
-
-// Error codes:
-//  Note that the error code wxIFF_TRUNCATED means that the image itself
-//  is most probably OK, but the decoder didn't reach the end of the data
-//  stream; this means that if it was not reading directly from file,
-//  the stream will not be correctly positioned.
-//
-
-enum
-{
-    wxIFF_OK = 0,                   /* everything was OK */
-    wxIFF_INVFORMAT,                /* error in iff header */
-    wxIFF_MEMERR,                   /* error allocating memory */
-    wxIFF_TRUNCATED                 /* file appears to be truncated */
-};
-
-// --------------------------------------------------------------------------
-// wxIFFDecoder class
-// --------------------------------------------------------------------------
-
-// internal class for storing IFF image data
-class IFFImage
-{
-public:
-    unsigned int w;                 /* width */
-    unsigned int h;                 /* height */
-    int transparent;                /* transparent color (-1 = none) */
-    int colors;                            /* number of colors */
-    unsigned char *p;               /* bitmap */
-    unsigned char *pal;             /* palette */
-
-    IFFImage() : w(0), h(0), colors(0), p(0), pal(0) {}
-    ~IFFImage() { delete [] p; delete [] pal; }
-};
-
-class WXDLLEXPORT wxIFFDecoder
-{
-private:
-    IFFImage *m_image;         // image data
-    wxInputStream *m_f;        // input stream
-    unsigned char *databuf; 
-    unsigned char *picptr; 
-    unsigned char *decomp_mem;
-
-    void Destroy();
-
-public:
-    // get data of current frame
-    unsigned char* GetData() const;
-    unsigned char* GetPalette() const;
-    int GetNumColors() const;
-    unsigned int GetWidth() const;
-    unsigned int GetHeight() const;
-    int GetTransparentColour() const;
-
-    // constructor, destructor, etc.
-    wxIFFDecoder(wxInputStream *s);
-    ~wxIFFDecoder() { Destroy(); }
-    bool CanRead();
-    int ReadIFF();
-    bool ConvertToImage(wxImage *image) const;
-};
-
-
-#endif  // wxUSE_STREAM && wxUSE_IFF
-#endif  // _WX_IFFDECOD_H
-
index 8091ce4d43468013250b89abd1f7205bd858a93e..df340cd7b0ea5661929e806ea352ac28d212078e 100644 (file)
@@ -1,52 +1,47 @@
-//
-// imgiff.h    - image handler for Amiga IFF images
-//               parts of the source taken by xv source code.
-//
-// (c) Steffen Gutmann, 2002
-//
-// Creation date: 08.01.2002
-// Last modified: 08.01.2002
-//
-
-#ifndef WX_IMAGE_IFF_H
-#define WX_IMAGE_IFF_H
+/////////////////////////////////////////////////////////////////////////////
+// Name:        imagiff.h
+// Purpose:     wxImage handler for Amiga IFF images
+// Author:      Steffen Gutmann
+// RCS-ID:      $Id$
+// Copyright:   (c) Steffen Gutmann, 2002
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_IMAGE_IFF_H_
+#define _WX_IMAGE_IFF_H_
 
 #ifdef __GNUG__
 #pragma interface "imagiff.h"
 #endif
 
 #include "wx/image.h"
-#define wxUSE_IFF 1
 
 //-----------------------------------------------------------------------------
 // wxIFFHandler
 //-----------------------------------------------------------------------------
 
-#if wxUSE_IFF
+#if wxUSE_IMAGE && wxUSE_IFF
 
 class WXDLLEXPORT wxIFFHandler : public wxImageHandler
 {
     DECLARE_DYNAMIC_CLASS(wxIFFHandler)
 
 public:
-
     wxIFFHandler()
     {
-       m_name = "IFF file";
-       m_extension = "iff";
-       m_type = wxBITMAP_TYPE_ANY;
-       // m_mime = "image/iff";
+        m_name = wxT("IFF file");
+        m_extension = wxT("iff");
+        m_type = wxBITMAP_TYPE_IFF;
+        m_mime = wxT("image/x-iff");
     };
 
 #if wxUSE_STREAMS
-    virtual bool LoadFile(wxImage *image, wxInputStream& stream, 
-           bool verbose=TRUE, int index=0);
-    virtual bool SaveFile(wxImage *image, wxOutputStream& stream, 
-           bool verbose=TRUE);
+    virtual bool LoadFile(wxImage *image, wxInputStream& stream, bool verbose=TRUE, int index=-1);
+    virtual bool SaveFile(wxImage *image, wxOutputStream& stream, bool verbose=TRUE);
     virtual bool DoCanRead(wxInputStream& stream);
 #endif
 };
-#endif
 
-#endif
+#endif // wxUSE_IMAGE && wxUSE_IFF
 
+#endif // _WX_IMAGE_IFF_H_
diff --git a/src/common/iffdecod.cpp b/src/common/iffdecod.cpp
deleted file mode 100644 (file)
index 803d302..0000000
+++ /dev/null
@@ -1,649 +0,0 @@
-//
-// iffdecod.cc  - image handler for IFF/ILBM images
-//        parts of the source are based on xviff by Thomas Meyer
-//        Permission for use in wxWindows has been gratefully given.
-//
-// (c) Steffen Gutmann, 2002
-//
-// Creation date: 08.01.2002
-// Last modified: 12.01.2002
-//
-
-#ifdef __GNUG__
-#pragma implementation "iffdecod.h"
-#endif
-
-// For compilers that support precompilation, includes "wx.h".
-#include "wx/wxprec.h"
-
-#ifdef __BORLANDC__
-#  pragma hdrstop
-#endif
-
-#ifndef WX_PRECOMP
-#  include "wx/defs.h"
-#  include "wx/log.h"
-#endif
-
-#include <stdlib.h>
-#include <string.h>
-#include "wx/iffdecod.h"
-
-#if wxUSE_STREAMS && wxUSE_IFF
-
-//---------------------------------------------------------------------------
-// wxIFFDecoder constructor and destructor
-//---------------------------------------------------------------------------
-
-wxIFFDecoder::wxIFFDecoder(wxInputStream *s)
-{
-    m_f = s;
-    m_image = 0;
-    databuf = 0;
-    decomp_mem = 0;
-}
-
-void wxIFFDecoder::Destroy()
-{
-    delete m_image;
-    m_image = 0;
-    delete [] databuf;
-    databuf = 0;
-    delete [] decomp_mem;
-    decomp_mem = 0;
-}
-
-//---------------------------------------------------------------------------
-// Convert this image to a wxImage object
-//---------------------------------------------------------------------------
-
-// This function was designed by Vaclav Slavik
-
-bool wxIFFDecoder::ConvertToImage(wxImage *image) const
-{
-    // just in case...
-    image->Destroy();
-
-    // create the image
-    image->Create(GetWidth(), GetHeight());
-
-    if (!image->Ok())
-        return FALSE;
-
-    unsigned char *pal = GetPalette();
-    unsigned char *src = GetData();
-    unsigned char *dst = image->GetData();
-    int colors = GetNumColors();
-    int transparent = GetTransparentColour();
-    long i;
-
-    // set transparent colour mask
-    if (transparent != -1)
-    {
-        for (i = 0; i < colors; i++)
-        {
-            if ((pal[3 * i + 0] == 255) &&
-                (pal[3 * i + 1] == 0) &&
-                (pal[3 * i + 2] == 255))
-            {
-                pal[3 * i + 2] = 254;
-            }
-        }
-
-        pal[3 * transparent + 0] = 255,
-        pal[3 * transparent + 1] = 0,
-        pal[3 * transparent + 2] = 255;
-
-        image->SetMaskColour(255, 0, 255);
-    }
-    else
-        image->SetMask(FALSE);
-
-#if wxUSE_PALETTE
-    if (pal && colors > 0)
-    {
-        unsigned char* r = new unsigned char[colors];
-        unsigned char* g = new unsigned char[colors];
-        unsigned char* b = new unsigned char[colors];
-
-        for (i = 0; i < colors; i++)
-        {
-            r[i] = pal[3*i + 0];
-            g[i] = pal[3*i + 1];
-            b[i] = pal[3*i + 2];
-        }
-
-        image->SetPalette(wxPalette(colors, r, g, b));
-
-        delete [] r;
-        delete [] g;
-        delete [] b;
-    }
-#endif // wxUSE_PALETTE
-
-    // copy image data
-    for (i = 0; i < (long)(GetWidth() * GetHeight()); i++, src += 3, dst += 3)
-    {
-    dst[0] = src[0];
-    dst[1] = src[1];
-    dst[2] = src[2];
-    }
-
-    return TRUE;
-}
-
-
-//---------------------------------------------------------------------------
-// Data accessors
-//---------------------------------------------------------------------------
-
-// Get data for current frame
-
-unsigned char* wxIFFDecoder::GetData() const    { return (m_image->p); }
-unsigned char* wxIFFDecoder::GetPalette() const { return (m_image->pal); }
-int wxIFFDecoder::GetNumColors() const          { return m_image->colors; }
-unsigned int wxIFFDecoder::GetWidth() const     { return (m_image->w); }
-unsigned int wxIFFDecoder::GetHeight() const    { return (m_image->h); }
-int wxIFFDecoder::GetTransparentColour() const { return m_image->transparent; }
-
-//---------------------------------------------------------------------------
-// IFF reading and decoding
-//---------------------------------------------------------------------------
-
-//
-// CanRead:
-//  Returns TRUE if the file looks like a valid IFF, FALSE otherwise.
-//
-bool wxIFFDecoder::CanRead()
-{
-    unsigned char buf[12] = "";
-
-    m_f->Read(buf, 12);
-    m_f->SeekI(-12, wxFromCurrent);
-
-    return (memcmp(buf, "FORM", 4) == 0 && memcmp(buf+8, "ILBM", 4) == 0);
-}
-
-
-// ReadIFF:
-// Based on xv source code by Thomas Meyer
-// Permission for use in wxWindows has been gratefully given.
-
-typedef unsigned char byte;
-#define IFFDEBUG 0
-
-/*************************************************************************
-  void decomprle(source, destination, source length, buffer size)
-
-  Decompress run-length encoded data from source to destination. Terminates
-  when source is decoded completely or destination buffer is full.
-
-  The decruncher is as optimized as I could make it, without risking
-  safety in case of corrupt BODY chunks.
-**************************************************************************/
-
-static void decomprle(const byte *sptr, byte *dptr, long slen, long dlen)
-{
-    byte codeByte, dataByte;
-
-    while ((slen > 0) && (dlen > 0)) {
-    // read control byte
-    codeByte = *sptr++;
-
-    if (codeByte < 0x80) {
-        codeByte++;
-        if ((slen > (long) codeByte) && (dlen >= (long) codeByte)) {
-        slen -= codeByte + 1;
-        dlen -= codeByte;
-        while (codeByte > 0) {
-            *dptr++ = *sptr++;
-            codeByte--;
-        }
-        }
-        else slen = 0;
-    }
-
-    else if (codeByte > 0x80) {
-        codeByte = 0x81 - (codeByte & 0x7f);
-        if ((slen > (long) 0) && (dlen >= (long) codeByte)) {
-        dataByte = *sptr++;
-        slen -= 2;
-        dlen -= codeByte;
-        while (codeByte > 0) {
-            *dptr++ = dataByte;
-            codeByte--;
-        }
-        }
-        else slen = 0;
-    }
-    }
-}
-
-/******************************************/
-static unsigned int iff_getword(const byte *ptr)
-{
-    unsigned int v;
-
-    v = *ptr++;
-    v = (v << 8) + *ptr;
-    return v;
-}
-
-/******************************************/
-static unsigned long iff_getlong(const byte *ptr)
-{
-    unsigned long l;
-
-    l = *ptr++;
-    l = (l << 8) + *ptr++;
-    l = (l << 8) + *ptr++;
-    l = (l << 8) + *ptr;
-    return l;
-}
-
-// Define internal ILBM types
-#define ILBM_NORMAL     0
-#define ILBM_EHB        1
-#define ILBM_HAM        2
-#define ILBM_HAM8       3
-#define ILBM_24BIT      4
-
-int wxIFFDecoder::ReadIFF()
-{
-    Destroy();
-
-    m_image = new IFFImage();
-    if (m_image == 0) {
-    Destroy();
-    return wxIFF_MEMERR;
-    }
-
-    // compute file length
-    off_t currentPos = m_f->TellI();
-    m_f->SeekI(0, wxFromEnd);
-    long filesize = m_f->TellI();
-    m_f->SeekI(currentPos, wxFromStart);
-
-    // allocate memory for complete file
-    if ((databuf = new byte[filesize]) == 0) {
-    Destroy();
-    return wxIFF_MEMERR;
-    }
-
-    m_f->Read(databuf, filesize);
-    const byte *dataend = databuf + filesize;
-
-    // initialize work pointer. used to trace the buffer for IFF chunks
-    const byte *dataptr = databuf;
-
-    // check for minmal size
-    if (dataptr + 12 > dataend) {
-    Destroy();
-    return wxIFF_INVFORMAT;
-    }
-
-    // check if we really got an IFF file
-    if (strncmp((char *)dataptr, "FORM", 4) != 0) {
-    Destroy();
-    return wxIFF_INVFORMAT;
-    }
-
-    dataptr = dataptr + 8;                  // skip ID and length of FORM
-
-    // check if the IFF file is an ILBM (picture) file
-    if (strncmp((char *) dataptr, "ILBM", 4) != 0) {
-    Destroy();
-    return wxIFF_INVFORMAT;
-    }
-
-    wxLogTrace(_T("iff"), _T("IFF ILBM file recognized"));
-
-    dataptr = dataptr + 4;                                // skip ID
-
-    //
-    // main decoding loop. searches IFF chunks and handles them.
-    // terminates when BODY chunk was found or dataptr ran over end of file
-    //
-    bool BMHDok = false, CMAPok = false, CAMGok = false;
-    int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1;
-    byte bmhd_masking = 0, bmhd_compression = 0;
-    long camg_viewmode = 0;
-    int colors = 0;
-    while (dataptr + 8 <= dataend) {
-    // get chunk length and make even
-    size_t chunkLen = (iff_getlong(dataptr + 4) + 1) & 0xfffffffe;
-#ifdef __VMS
-       // Silence compiler warning
-       int chunkLen_;
-       chunkLen_ = chunkLen;
-       if (chunkLen_ < 0) {     // format error?
-#else
-       if (chunkLen < 0) {     // format error?
-#endif
-         break;
-    }
-    bool truncated = (dataptr + 8 + chunkLen > dataend);
-
-    if (strncmp((char *)dataptr, "BMHD", 4) == 0) { // BMHD chunk?
-        if (chunkLen < 12 + 2 || truncated) {
-        break;
-        }
-        bmhd_width = iff_getword(dataptr + 8);      // width of picture
-        bmhd_height= iff_getword(dataptr + 8 + 2);  // height of picture
-        bmhd_bitplanes = *(dataptr + 8 + 8);        // # of bitplanes
-        bmhd_masking  = *(dataptr + 8 + 9);
-        bmhd_compression = *(dataptr + 8 + 10);     // get compression
-        bmhd_transcol    = iff_getword(dataptr + 8 + 12);
-        BMHDok = true;                              // got BMHD
-        dataptr += 8 + chunkLen;                    // to next chunk
-    }
-    else if (strncmp((char *)dataptr, "CMAP", 4) == 0) { // CMAP ?
-        if (truncated) {
-        break;
-        }
-        const byte *cmapptr = dataptr + 8;
-        colors = chunkLen / 3;                  // calc no of colors
-
-        delete m_image->pal;
-        m_image->pal = 0;
-        m_image->colors = colors;
-        if (colors > 0) {
-        m_image->pal = new byte[3*colors];
-        if (!m_image->pal) {
-            Destroy();
-            return wxIFF_MEMERR;
-        }
-
-        // copy colors to color map
-        for (int i=0; i < colors; i++) {
-            m_image->pal[3*i + 0] = *cmapptr++;
-            m_image->pal[3*i + 1] = *cmapptr++;
-            m_image->pal[3*i + 2] = *cmapptr++;
-        }
-        }
-
-        wxLogTrace(_T("iff"), _T("Read %d colors from IFF file."),
-            colors);
-
-        CMAPok = true;                              // got CMAP
-        dataptr += 8 + chunkLen;                    // to next chunk
-    } else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ?
-        if (chunkLen < 4 || truncated) {
-        break;
-        }
-        camg_viewmode = iff_getlong(dataptr + 8);   // get viewmodes
-        CAMGok = true;                              // got CAMG
-        dataptr += 8 + chunkLen;                    // to next chunk
-    }
-    else if (strncmp((char *)dataptr, "BODY", 4) == 0) { // BODY ?
-        if (!BMHDok) {                              // BMHD found?
-        break;
-        }
-        const byte *bodyptr = dataptr + 8;          // -> BODY data
-
-        if (truncated) {
-        chunkLen = dataend - dataptr;
-        }
-
-        //
-            // if BODY is compressed, allocate buffer for decrunched BODY
-        // and decompress it (run length encoding)
-        //
-        if (bmhd_compression == 1) {
-        // calc size of decrunch buffer - (size of the actual pic.
-        // decompressed in interleaved Amiga bitplane format)
-
-        size_t decomp_bufsize = (((bmhd_width + 15) >> 4) << 1)
-            * bmhd_height * bmhd_bitplanes;
-
-        if ((decomp_mem = new byte[decomp_bufsize]) == 0) {
-            Destroy();
-            return wxIFF_MEMERR;
-        }
-
-        decomprle(bodyptr, decomp_mem, chunkLen, decomp_bufsize);
-        bodyptr = decomp_mem;                 // -> uncompressed BODY
-        chunkLen = decomp_bufsize;
-        delete [] databuf;
-        databuf = 0;
-        }
-
-        // the following determines the type of the ILBM file.
-        // it's either NORMAL, EHB, HAM, HAM8 or 24BIT
-
-        int fmt = ILBM_NORMAL;                 // assume normal ILBM
-        if (bmhd_bitplanes == 24) {
-        fmt = ILBM_24BIT;
-        } else if (bmhd_bitplanes == 8) {
-        if (CAMGok && (camg_viewmode & 0x800)) {
-            fmt = ILBM_HAM8;
-        }
-        } else if ((bmhd_bitplanes > 5) && CAMGok) {
-        if (camg_viewmode & 0x80) {
-            fmt = ILBM_EHB;
-        } else if (camg_viewmode & 0x800) {
-            fmt = ILBM_HAM;
-        }
-        }
-
-        wxLogTrace(_T("iff"),
-            _T("LoadIFF: %s %dx%d, planes=%d (%d cols), comp=%d"),
-            (fmt==ILBM_NORMAL) ? "Normal ILBM" :
-            (fmt==ILBM_HAM)    ? "HAM ILBM" :
-            (fmt==ILBM_HAM8)   ? "HAM8 ILBM" :
-            (fmt==ILBM_EHB)    ? "EHB ILBM" :
-            (fmt==ILBM_24BIT)  ? "24BIT ILBM" : "unknown ILBM",
-            bmhd_width, bmhd_height, bmhd_bitplanes,
-            1<<bmhd_bitplanes, bmhd_compression);
-
-        if ((fmt==ILBM_NORMAL) || (fmt==ILBM_EHB) || (fmt==ILBM_HAM)) {
-        wxLogTrace(_T("iff"),
-            _T("Converting CMAP from normal ILBM CMAP"));
-
-        switch(fmt) {
-            case ILBM_NORMAL: colors = 1 << bmhd_bitplanes; break;
-            case ILBM_EHB:    colors = 32*2; break;
-            case ILBM_HAM:    colors = 16; break;
-        }
-
-        if (colors > m_image->colors) {
-            byte *pal = new byte[colors*3];
-            if (!pal) {
-            Destroy();
-            return wxIFF_MEMERR;
-            }
-            int i;
-            for (i = 0; i < m_image->colors; i++) {
-            pal[3*i + 0] = m_image->pal[3*i + 0];
-            pal[3*i + 1] = m_image->pal[3*i + 1];
-            pal[3*i + 2] = m_image->pal[3*i + 2];
-            }
-            for (; i < colors; i++) {
-            pal[3*i + 0] = 0;
-            pal[3*i + 1] = 0;
-            pal[3*i + 2] = 0;
-            }
-            delete m_image->pal;
-            m_image->pal = pal;
-            m_image->colors = colors;
-        }
-
-            for (int i=0; i < colors; i++) {
-            m_image->pal[3*i + 0] = (m_image->pal[3*i + 0] >> 4) * 17;
-            m_image->pal[3*i + 1] = (m_image->pal[3*i + 1] >> 4) * 17;
-            m_image->pal[3*i + 2] = (m_image->pal[3*i + 2] >> 4) * 17;
-        }
-        }
-
-        m_image->p = new byte[bmhd_width * bmhd_height * 3];
-            byte *picptr = m_image->p;
-        if (!picptr) {
-        Destroy();
-        return wxIFF_MEMERR;
-        }
-
-        byte *pal = m_image->pal;
-        int lineskip = ((bmhd_width + 15) >> 4) << 1;
-            int height = chunkLen / (lineskip * bmhd_bitplanes);
-
-        if (bmhd_height < height) {
-            height = bmhd_height;
-        }
-
-        if (fmt == ILBM_HAM || fmt == ILBM_HAM8 || fmt == ILBM_24BIT) {
-        byte *pic = picptr;
-        const byte *workptr = bodyptr;
-
-        for (int i=0; i < height; i++) {
-            byte bitmsk = 0x80;
-            const byte *workptr2 = workptr;
-
-            // at start of each line, init RGB values to background
-            byte rval = pal[0];
-            byte gval = pal[1];
-            byte bval = pal[2];
-
-            for (int j=0; j < bmhd_width; j++) {
-            long col = 0;
-            long colbit = 1;
-            const byte *workptr3 = workptr2;
-            for (int k=0; k < bmhd_bitplanes; k++) {
-                if (*workptr3 & bitmsk) {
-                col += colbit;
-                }
-                workptr3 += lineskip;
-                colbit <<= 1;
-            }
-
-            if (fmt==ILBM_HAM) {
-                int c = (col & 0x0f);
-                switch (col & 0x30) {
-                case 0x00: if (c >= 0 && c < colors) {
-                           rval = pal[3*c + 0];
-                           gval = pal[3*c + 1];
-                           bval = pal[3*c + 2];
-                       }
-                       break;
-
-                case 0x10: bval = c * 17;
-                       break;
-
-                case 0x20: rval = c * 17;
-                       break;
-
-                case 0x30: gval = c * 17;
-                       break;
-                }
-            } else if (fmt == ILBM_HAM8) {
-                int c = (col & 0x3f);
-                switch(col & 0xc0) {
-                case 0x00: if (c >= 0 && c < colors) {
-                           rval = pal[3*c + 0];
-                           gval = pal[3*c + 1];
-                           bval = pal[3*c + 2];
-                       }
-                       break;
-
-                case 0x40: bval = (bval & 3) | (c << 2);
-                       break;
-
-                case 0x80: rval = (rval & 3) | (c << 2);
-                       break;
-
-                case 0xc0: gval = (rval & 3) | (c << 2);
-                }
-            } else {
-                rval = col & 0xff;
-                gval = (col >> 8) & 0xff;
-                bval = (col >> 16) & 0xff;
-            }
-
-            *pic++ = rval;
-            *pic++ = gval;
-            *pic++ = bval;
-
-            bitmsk = bitmsk >> 1;
-            if (bitmsk == 0) {
-                bitmsk = 0x80;
-                workptr2++;
-            }
-            }
-            workptr += lineskip * bmhd_bitplanes;
-        }
-        }  else if ((fmt == ILBM_NORMAL) || (fmt == ILBM_EHB)) {
-        if (fmt == ILBM_EHB) {
-            wxLogTrace(_T("iff"), _T("Doubling CMAP for EHB mode"));
-
-            for (int i=0; i<32; i++) {
-            pal[3*(i + 32) + 0] = pal[3*i + 0] >> 1;
-            pal[3*(i + 32) + 1] = pal[3*i + 1] >> 1;
-            pal[3*(i + 32) + 2] = pal[3*i + 2] >> 1;
-            }
-        }
-
-        byte *pic = picptr;         // ptr to buffer
-        const byte *workptr = bodyptr;  // ptr to pic, planar format
-
-        if (bmhd_height < height) {
-            height = bmhd_height;
-        }
-
-        for (int i=0; i < height; i++) {
-            byte bitmsk = 0x80;                 // left most bit (mask)
-            const byte *workptr2 = workptr;     // work ptr to source
-            for (int j=0; j < bmhd_width; j++) {
-            long col = 0;
-            long colbit = 1;
-            const byte *workptr3 = workptr2;  // 1st byte in 1st pln
-
-            for (int k=0; k < bmhd_bitplanes; k++) {
-                if (*workptr3 & bitmsk) { // if bit set in this pln
-                col = col + colbit; // add bit to chunky byte
-                }
-                workptr3 += lineskip;   // go to next line
-                colbit <<= 1;           // shift color bit
-            }
-
-            if (col >= 0 && col < colors) {
-                pic[0] = pal[3*col + 0];
-                pic[1] = pal[3*col + 1];
-                pic[2] = pal[3*col + 2];
-            } else {
-                pic[0] = pic[1] = pic[2] = 0;
-            }
-            pic += 3;
-            bitmsk = bitmsk >> 1;   // shift mask to next bit
-            if (bitmsk == 0) {      // if mask is zero
-                bitmsk = 0x80;      // reset mask
-                workptr2++;         // mv ptr to next byte
-            }
-            }
-
-            workptr += lineskip * bmhd_bitplanes;  // to next line
-        }
-        } else {
-        break;      // unknown format
-        }
-
-        m_image->w = bmhd_width;
-        m_image->h = height;
-        m_image->transparent = bmhd_transcol;
-
-        wxLogTrace(_T("iff"), _T("Loaded IFF picture %s"),
-            truncated? "truncated" : "completely");
-
-        return (truncated? wxIFF_TRUNCATED : wxIFF_OK);
-    } else {
-        wxLogTrace(_T("iff"), _T("Skipping unknown chunk '%c%c%c%c'"),
-                *dataptr, *(dataptr+1), *(dataptr+2), *(dataptr+3));
-
-        dataptr = dataptr + 8 + chunkLen;      // skip unknown chunk
-    }
-    }
-
-    Destroy();
-    return wxIFF_INVFORMAT;
-}
-
-#endif // wxUSE_STREAMS && wxUSE_IFF
-
index 72d9f91394934288df3f66652dd611c870de6285..bd6fb87cfe957cf6916eeb309d74bc449e4c53b7 100644 (file)
@@ -1,12 +1,14 @@
-//
-// imgiff.cc    - image handler for Amiga IFF images
-//        parts of the source taken by xv source code.
-//
-// (c) Steffen Gutmann, 2002
-//
-// Creation date: 08.01.2002
-// Last modified: 08.01.2002
-//
+/////////////////////////////////////////////////////////////////////////////
+// Name:        imagiff.h
+// Purpose:     wxImage handler for Amiga IFF images
+// Author:      Steffen Gutmann
+// RCS-ID:      $Id$
+// Copyright:   (c) Steffen Gutmann, 2002
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+//        parts of the source are based on xviff by Thomas Meyer
+//        Permission for use in wxWindows has been gratefully given.
 
 #ifdef __GNUG__
 #pragma implementation "imagiff.h"
 #  include "wx/defs.h"
 #endif
 
+#if wxUSE_IMAGE && wxUSE_IFF
+
 #include "wx/imagiff.h"
-#include "wx/iffdecod.h"
 #include "wx/wfstream.h"
 #include "wx/log.h"
 #include "wx/intl.h"
 
-#if wxUSE_IMAGE && wxUSE_IFF
+#include <stdlib.h>
+#include <string.h>
+
+
+// --------------------------------------------------------------------------
+// Constants
+// --------------------------------------------------------------------------
+
+// Error codes:
+//  Note that the error code wxIFF_TRUNCATED means that the image itself
+//  is most probably OK, but the decoder didn't reach the end of the data
+//  stream; this means that if it was not reading directly from file,
+//  the stream will not be correctly positioned.
+//
+
+enum
+{
+    wxIFF_OK = 0,                   /* everything was OK */
+    wxIFF_INVFORMAT,                /* error in iff header */
+    wxIFF_MEMERR,                   /* error allocating memory */
+    wxIFF_TRUNCATED                 /* file appears to be truncated */
+};
+
+// --------------------------------------------------------------------------
+// wxIFFDecoder class
+// --------------------------------------------------------------------------
+
+// internal class for storing IFF image data
+class IFFImage
+{
+public:
+    unsigned int w;                 /* width */
+    unsigned int h;                 /* height */
+    int transparent;                /* transparent color (-1 = none) */
+    int colors;                            /* number of colors */
+    unsigned char *p;               /* bitmap */
+    unsigned char *pal;             /* palette */
+
+    IFFImage() : w(0), h(0), colors(0), p(0), pal(0) {}
+    ~IFFImage() { delete [] p; delete [] pal; }
+};
+
+class WXDLLEXPORT wxIFFDecoder
+{
+private:
+    IFFImage *m_image;         // image data
+    wxInputStream *m_f;        // input stream
+    unsigned char *databuf; 
+    unsigned char *picptr; 
+    unsigned char *decomp_mem;
+
+    void Destroy();
+
+public:
+    // get data of current frame
+    unsigned char* GetData() const;
+    unsigned char* GetPalette() const;
+    int GetNumColors() const;
+    unsigned int GetWidth() const;
+    unsigned int GetHeight() const;
+    int GetTransparentColour() const;
+
+    // constructor, destructor, etc.
+    wxIFFDecoder(wxInputStream *s);
+    ~wxIFFDecoder() { Destroy(); }
+    bool CanRead();
+    int ReadIFF();
+    bool ConvertToImage(wxImage *image) const;
+};
+
+
+//---------------------------------------------------------------------------
+// wxIFFDecoder constructor and destructor
+//---------------------------------------------------------------------------
+
+wxIFFDecoder::wxIFFDecoder(wxInputStream *s)
+{
+    m_f = s;
+    m_image = 0;
+    databuf = 0;
+    decomp_mem = 0;
+}
+
+void wxIFFDecoder::Destroy()
+{
+    delete m_image;
+    m_image = 0;
+    delete [] databuf;
+    databuf = 0;
+    delete [] decomp_mem;
+    decomp_mem = 0;
+}
+
+//---------------------------------------------------------------------------
+// Convert this image to a wxImage object
+//---------------------------------------------------------------------------
+
+// This function was designed by Vaclav Slavik
+
+bool wxIFFDecoder::ConvertToImage(wxImage *image) const
+{
+    // just in case...
+    image->Destroy();
+
+    // create the image
+    image->Create(GetWidth(), GetHeight());
+
+    if (!image->Ok())
+        return FALSE;
+
+    unsigned char *pal = GetPalette();
+    unsigned char *src = GetData();
+    unsigned char *dst = image->GetData();
+    int colors = GetNumColors();
+    int transparent = GetTransparentColour();
+    long i;
+
+    // set transparent colour mask
+    if (transparent != -1)
+    {
+        for (i = 0; i < colors; i++)
+        {
+            if ((pal[3 * i + 0] == 255) &&
+                (pal[3 * i + 1] == 0) &&
+                (pal[3 * i + 2] == 255))
+            {
+                pal[3 * i + 2] = 254;
+            }
+        }
+
+        pal[3 * transparent + 0] = 255,
+        pal[3 * transparent + 1] = 0,
+        pal[3 * transparent + 2] = 255;
+
+        image->SetMaskColour(255, 0, 255);
+    }
+    else
+        image->SetMask(FALSE);
+
+#if wxUSE_PALETTE
+    if (pal && colors > 0)
+    {
+        unsigned char* r = new unsigned char[colors];
+        unsigned char* g = new unsigned char[colors];
+        unsigned char* b = new unsigned char[colors];
+
+        for (i = 0; i < colors; i++)
+        {
+            r[i] = pal[3*i + 0];
+            g[i] = pal[3*i + 1];
+            b[i] = pal[3*i + 2];
+        }
+
+        image->SetPalette(wxPalette(colors, r, g, b));
+
+        delete [] r;
+        delete [] g;
+        delete [] b;
+    }
+#endif // wxUSE_PALETTE
+
+    // copy image data
+    for (i = 0; i < (long)(GetWidth() * GetHeight()); i++, src += 3, dst += 3)
+    {
+    dst[0] = src[0];
+    dst[1] = src[1];
+    dst[2] = src[2];
+    }
+
+    return TRUE;
+}
+
+
+//---------------------------------------------------------------------------
+// Data accessors
+//---------------------------------------------------------------------------
+
+// Get data for current frame
+
+unsigned char* wxIFFDecoder::GetData() const    { return (m_image->p); }
+unsigned char* wxIFFDecoder::GetPalette() const { return (m_image->pal); }
+int wxIFFDecoder::GetNumColors() const          { return m_image->colors; }
+unsigned int wxIFFDecoder::GetWidth() const     { return (m_image->w); }
+unsigned int wxIFFDecoder::GetHeight() const    { return (m_image->h); }
+int wxIFFDecoder::GetTransparentColour() const { return m_image->transparent; }
+
+//---------------------------------------------------------------------------
+// IFF reading and decoding
+//---------------------------------------------------------------------------
+
+//
+// CanRead:
+//  Returns TRUE if the file looks like a valid IFF, FALSE otherwise.
+//
+bool wxIFFDecoder::CanRead()
+{
+    unsigned char buf[12] = "";
+
+    m_f->Read(buf, 12);
+    m_f->SeekI(-12, wxFromCurrent);
+
+    return (memcmp(buf, "FORM", 4) == 0 && memcmp(buf+8, "ILBM", 4) == 0);
+}
+
+
+// ReadIFF:
+// Based on xv source code by Thomas Meyer
+// Permission for use in wxWindows has been gratefully given.
+
+typedef unsigned char byte;
+#define IFFDEBUG 0
+
+/*************************************************************************
+  void decomprle(source, destination, source length, buffer size)
+
+  Decompress run-length encoded data from source to destination. Terminates
+  when source is decoded completely or destination buffer is full.
+
+  The decruncher is as optimized as I could make it, without risking
+  safety in case of corrupt BODY chunks.
+**************************************************************************/
+
+static void decomprle(const byte *sptr, byte *dptr, long slen, long dlen)
+{
+    byte codeByte, dataByte;
+
+    while ((slen > 0) && (dlen > 0)) {
+    // read control byte
+    codeByte = *sptr++;
+
+    if (codeByte < 0x80) {
+        codeByte++;
+        if ((slen > (long) codeByte) && (dlen >= (long) codeByte)) {
+        slen -= codeByte + 1;
+        dlen -= codeByte;
+        while (codeByte > 0) {
+            *dptr++ = *sptr++;
+            codeByte--;
+        }
+        }
+        else slen = 0;
+    }
+
+    else if (codeByte > 0x80) {
+        codeByte = 0x81 - (codeByte & 0x7f);
+        if ((slen > (long) 0) && (dlen >= (long) codeByte)) {
+        dataByte = *sptr++;
+        slen -= 2;
+        dlen -= codeByte;
+        while (codeByte > 0) {
+            *dptr++ = dataByte;
+            codeByte--;
+        }
+        }
+        else slen = 0;
+    }
+    }
+}
+
+/******************************************/
+static unsigned int iff_getword(const byte *ptr)
+{
+    unsigned int v;
+
+    v = *ptr++;
+    v = (v << 8) + *ptr;
+    return v;
+}
+
+/******************************************/
+static unsigned long iff_getlong(const byte *ptr)
+{
+    unsigned long l;
+
+    l = *ptr++;
+    l = (l << 8) + *ptr++;
+    l = (l << 8) + *ptr++;
+    l = (l << 8) + *ptr;
+    return l;
+}
+
+// Define internal ILBM types
+#define ILBM_NORMAL     0
+#define ILBM_EHB        1
+#define ILBM_HAM        2
+#define ILBM_HAM8       3
+#define ILBM_24BIT      4
+
+int wxIFFDecoder::ReadIFF()
+{
+    Destroy();
+
+    m_image = new IFFImage();
+    if (m_image == 0) {
+    Destroy();
+    return wxIFF_MEMERR;
+    }
+
+    // compute file length
+    off_t currentPos = m_f->TellI();
+    m_f->SeekI(0, wxFromEnd);
+    long filesize = m_f->TellI();
+    m_f->SeekI(currentPos, wxFromStart);
+
+    // allocate memory for complete file
+    if ((databuf = new byte[filesize]) == 0) {
+    Destroy();
+    return wxIFF_MEMERR;
+    }
+
+    m_f->Read(databuf, filesize);
+    const byte *dataend = databuf + filesize;
+
+    // initialize work pointer. used to trace the buffer for IFF chunks
+    const byte *dataptr = databuf;
+
+    // check for minmal size
+    if (dataptr + 12 > dataend) {
+    Destroy();
+    return wxIFF_INVFORMAT;
+    }
+
+    // check if we really got an IFF file
+    if (strncmp((char *)dataptr, "FORM", 4) != 0) {
+    Destroy();
+    return wxIFF_INVFORMAT;
+    }
+
+    dataptr = dataptr + 8;                  // skip ID and length of FORM
+
+    // check if the IFF file is an ILBM (picture) file
+    if (strncmp((char *) dataptr, "ILBM", 4) != 0) {
+    Destroy();
+    return wxIFF_INVFORMAT;
+    }
+
+    wxLogTrace(_T("iff"), _T("IFF ILBM file recognized"));
+
+    dataptr = dataptr + 4;                                // skip ID
+
+    //
+    // main decoding loop. searches IFF chunks and handles them.
+    // terminates when BODY chunk was found or dataptr ran over end of file
+    //
+    bool BMHDok = false, CMAPok = false, CAMGok = false;
+    int bmhd_width = 0, bmhd_height = 0, bmhd_bitplanes = 0, bmhd_transcol = -1;
+    byte bmhd_masking = 0, bmhd_compression = 0;
+    long camg_viewmode = 0;
+    int colors = 0;
+    while (dataptr + 8 <= dataend) {
+    // get chunk length and make even
+    size_t chunkLen = (iff_getlong(dataptr + 4) + 1) & 0xfffffffe;
+#ifdef __VMS
+       // Silence compiler warning
+       int chunkLen_;
+       chunkLen_ = chunkLen;
+       if (chunkLen_ < 0) {     // format error?
+#else
+       if (chunkLen < 0) {     // format error?
+#endif
+         break;
+    }
+    bool truncated = (dataptr + 8 + chunkLen > dataend);
+
+    if (strncmp((char *)dataptr, "BMHD", 4) == 0) { // BMHD chunk?
+        if (chunkLen < 12 + 2 || truncated) {
+        break;
+        }
+        bmhd_width = iff_getword(dataptr + 8);      // width of picture
+        bmhd_height= iff_getword(dataptr + 8 + 2);  // height of picture
+        bmhd_bitplanes = *(dataptr + 8 + 8);        // # of bitplanes
+        bmhd_masking  = *(dataptr + 8 + 9);
+        bmhd_compression = *(dataptr + 8 + 10);     // get compression
+        bmhd_transcol    = iff_getword(dataptr + 8 + 12);
+        BMHDok = true;                              // got BMHD
+        dataptr += 8 + chunkLen;                    // to next chunk
+    }
+    else if (strncmp((char *)dataptr, "CMAP", 4) == 0) { // CMAP ?
+        if (truncated) {
+        break;
+        }
+        const byte *cmapptr = dataptr + 8;
+        colors = chunkLen / 3;                  // calc no of colors
+
+        delete m_image->pal;
+        m_image->pal = 0;
+        m_image->colors = colors;
+        if (colors > 0) {
+        m_image->pal = new byte[3*colors];
+        if (!m_image->pal) {
+            Destroy();
+            return wxIFF_MEMERR;
+        }
+
+        // copy colors to color map
+        for (int i=0; i < colors; i++) {
+            m_image->pal[3*i + 0] = *cmapptr++;
+            m_image->pal[3*i + 1] = *cmapptr++;
+            m_image->pal[3*i + 2] = *cmapptr++;
+        }
+        }
+
+        wxLogTrace(_T("iff"), _T("Read %d colors from IFF file."),
+            colors);
+
+        CMAPok = true;                              // got CMAP
+        dataptr += 8 + chunkLen;                    // to next chunk
+    } else if (strncmp((char *)dataptr, "CAMG", 4) == 0) { // CAMG ?
+        if (chunkLen < 4 || truncated) {
+        break;
+        }
+        camg_viewmode = iff_getlong(dataptr + 8);   // get viewmodes
+        CAMGok = true;                              // got CAMG
+        dataptr += 8 + chunkLen;                    // to next chunk
+    }
+    else if (strncmp((char *)dataptr, "BODY", 4) == 0) { // BODY ?
+        if (!BMHDok) {                              // BMHD found?
+        break;
+        }
+        const byte *bodyptr = dataptr + 8;          // -> BODY data
+
+        if (truncated) {
+        chunkLen = dataend - dataptr;
+        }
+
+        //
+            // if BODY is compressed, allocate buffer for decrunched BODY
+        // and decompress it (run length encoding)
+        //
+        if (bmhd_compression == 1) {
+        // calc size of decrunch buffer - (size of the actual pic.
+        // decompressed in interleaved Amiga bitplane format)
+
+        size_t decomp_bufsize = (((bmhd_width + 15) >> 4) << 1)
+            * bmhd_height * bmhd_bitplanes;
+
+        if ((decomp_mem = new byte[decomp_bufsize]) == 0) {
+            Destroy();
+            return wxIFF_MEMERR;
+        }
+
+        decomprle(bodyptr, decomp_mem, chunkLen, decomp_bufsize);
+        bodyptr = decomp_mem;                 // -> uncompressed BODY
+        chunkLen = decomp_bufsize;
+        delete [] databuf;
+        databuf = 0;
+        }
+
+        // the following determines the type of the ILBM file.
+        // it's either NORMAL, EHB, HAM, HAM8 or 24BIT
+
+        int fmt = ILBM_NORMAL;                 // assume normal ILBM
+        if (bmhd_bitplanes == 24) {
+        fmt = ILBM_24BIT;
+        } else if (bmhd_bitplanes == 8) {
+        if (CAMGok && (camg_viewmode & 0x800)) {
+            fmt = ILBM_HAM8;
+        }
+        } else if ((bmhd_bitplanes > 5) && CAMGok) {
+        if (camg_viewmode & 0x80) {
+            fmt = ILBM_EHB;
+        } else if (camg_viewmode & 0x800) {
+            fmt = ILBM_HAM;
+        }
+        }
+
+        wxLogTrace(_T("iff"),
+            _T("LoadIFF: %s %dx%d, planes=%d (%d cols), comp=%d"),
+            (fmt==ILBM_NORMAL) ? "Normal ILBM" :
+            (fmt==ILBM_HAM)    ? "HAM ILBM" :
+            (fmt==ILBM_HAM8)   ? "HAM8 ILBM" :
+            (fmt==ILBM_EHB)    ? "EHB ILBM" :
+            (fmt==ILBM_24BIT)  ? "24BIT ILBM" : "unknown ILBM",
+            bmhd_width, bmhd_height, bmhd_bitplanes,
+            1<<bmhd_bitplanes, bmhd_compression);
+
+        if ((fmt==ILBM_NORMAL) || (fmt==ILBM_EHB) || (fmt==ILBM_HAM)) {
+        wxLogTrace(_T("iff"),
+            _T("Converting CMAP from normal ILBM CMAP"));
+
+        switch(fmt) {
+            case ILBM_NORMAL: colors = 1 << bmhd_bitplanes; break;
+            case ILBM_EHB:    colors = 32*2; break;
+            case ILBM_HAM:    colors = 16; break;
+        }
+
+        if (colors > m_image->colors) {
+            byte *pal = new byte[colors*3];
+            if (!pal) {
+            Destroy();
+            return wxIFF_MEMERR;
+            }
+            int i;
+            for (i = 0; i < m_image->colors; i++) {
+            pal[3*i + 0] = m_image->pal[3*i + 0];
+            pal[3*i + 1] = m_image->pal[3*i + 1];
+            pal[3*i + 2] = m_image->pal[3*i + 2];
+            }
+            for (; i < colors; i++) {
+            pal[3*i + 0] = 0;
+            pal[3*i + 1] = 0;
+            pal[3*i + 2] = 0;
+            }
+            delete m_image->pal;
+            m_image->pal = pal;
+            m_image->colors = colors;
+        }
+
+            for (int i=0; i < colors; i++) {
+            m_image->pal[3*i + 0] = (m_image->pal[3*i + 0] >> 4) * 17;
+            m_image->pal[3*i + 1] = (m_image->pal[3*i + 1] >> 4) * 17;
+            m_image->pal[3*i + 2] = (m_image->pal[3*i + 2] >> 4) * 17;
+        }
+        }
+
+        m_image->p = new byte[bmhd_width * bmhd_height * 3];
+            byte *picptr = m_image->p;
+        if (!picptr) {
+        Destroy();
+        return wxIFF_MEMERR;
+        }
+
+        byte *pal = m_image->pal;
+        int lineskip = ((bmhd_width + 15) >> 4) << 1;
+            int height = chunkLen / (lineskip * bmhd_bitplanes);
+
+        if (bmhd_height < height) {
+            height = bmhd_height;
+        }
+
+        if (fmt == ILBM_HAM || fmt == ILBM_HAM8 || fmt == ILBM_24BIT) {
+        byte *pic = picptr;
+        const byte *workptr = bodyptr;
+
+        for (int i=0; i < height; i++) {
+            byte bitmsk = 0x80;
+            const byte *workptr2 = workptr;
+
+            // at start of each line, init RGB values to background
+            byte rval = pal[0];
+            byte gval = pal[1];
+            byte bval = pal[2];
+
+            for (int j=0; j < bmhd_width; j++) {
+            long col = 0;
+            long colbit = 1;
+            const byte *workptr3 = workptr2;
+            for (int k=0; k < bmhd_bitplanes; k++) {
+                if (*workptr3 & bitmsk) {
+                col += colbit;
+                }
+                workptr3 += lineskip;
+                colbit <<= 1;
+            }
+
+            if (fmt==ILBM_HAM) {
+                int c = (col & 0x0f);
+                switch (col & 0x30) {
+                case 0x00: if (c >= 0 && c < colors) {
+                           rval = pal[3*c + 0];
+                           gval = pal[3*c + 1];
+                           bval = pal[3*c + 2];
+                       }
+                       break;
+
+                case 0x10: bval = c * 17;
+                       break;
+
+                case 0x20: rval = c * 17;
+                       break;
+
+                case 0x30: gval = c * 17;
+                       break;
+                }
+            } else if (fmt == ILBM_HAM8) {
+                int c = (col & 0x3f);
+                switch(col & 0xc0) {
+                case 0x00: if (c >= 0 && c < colors) {
+                           rval = pal[3*c + 0];
+                           gval = pal[3*c + 1];
+                           bval = pal[3*c + 2];
+                       }
+                       break;
+
+                case 0x40: bval = (bval & 3) | (c << 2);
+                       break;
+
+                case 0x80: rval = (rval & 3) | (c << 2);
+                       break;
+
+                case 0xc0: gval = (rval & 3) | (c << 2);
+                }
+            } else {
+                rval = col & 0xff;
+                gval = (col >> 8) & 0xff;
+                bval = (col >> 16) & 0xff;
+            }
+
+            *pic++ = rval;
+            *pic++ = gval;
+            *pic++ = bval;
+
+            bitmsk = bitmsk >> 1;
+            if (bitmsk == 0) {
+                bitmsk = 0x80;
+                workptr2++;
+            }
+            }
+            workptr += lineskip * bmhd_bitplanes;
+        }
+        }  else if ((fmt == ILBM_NORMAL) || (fmt == ILBM_EHB)) {
+        if (fmt == ILBM_EHB) {
+            wxLogTrace(_T("iff"), _T("Doubling CMAP for EHB mode"));
+
+            for (int i=0; i<32; i++) {
+            pal[3*(i + 32) + 0] = pal[3*i + 0] >> 1;
+            pal[3*(i + 32) + 1] = pal[3*i + 1] >> 1;
+            pal[3*(i + 32) + 2] = pal[3*i + 2] >> 1;
+            }
+        }
+
+        byte *pic = picptr;         // ptr to buffer
+        const byte *workptr = bodyptr;  // ptr to pic, planar format
+
+        if (bmhd_height < height) {
+            height = bmhd_height;
+        }
+
+        for (int i=0; i < height; i++) {
+            byte bitmsk = 0x80;                 // left most bit (mask)
+            const byte *workptr2 = workptr;     // work ptr to source
+            for (int j=0; j < bmhd_width; j++) {
+            long col = 0;
+            long colbit = 1;
+            const byte *workptr3 = workptr2;  // 1st byte in 1st pln
+
+            for (int k=0; k < bmhd_bitplanes; k++) {
+                if (*workptr3 & bitmsk) { // if bit set in this pln
+                col = col + colbit; // add bit to chunky byte
+                }
+                workptr3 += lineskip;   // go to next line
+                colbit <<= 1;           // shift color bit
+            }
+
+            if (col >= 0 && col < colors) {
+                pic[0] = pal[3*col + 0];
+                pic[1] = pal[3*col + 1];
+                pic[2] = pal[3*col + 2];
+            } else {
+                pic[0] = pic[1] = pic[2] = 0;
+            }
+            pic += 3;
+            bitmsk = bitmsk >> 1;   // shift mask to next bit
+            if (bitmsk == 0) {      // if mask is zero
+                bitmsk = 0x80;      // reset mask
+                workptr2++;         // mv ptr to next byte
+            }
+            }
+
+            workptr += lineskip * bmhd_bitplanes;  // to next line
+        }
+        } else {
+        break;      // unknown format
+        }
+
+        m_image->w = bmhd_width;
+        m_image->h = height;
+        m_image->transparent = bmhd_transcol;
+
+        wxLogTrace(_T("iff"), _T("Loaded IFF picture %s"),
+            truncated? "truncated" : "completely");
+
+        return (truncated? wxIFF_TRUNCATED : wxIFF_OK);
+    } else {
+        wxLogTrace(_T("iff"), _T("Skipping unknown chunk '%c%c%c%c'"),
+                *dataptr, *(dataptr+1), *(dataptr+2), *(dataptr+3));
+
+        dataptr = dataptr + 8 + chunkLen;      // skip unknown chunk
+    }
+    }
+
+    Destroy();
+    return wxIFF_INVFORMAT;
+}
+
 
-IMPLEMENT_DYNAMIC_CLASS(wxIFFHandler, wxImageHandler)
 
 //-----------------------------------------------------------------------------
 // wxIFFHandler
 //-----------------------------------------------------------------------------
 
+IMPLEMENT_DYNAMIC_CLASS(wxIFFHandler, wxImageHandler)
+
 #if wxUSE_STREAMS
 
 bool wxIFFHandler::LoadFile(wxImage *image, wxInputStream& stream, 
-    bool verbose, int WXUNUSED(index))
+                            bool verbose, int WXUNUSED(index))
 {
     wxIFFDecoder *decod;
     int error;
@@ -83,7 +771,7 @@ bool wxIFFHandler::LoadFile(wxImage *image, wxInputStream& stream,
 }
 
 bool wxIFFHandler::SaveFile(wxImage * WXUNUSED(image),
-    wxOutputStream& WXUNUSED(stream), bool verbose)
+                            wxOutputStream& WXUNUSED(stream), bool verbose)
 {
     if (verbose)
         wxLogDebug(wxT("IFF: the handler is read-only!!"));
@@ -103,6 +791,6 @@ bool wxIFFHandler::DoCanRead(wxInputStream& stream)
     return ok;
 }
 
-#endif  
-#endif  
+#endif // wxUSE_STREAMS
 
+#endif // wxUSE_IFF
index 184da6d445c0589f4cef81bc208e5707bad0df00..81206f485a921f6b208beb9c884d59416a2a4228 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BASE.T!
 ALL_SOURCES = \
                common/init.cpp \
index c49c301efef1263b57ab0e3cad22ef2dbae63e3b..2b41fb20f950cb24aeea12769e24f3bf3b25d795 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 ALL_SOURCES = \
                generic/accel.cpp \
@@ -101,7 +101,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -360,7 +359,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -671,7 +669,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index c49c301efef1263b57ab0e3cad22ef2dbae63e3b..2b41fb20f950cb24aeea12769e24f3bf3b25d795 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE GTK.T!
 ALL_SOURCES = \
                generic/accel.cpp \
@@ -101,7 +101,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -360,7 +359,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -671,7 +669,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index 23c758a4c3136878f33c4f36eb8b563822fdb209..013fb23c602f268f2e884524335c6789a6a358d9 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -98,7 +98,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -367,7 +366,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -698,7 +696,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index 23c758a4c3136878f33c4f36eb8b563822fdb209..013fb23c602f268f2e884524335c6789a6a358d9 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MAC.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -98,7 +98,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -367,7 +366,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -698,7 +696,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index df3db6d88acb5ae0a1f42809a1cb3f1c06e06e29..2cbfc5ccdec3a91268f13dffaf2b146f05fd91f7 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MGL.T!
 ALL_SOURCES = \
                generic/accel.cpp \
@@ -100,7 +100,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -322,7 +321,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -572,7 +570,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index 73acfdddd57891d23d27cf9a695d737989bab339..245b5ae6991a946d0c1af17fb2a8eb6d0b1d6f75 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MICRO.T!
 ALL_SOURCES = \
                generic/accel.cpp \
@@ -98,7 +98,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -322,7 +321,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -664,7 +662,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index c4da85750ecf57447ea8826bec40aee18d67f2e8..557f518eb58f445dfaffb65605951790629e26ff 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MOTIF.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -100,7 +100,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -351,7 +350,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -659,7 +657,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index 1efff29324184684e49f9b2fba2972513e882826..aa2350a7949a01c17ef83f1e77868bf73085146e 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE MSW.T!
 ALL_SOURCES = \
                generic/busyinfo.cpp \
@@ -84,7 +84,6 @@ ALL_SOURCES = \
                common/hash.cpp \
                common/helpbase.cpp \
                common/http.cpp \
-               common/iffdecod.cpp \
                common/imagall.cpp \
                common/imagbmp.cpp \
                common/image.cpp \
@@ -378,7 +377,6 @@ ALL_HEADERS = \
                helphtml.h \
                helpwin.h \
                icon.h \
-               iffdecod.h \
                imagbmp.h \
                image.h \
                imaggif.h \
@@ -728,7 +726,6 @@ COMMONOBJS = \
                hash.o \
                helpbase.o \
                http.o \
-               iffdecod.o \
                imagall.o \
                imagbmp.o \
                image.o \
index c7748314a7e92b231c37e404fe7537628a37dec5..c9782246d7a3b03d2b94560cebc1be606afa46cd 100644 (file)
@@ -1,6 +1,6 @@
 
 
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE B32.T!
 
 #
@@ -168,7 +168,6 @@ COMMONOBJS = \
                $(MSWDIR)\hash.obj \
                $(MSWDIR)\helpbase.obj \
                $(MSWDIR)\http.obj \
-               $(MSWDIR)\iffdecod.obj \
                $(MSWDIR)\imagall.obj \
                $(MSWDIR)\imagbmp.obj \
                $(MSWDIR)\image.obj \
@@ -742,8 +741,6 @@ $(MSWDIR)\helpbase.obj: $(COMMDIR)\helpbase.$(SRCSUFF)
 
 $(MSWDIR)\http.obj: $(COMMDIR)\http.$(SRCSUFF)
 
-$(MSWDIR)\iffdecod.obj: $(COMMDIR)\iffdecod.$(SRCSUFF)
-
 $(MSWDIR)\imagall.obj: $(COMMDIR)\imagall.$(SRCSUFF)
 
 $(MSWDIR)\imagbmp.obj: $(COMMDIR)\imagbmp.$(SRCSUFF)
index 8acacc86676975101784c1771b8abbd5f046a156..854fc94dc932bd4166fd193b0d884b634f725cae 100644 (file)
@@ -1,6 +1,6 @@
 
 
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE BCC.T!
 
 #
@@ -153,7 +153,6 @@ COMMONOBJS = \
                $(MSWDIR)\gifdecod.obj \
                $(MSWDIR)\hash.obj \
                $(MSWDIR)\helpbase.obj \
-               $(MSWDIR)\iffdecod.obj \
                $(MSWDIR)\imagall.obj \
                $(MSWDIR)\imagbmp.obj \
                $(MSWDIR)\image.obj \
@@ -600,8 +599,6 @@ $(MSWDIR)\hash.obj: $(COMMDIR)\hash.$(SRCSUFF)
 
 $(MSWDIR)\helpbase.obj: $(COMMDIR)\helpbase.$(SRCSUFF)
 
-$(MSWDIR)\iffdecod.obj: $(COMMDIR)\iffdecod.$(SRCSUFF)
-
 $(MSWDIR)\imagall.obj: $(COMMDIR)\imagall.$(SRCSUFF)
 
 $(MSWDIR)\imagbmp.obj: $(COMMDIR)\imagbmp.$(SRCSUFF)
index 691e1affb64446faba2d93c58327ecb49b315a5c..1fccb63959cf6cf578509342cad63e022fee8c5a 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE DOS.T!
 
 #
@@ -138,7 +138,6 @@ COMMONOBJS1 = \
                $(COMMDIR)\gifdecod.obj \
                $(COMMDIR)\hash.obj \
                $(COMMDIR)\helpbase.obj \
-               $(COMMDIR)\iffdecod.obj \
                $(COMMDIR)\imagall.obj \
                $(COMMDIR)\imagbmp.obj \
                $(COMMDIR)\image.obj \
@@ -1027,11 +1026,6 @@ $(COMMDIR)/helpbase.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
-$(COMMDIR)/iffdecod.obj:     $*.$(SRCSUFF)
-        cl @<<
-$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
-<<
-
 $(COMMDIR)/imagall.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
index a389424e740670aad2ad7532051cd5cacfb1d620..e2995a956af4cf9a24dcd9aaea4c1421b411aa45 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE G95.T!
 
 #
@@ -155,7 +155,6 @@ COMMONOBJS  = \
                $(COMMDIR)/hash.$(OBJSUFF) \
                $(COMMDIR)/helpbase.$(OBJSUFF) \
                $(COMMDIR)/http.$(OBJSUFF) \
-               $(COMMDIR)/iffdecod.$(OBJSUFF) \
                $(COMMDIR)/imagall.$(OBJSUFF) \
                $(COMMDIR)/imagbmp.$(OBJSUFF) \
                $(COMMDIR)/image.$(OBJSUFF) \
index bc6375ac390209743748312a883d95c1fb8e008c..b2bb58e10a39efe3c660c365638a628dc4ca388a 100644 (file)
@@ -1,6 +1,6 @@
 
 
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE SC.T!
 
 # Symantec C++ makefile for the msw objects
@@ -111,7 +111,6 @@ COMMONOBJS = \
                $(COMMDIR)\hash.obj \
                $(COMMDIR)\helpbase.obj \
                $(COMMDIR)\http.obj \
-               $(COMMDIR)\iffdecod.obj \
                $(COMMDIR)\imagall.obj \
                $(COMMDIR)\imagbmp.obj \
                $(COMMDIR)\image.obj \
index 1f359bff64a6e275da8f79db0c8827fe39130922..202f56f704c164039d75f7a1ceb2113bdc525c0e 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE VC.T!
 
 # File:     makefile.vc
@@ -188,7 +188,6 @@ COMMONOBJS = \
                $(COMMDIR)\$D\hash.obj \
                $(COMMDIR)\$D\helpbase.obj \
                $(COMMDIR)\$D\http.obj \
-               $(COMMDIR)\$D\iffdecod.obj \
                $(COMMDIR)\$D\imagall.obj \
                $(COMMDIR)\$D\imagbmp.obj \
                $(COMMDIR)\$D\image.obj \
index 44ce55e363c9a7e3a56ec4b08597f138ff13e5b1..6602183484184bc3eb440cc4a71ed40552175bc5 100644 (file)
@@ -1,6 +1,6 @@
 #!/binb/wmake.exe
 
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE WAT.T!
 
 #
@@ -149,7 +149,6 @@ COMMONOBJS = &
        hash.obj &
        helpbase.obj &
        http.obj &
-       iffdecod.obj &
        imagall.obj &
        imagbmp.obj &
        image.obj &
@@ -882,9 +881,6 @@ helpbase.obj:     $(COMMDIR)\helpbase.cpp
 http.obj:     $(COMMDIR)\http.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
-iffdecod.obj:     $(COMMDIR)\iffdecod.cpp
-  *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
-
 imagall.obj:     $(COMMDIR)\imagall.cpp
   *$(CCC) $(CPPFLAGS) $(IFLAGS) $<
 
index 650e52f9e5a7330bda0605f7e5b8a92d5e9c6322..4f63abc71d505e22ded71035a4d167f8864c6c2f 100644 (file)
@@ -1,4 +1,4 @@
-# This file was automatically generated by tmake at 16:57, 2002/01/15
+# This file was automatically generated by tmake at 11:57, 2002/01/17
 # DO NOT CHANGE THIS FILE, YOUR CHANGES WILL BE LOST! CHANGE UNIV.T!
 UNIVOBJS = \
                bmpbuttn.o \
index 6225752959cce6b7160509a7db4e679ab9c8537e..30c570ff73212ebb438834fab2c89bd7a037a916 100644 (file)
@@ -297,10 +297,6 @@ SOURCE=.\common\http.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=.\common\iffdecod.cpp
-# End Source File
-# Begin Source File
-
 SOURCE=.\common\imagall.cpp
 # End Source File
 # Begin Source File
@@ -1590,10 +1586,6 @@ SOURCE=..\include\wx\icon.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\include\wx\iffdecod.h
-# End Source File
-# Begin Source File
-
 SOURCE=..\include\wx\imagbmp.h
 # End Source File
 # Begin Source File
index 6b467fa7a7b72e686ecb8408a950d6e1da52e0cf..c7afd9b58739ad3f6332e4f238717449e549bb73 100644 (file)
@@ -456,10 +456,6 @@ SOURCE=.\common\http.cpp
 # End Source File
 # Begin Source File
 
-SOURCE=.\common\iffdecod.cpp
-# End Source File
-# Begin Source File
-
 SOURCE=.\common\imagall.cpp
 # End Source File
 # Begin Source File
@@ -1866,10 +1862,6 @@ SOURCE=..\include\wx\icon.h
 # End Source File
 # Begin Source File
 
-SOURCE=..\include\wx\iffdecod.h
-# End Source File
-# Begin Source File
-
 SOURCE=..\include\wx\imagbmp.h
 # End Source File
 # Begin Source File