X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/39d16996b7616bf8090b140db74fd0b52d50d169..b6a20a20d010d643e52914f51aa0700df0da925f:/src/common/imagpcx.cpp diff --git a/src/common/imagpcx.cpp b/src/common/imagpcx.cpp index 64a4d246b0..cc45398eaf 100644 --- a/src/common/imagpcx.cpp +++ b/src/common/imagpcx.cpp @@ -8,7 +8,7 @@ // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// -#ifdef __GNUG__ +#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) #pragma implementation "imagpcx.h" #endif @@ -21,9 +21,10 @@ #ifndef WX_PRECOMP # include "wx/defs.h" +# include "wx/palette.h" #endif -#if wxUSE_IMAGE && wxUSE_STREAMS && wxUSE_PCX +#if wxUSE_IMAGE && wxUSE_PCX #include "wx/imagpcx.h" #include "wx/wfstream.h" @@ -35,6 +36,14 @@ #include "wx/list.h" #include "wx/object.h" +//----------------------------------------------------------------------------- +// wxPCXHandler +//----------------------------------------------------------------------------- + +IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler) + +#if wxUSE_STREAMS + //----------------------------------------------------------------------------- // RLE encoding and decoding //----------------------------------------------------------------------------- @@ -429,8 +438,6 @@ int SavePCX(wxImage *image, wxOutputStream& stream) // wxPCXHandler //----------------------------------------------------------------------------- -IMPLEMENT_DYNAMIC_CLASS(wxPCXHandler,wxImageHandler) - bool wxPCXHandler::LoadFile( wxImage *image, wxInputStream& stream, bool verbose, int WXUNUSED(index) ) { int error; @@ -494,5 +501,7 @@ bool wxPCXHandler::DoCanRead( wxInputStream& stream ) return c == 10; } -#endif // wxUSE_STREAMS && wxUSE_PCX +#endif // wxUSE_STREAMS + +#endif // wxUSE_IMAGE && wxUSE_PCX